]> git.pld-linux.org Git - packages/syslog-ng.git/commit
- fix breakegae on 32 bit archs
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 9 May 2020 09:46:27 +0000 (11:46 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 9 May 2020 09:46:27 +0000 (11:46 +0200)
commitcfdb710fe427336170cffe803614e04923229eab
tree2c9fb4296d4c1043b1b1f84539163f15cb55e76a
parent6e2c60c97342e7f075fdc08ef646f9bd20c47ef2
- fix breakegae on 32 bit archs

logsource.c: substracting signed from unsigned will result in an unsigned
    value that cannot be smaller than 0

test_window_size_counter.c: this test should have NEVER worked,
    window_size_counter always strips highest bit from the value.
    It passed by accident on 64 bit, because the cast was narrowing
    type from long (64 bit) to int (32 bit) (both long and int are 32
    bit on 32 bit archs).

On a side note, the whole syslog-ng code is super brittle. It's mixing
signed and unsigned in arithmetics, mixing differently sized integers
all over the place. It's just an accident waiting to happen.
32bit.patch [new file with mode: 0644]
syslog-ng.spec
This page took 0.13346 seconds and 4 git commands to generate.