summaryrefslogtreecommitdiff
path: root/libavcodec/vp9.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-05-02 00:18:04 +0200
committerLuca Barbato <lu_zero@gentoo.org>2014-05-03 18:25:17 +0200
commit925c37874b617816b6f460c6f229c18b46548b46 (patch)
treeb3d5769706d16fc11fd5fd9d3d335346f9c9db79 /libavcodec/vp9.c
parenta90d92ce2aeea8eaae5c616958d20e000e20b964 (diff)
vp9: Read the frame size as unsigned
Sample-Id: 00001723-google Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec/vp9.c')
-rw-r--r--libavcodec/vp9.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index c04a3b8fc3..2a6a138aa1 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -1198,7 +1198,7 @@ static int vp9_decode_packet(AVCodecContext *avctx, void *frame,
const uint8_t *idx = data + size + 1 - idx_sz;
while (n_frames--) {
- int sz = AV_RL32(idx);
+ unsigned sz = AV_RL32(idx);
if (nbytes < 4)
sz &= (1 << (8 * nbytes)) - 1;
@@ -1206,7 +1206,7 @@ static int vp9_decode_packet(AVCodecContext *avctx, void *frame,
if (sz > size) {
av_log(avctx, AV_LOG_ERROR,
- "Superframe packet size too big: %d > %d\n",
+ "Superframe packet size too big: %u > %d\n",
sz, size);
return AVERROR_INVALIDDATA;
}