Browse Source

avcodec/pixlet: Reorder rlen check

This changes nothing but is nicer looking as this checks rlen

Maybe this helps coverity remove CID1397743

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.4
Michael Niedermayer 8 years ago
parent
commit
c94d551ea7
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/pixlet.c

+ 1
- 1
libavcodec/pixlet.c View File

@@ -173,7 +173,7 @@ static int read_low_coeffs(AVCodecContext *avctx, int16_t *dst, int size, int wi
}
}

if (i + rlen > size)
if (rlen > size - i)
return AVERROR_INVALIDDATA;
i += rlen;



Loading…
Cancel
Save