Browse Source

rtpdec_jpeg: Disallow using the reserved q values

Signed-off-by: Martin Storsjö <martin@martin.st>
tags/n1.0
Martin Storsjö 13 years ago
parent
commit
1743938df1
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavformat/rtpdec_jpeg.c

+ 4
- 0
libavformat/rtpdec_jpeg.c View File

@@ -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);


Loading…
Cancel
Save