[FFmpeg-cvslog] rtpdec_jpeg: Disallow using the reserved q values
Martin Storsjö
git at videolan.org
Thu Sep 13 15:29:01 CEST 2012
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Tue Sep 11 14:41:42 2012 +0300| [1743938df10dd888484f964d5af8fd3957d26809] | committer: Martin Storsjö
rtpdec_jpeg: Disallow using the reserved q values
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1743938df10dd888484f964d5af8fd3957d26809
---
libavformat/rtpdec_jpeg.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c
index 3f47e71..3f53887 100644
--- 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);
More information about the ffmpeg-cvslog
mailing list