fix non-null terminated string in provisioning from file

This commit is contained in:
Simon Morlat 2014-04-15 15:37:02 +02:00
parent 8c1be07500
commit 0bb0bb23ea

View file

@ -62,6 +62,7 @@ static int linphone_remote_provisioning_load_file( LinphoneCore* lc, const char*
fseek(f, 0, SEEK_SET);
char* provisioning = ms_malloc(fsize + 1);
provisioning[fsize]='\0';
if (fread(provisioning, fsize, 1, f)==0){
ms_error("Could not read xml provisioning file from %s",file_path);
status=-1;