OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
avcodec/dxv: Check remaining bytes in dxv_decompress_raw()
[android-x86/external-ffmpeg.git]
/
libavcodec
/
dxv.c
diff --git
a/libavcodec/dxv.c
b/libavcodec/dxv.c
index
4b1c2d2
..
6f3c075
100644
(file)
--- a/
libavcodec/dxv.c
+++ b/
libavcodec/dxv.c
@@
-335,6
+335,9
@@
static int dxv_decompress_raw(AVCodecContext *avctx)
DXVContext *ctx = avctx->priv_data;
GetByteContext *gbc = &ctx->gbc;
+ if (bytestream2_get_bytes_left(gbc) < ctx->tex_size)
+ return AVERROR_INVALIDDATA;
+
bytestream2_get_buffer(gbc, ctx->tex_data, ctx->tex_size);
return 0;
}