mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
[APPHELP] Fix a possible out of bounds write.
svn path=/trunk/; revision=71489
This commit is contained in:
@@ -272,13 +272,14 @@ BOOL WINAPI SdbWriteBinaryTagFromFile(PDB db, TAG tag, LPCWSTR path)
|
||||
TAGID WINAPI SdbBeginWriteListTag(PDB db, TAG tag)
|
||||
{
|
||||
TAGID list_id;
|
||||
DWORD dum = 0;
|
||||
|
||||
if (!SdbpCheckTagType(tag, TAG_TYPE_LIST))
|
||||
return TAGID_NULL;
|
||||
|
||||
list_id = db->write_iter;
|
||||
SdbpWrite(db, &tag, sizeof(TAG));
|
||||
db->write_iter += sizeof(DWORD); /* reserve some memory for storing list size */
|
||||
SdbpWrite(db, &dum, sizeof(dum)); /* reserve some memory for storing list size */
|
||||
return list_id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user