mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 969226 - Check if there is enough data to read u32 to avoid buffer overflow. r=bgirard
This commit is contained in:
parent
47dcbf2ce9
commit
88c1aa8292
@ -1020,6 +1020,9 @@ qcms_profile* qcms_profile_from_memory(const void *mem, size_t size)
|
||||
source.size = size;
|
||||
source.valid = true;
|
||||
|
||||
if (size < 4)
|
||||
return INVALID_PROFILE;
|
||||
|
||||
length = read_u32(src, 0);
|
||||
if (length <= size) {
|
||||
// shrink the area that we can read if appropriate
|
||||
|
Loading…
Reference in New Issue
Block a user