avcodec/xfacedec: fix order of operations

Fixes #6745.
This commit is contained in:
Paul B Mahol 2018-12-13 23:44:39 +01:00
parent 0ed678a97a
commit 8c9fff6183
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ static int xface_decode_frame(AVCodecContext *avctx,
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
return ret; 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]; c = avpkt->data[i];
/* ignore invalid digits */ /* ignore invalid digits */