提交 bc6a3bd4 编写于 作者: A Alexander Strange 提交者: Anton Khirnov

h264: Fix a possible overread in decode_nal_units()

Signed-off-by: NAnton Khirnov <anton@khirnov.net>
上级 82d05e78
......@@ -3764,7 +3764,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
int err;
if(buf_index >= next_avc) {
if(buf_index >= buf_size) break;
if (buf_index >= buf_size - h->nal_length_size) break;
nalsize = 0;
for(i = 0; i < h->nal_length_size; i++)
nalsize = (nalsize << 8) | buf[buf_index++];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册