Merge pull request #1656 from hardening/CVE-2014-0791-v2
Fix CVE-2014-0791
This commit is contained in:
commit
3d75db05e9
@ -669,6 +669,8 @@ BOOL license_read_scope_list(wStream* s, SCOPE_LIST* scopeList)
|
||||
return FALSE;
|
||||
|
||||
Stream_Read_UINT32(s, scopeCount); /* ScopeCount (4 bytes) */
|
||||
if (scopeCount > Stream_GetRemainingLength(s) / 4) /* every blob is at least 4 bytes */
|
||||
return FALSE;
|
||||
|
||||
scopeList->count = scopeCount;
|
||||
scopeList->array = (LICENSE_BLOB*) malloc(sizeof(LICENSE_BLOB) * scopeCount);
|
||||
|
Loading…
Reference in New Issue
Block a user