Skip to content

Commit 86736f5

Browse files
committed
avcodec/pngdsp: fix (un)signed type in end comparission
Fixes out of array accesses Fixes Ticket2919 Found_by: ami_stuff Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
1 parent 0b46d6f commit 86736f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libavcodec/pngdsp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
static void add_bytes_l2_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w)
3232
{
3333
long i;
34-
for (i = 0; i <= w - sizeof(long); i += sizeof(long)) {
34+
for (i = 0; i <= w - (int)sizeof(long); i += sizeof(long)) {
3535
long a = *(long *)(src1 + i);
3636
long b = *(long *)(src2 + i);
3737
*(long *)(dst + i) = ((a & pb_7f) + (b & pb_7f)) ^ ((a ^ b) & pb_80);

0 commit comments

Comments
 (0)