Merge pull request #2257 from leiradel/master

check malloc result
This commit is contained in:
Twinaphex 2015-10-19 19:00:46 +02:00
commit 3687b29d9a

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
{