aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-04-08 03:34:45 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-04-11 23:39:21 +0200
commitc30d0ace656dfa1dbe7a6e14f72a68a36762167d (patch)
treea404f0f51b3bb7e8f9e0a1d4f52c5e94796f7c2f
parent0c188bc595c1ebcfaf3e0314df1cad30446851d2 (diff)
downloadffmpeg-c30d0ace656dfa1dbe7a6e14f72a68a36762167d.tar.gz
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> (cherry picked from commit c94d551ea7b39c4e467e146cd347c407e8eb38ee) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/pixlet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pixlet.c b/libavcodec/pixlet.c
index 4aa59f8f33..c4f7597866 100644
--- a/libavcodec/pixlet.c
+++ b/libavcodec/pixlet.c
@@ -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;