Skip to content
Snippets Groups Projects
Commit 39c5cd60 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

vmnc: check input size before reading chunk header, fix overread


Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent b6165882
No related branches found
No related tags found
No related merge requests found
......@@ -332,6 +332,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
src += 2;
chunks = AV_RB16(src); src += 2;
while(chunks--) {
if(buf_size - (src - buf) < 12) {
av_log(avctx, AV_LOG_ERROR, "Premature end of data!\n");
return -1;
}
dx = AV_RB16(src); src += 2;
dy = AV_RB16(src); src += 2;
w = AV_RB16(src); src += 2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment