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 <michaelni@gmx.at>2013-08-31 01:14:32 +0400
committerVittorio Giovara <vittorio.giovara@gmail.com>2013-11-28 18:37:55 +0400
commitd1916d13e28b87f4b1b214231149e12e1d536b4b (patch)
tree23f0efa687daffcd9376e6fd7f11b089869b708d /libavcodec/pngdsp.c
parent0673ede985a6560e7efb86dab1c58fb7f95ce587 (diff)
dsputil/pngdsp: fix signed/unsigned type in end comparison
Fixes out of array accesses and integer overflows.
Diffstat (limited to 'libavcodec/pngdsp.c')
-rw-r--r--libavcodec/pngdsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pngdsp.c b/libavcodec/pngdsp.c
index afd9093174..5cc41c4e80 100644
--- a/libavcodec/pngdsp.c
+++ b/libavcodec/pngdsp.c
@@ -31,7 +31,7 @@
static void add_bytes_l2_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w)
{
long i;
- for (i = 0; i <= w - sizeof(long); i += sizeof(long)) {
+ for (i = 0; i <= w - (int)sizeof(long); i += sizeof(long)) {
long a = *(long *)(src1 + i);
long b = *(long *)(src2 + i);
*(long *)(dst + i) = ((a & pb_7f) + (b & pb_7f)) ^ ((a ^ b) & pb_80);