mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
lzw: check for overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a63c813797
commit
44c4170c52
@ -190,6 +190,10 @@ int ff_lzw_decode(LZWState *p, uint8_t *buf, int len){
|
||||
if ((--l) == 0)
|
||||
goto the_end;
|
||||
}
|
||||
if (s->ebuf < s->pbuf) {
|
||||
av_log(0, AV_LOG_ERROR, "lzw overread\n");
|
||||
goto the_end;
|
||||
}
|
||||
c = lzw_get_code(s);
|
||||
if (c == s->end_code) {
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user