large mp4 header handling - release

This commit is contained in:
Philippe G
2020-06-18 23:24:19 -07:00
parent 0db1ac38e4
commit ba75350455
4 changed files with 67 additions and 4 deletions

View File

@@ -292,9 +292,15 @@ static int read_mp4_header(void) {
l->pos += bytes;
l->consume = consume - bytes;
break;
} else {
} else if (len > streambuf->size) {
// can't process an atom larger than streambuf!
LOG_ERROR("atom %s too large for buffer %u %u", type, len, streambuf->size);
return -1;
} else {
// make sure there is 'len' contiguous space
_buf_unwrap(streambuf, len);
break;
}
}
}
return 0;