Fix the length check
This commit is contained in:
parent
ef47084e05
commit
0429ea146e
@ -704,8 +704,10 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
|
||||
unsigned int length = samplesize;
|
||||
if (sampletype == 0xBB) {
|
||||
length = PAGESIZE;
|
||||
if (offset + length > size - PAGESIZE)
|
||||
if (offset + length > size - parser->footersize) {
|
||||
ERROR (abstract->context, "Buffer overflow detected!");
|
||||
return DC_STATUS_DATAFORMAT;
|
||||
}
|
||||
}
|
||||
|
||||
// Vendor specific data
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user