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:
1de9317
)
rtpdec_jpeg: Disallow using the reserved q values
author
Martin Storsjö
<martin@martin.st>
Tue, 11 Sep 2012 11:41:42 +0000
(14:41 +0300)
committer
Martin Storsjö
<martin@martin.st>
Wed, 12 Sep 2012 09:10:45 +0000
(12:10 +0300)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtpdec_jpeg.c
patch
|
blob
|
history
diff --git
a/libavformat/rtpdec_jpeg.c
b/libavformat/rtpdec_jpeg.c
index
3f47e71
..
3f53887
100644
(file)
--- a/
libavformat/rtpdec_jpeg.c
+++ b/
libavformat/rtpdec_jpeg.c
@@
-304,6
+304,10
@@
static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg,
qtable_len = jpeg->qtables_len[q - 128];
}
} else { /* q <= 127 */
+ if (q == 0 || q > 99) {
+ av_log(ctx, AV_LOG_ERROR, "Reserved q value %d\n", q);
+ return AVERROR_INVALIDDATA;
+ }
create_default_qtables(new_qtables, q);
qtables = new_qtables;
qtable_len = sizeof(new_qtables);