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;
|
unsigned int length = samplesize;
|
||||||
if (sampletype == 0xBB) {
|
if (sampletype == 0xBB) {
|
||||||
length = PAGESIZE;
|
length = PAGESIZE;
|
||||||
if (offset + length > size - PAGESIZE)
|
if (offset + length > size - parser->footersize) {
|
||||||
|
ERROR (abstract->context, "Buffer overflow detected!");
|
||||||
return DC_STATUS_DATAFORMAT;
|
return DC_STATUS_DATAFORMAT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vendor specific data
|
// Vendor specific data
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user