check malloc result

This commit is contained in:
Andre Leiradella 2015-10-19 14:57:05 -02:00
parent 1ff3b58d68
commit eab254d6dc

View File

@ -1175,8 +1175,12 @@ error1:
if ( data )
{
result = (char*)malloc( length + 1 );
memcpy( (void*)result, (void*)data, length );
result[ length ] = 0;
if ( result )
{
memcpy( (void*)result, (void*)data, length );
result[ length ] = 0;
}
}
else
{