mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed potential invalid memory read in openpgpsdk
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8486 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8fc3917c4b
commit
5e5dd3d12d
@ -1211,6 +1211,12 @@ ops_write_literal_data_from_file(const char *filename,
|
||||
n=read(fd,buf,1024);
|
||||
if (!n)
|
||||
break;
|
||||
if (n == -1)
|
||||
{
|
||||
close(fd);
|
||||
ops_memory_free(mem);
|
||||
return ops_false;
|
||||
}
|
||||
ops_memory_add(mem, &buf[0], n);
|
||||
}
|
||||
close(fd);
|
||||
|
Loading…
Reference in New Issue
Block a user