Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-18 14:26:53 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-02-18 14:26:53 +0400
commit96008082dbd3a2475ad429b02bf73ba20b4ea9bf (patch)
tree6f441d4c7afbdb359c98dac5d5420ab5f9be4764 /libavcodec
parentc63f9fb37a7b7da03bed6d79115f7f2e36607808 (diff)
parent488f87be873506abb01d67708a67c10a4dd29283 (diff)
Merge commit '488f87be873506abb01d67708a67c10a4dd29283'
* commit '488f87be873506abb01d67708a67c10a4dd29283': roqvideodec: check dimensions validity vqavideo: check chunk sizes before reading chunks qdm2: check array index before use, fix out of array accesses Conflicts: libavcodec/qdm2.c libavcodec/roqvideodec.c libavcodec/vqavideo.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/qdm2.c2
-rw-r--r--libavcodec/roqvideodec.c7
-rw-r--r--libavcodec/vqavideo.c6
3 files changed, 9 insertions, 6 deletions
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index 387a3c6a3b..c0c80a1fe7 100644
--- a/libavcodec/qdm2.c
+++ b/libavcodec/qdm2.c
@@ -1257,7 +1257,7 @@ static void qdm2_decode_super_block (QDM2Context *q)
for (i = 0; packet_bytes > 0; i++) {
int j;
- if (i>=FF_ARRAY_ELEMS(q->sub_packet_list_A)) {
+ if (i >= FF_ARRAY_ELEMS(q->sub_packet_list_A)) {
SAMPLES_NEEDED_2("too many packet bytes");
return;
}
diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c
index c90939df04..6812f9af70 100644
--- a/libavcodec/roqvideodec.c
+++ b/libavcodec/roqvideodec.c
@@ -171,9 +171,10 @@ static av_cold int roq_decode_init(AVCodecContext *avctx)
s->avctx = avctx;
- if (avctx->width%16 || avctx->height%16) {
- av_log_ask_for_sample(avctx, "dimensions not being a multiple of 16 are unsupported\n");
- return AVERROR_PATCHWELCOME;
+ if (avctx->width % 16 || avctx->height % 16) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Dimensions must be a multiple of 16\n");
+ return AVERROR_PATCHWELCOME;
}
s->width = avctx->width;
diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index e89d4d1fcf..43b3aaf57c 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -538,7 +538,8 @@ static int vqa_decode_chunk(VqaContext *s)
chunk_size = bytestream2_get_be32(&s->gb);
if (chunk_size > MAX_CODEBOOK_SIZE - s->next_codebook_buffer_index) {
- av_log(s->avctx, AV_LOG_ERROR, "cbp0 chunk too large (0x%X bytes)\n", chunk_size);
+ av_log(s->avctx, AV_LOG_ERROR, "cbp0 chunk too large (%u bytes)\n",
+ chunk_size);
return AVERROR_INVALIDDATA;
}
@@ -566,7 +567,8 @@ static int vqa_decode_chunk(VqaContext *s)
chunk_size = bytestream2_get_be32(&s->gb);
if (chunk_size > MAX_CODEBOOK_SIZE - s->next_codebook_buffer_index) {
- av_log(s->avctx, AV_LOG_ERROR, "cbpz chunk too large (0x%X bytes)\n", chunk_size);
+ av_log(s->avctx, AV_LOG_ERROR, "cbpz chunk too large (%u bytes)\n",
+ chunk_size);
return AVERROR_INVALIDDATA;
}