OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11827ea
)
avcodec/jpeglsdec: Check get_bits_left() before decoding a picture
author
Michael Niedermayer
<michael@niedermayer.cc>
Tue, 23 May 2017 20:18:52 +0000
(22:18 +0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Wed, 24 May 2017 13:51:11 +0000
(15:51 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/jpeglsdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/jpeglsdec.c
b/libavcodec/jpeglsdec.c
index
c8550e4
..
6450532
100644
(file)
--- a/
libavcodec/jpeglsdec.c
+++ b/
libavcodec/jpeglsdec.c
@@
-390,6
+390,10
@@
int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
av_log(s->avctx, AV_LOG_DEBUG, "JPEG params: ILV=%i Pt=%i BPP=%i, scan = %i\n",
ilv, point_transform, s->bits, s->cur_scan);
}
+ if (get_bits_left(&s->gb) < s->height) {
+ ret = AVERROR_INVALIDDATA;
+ goto end;
+ }
if (ilv == 0) { /* separate planes */
if (s->cur_scan > s->nb_components) {
ret = AVERROR_INVALIDDATA;