Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-04-08 04:34:45 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-04-10 14:11:15 +0300
commitc94d551ea7b39c4e467e146cd347c407e8eb38ee (patch)
tree64d25514a49ac40c83fe2afffa4c47c1cd84ef63 /libavcodec/pixlet.c
parent8dd0c12648d838bb982ca10f384ee1f0107dfece (diff)
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>
Diffstat (limited to 'libavcodec/pixlet.c')
-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;