[FFmpeg-devel] [PATCH 4/7] xfacedec: Fix possible overread
Mark Thompson
sw at jkqxz.net
Wed Oct 18 01:11:56 EEST 2017
Fixes #6745.
---
libavcodec/xfacedec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/xfacedec.c b/libavcodec/xfacedec.c
index d045cb6ef4..ab4c0823f5 100644
--- a/libavcodec/xfacedec.c
+++ b/libavcodec/xfacedec.c
@@ -123,7 +123,7 @@ static int xface_decode_frame(AVCodecContext *avctx,
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
return ret;
- for (i = 0, k = 0; avpkt->data[i] && i < avpkt->size; i++) {
+ for (i = 0, k = 0; i < avpkt->size && avpkt->data[i]; i++) {
c = avpkt->data[i];
/* ignore invalid digits */
--
2.11.0
More information about the ffmpeg-devel
mailing list