diff -Nru rsyslog-8.12.0/debian/changelog rsyslog-8.12.0/debian/changelog --- rsyslog-8.12.0/debian/changelog 2015-09-01 08:57:22.000000000 +0200 +++ rsyslog-8.12.0/debian/changelog 2015-09-02 14:43:38.000000000 +0200 @@ -1,3 +1,11 @@ +rsyslog (8.12.0-1ubuntu2) wily; urgency=medium + + * debian/patches/fix-testbench-buffer-overflow-ftbs.patch + - Fix FTBS on i386 and powerpc caused by buffer overflow + detection while running rsyslog testbench. + + -- Louis Bouchard Wed, 02 Sep 2015 14:41:01 +0200 + rsyslog (8.12.0-1ubuntu1) wily; urgency=low * Merge from Debian unstable (LP: #1464201). Remaining changes: diff -Nru rsyslog-8.12.0/debian/patches/fix-testbench-buffer-overflow-ftbs.patch rsyslog-8.12.0/debian/patches/fix-testbench-buffer-overflow-ftbs.patch --- rsyslog-8.12.0/debian/patches/fix-testbench-buffer-overflow-ftbs.patch 1970-01-01 01:00:00.000000000 +0100 +++ rsyslog-8.12.0/debian/patches/fix-testbench-buffer-overflow-ftbs.patch 2015-09-02 14:40:49.000000000 +0200 @@ -0,0 +1,25 @@ +Description: Fix potential buffer overflow detection + On some architectures, calculation of edLen may lead to a + negative value when the value returned by rand() is less + than extraDataLen away from RAND_MAX. The negative value + passed to memset() triggers a glibc error. Forcing the + cast of rand() to be unsigned avoid the return of a negative + value. + +Author: Louis Bouchard +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/rsyslog/+bug/1464201 +Forwarded: https://github.com/rsyslog/rsyslog/issues/506 +--- +Index: rsyslog-8.12.0/tests/tcpflood.c +=================================================================== +--- rsyslog-8.12.0.orig/tests/tcpflood.c 2015-07-08 16:31:07.000000000 +0200 ++++ rsyslog-8.12.0/tests/tcpflood.c 2015-09-02 14:36:56.168433982 +0200 +@@ -398,7 +398,7 @@ + } + } else { + if(bRandomizeExtraData) +- edLen = ((long) rand() + extraDataLen) % extraDataLen + 1; ++ edLen = ((unsigned long) rand() + extraDataLen) % extraDataLen + 1; + else + edLen = extraDataLen; + memset(extraData, 'X', edLen); diff -Nru rsyslog-8.12.0/debian/patches/series rsyslog-8.12.0/debian/patches/series --- rsyslog-8.12.0/debian/patches/series 2015-08-16 18:46:13.000000000 +0200 +++ rsyslog-8.12.0/debian/patches/series 2015-09-02 14:36:29.000000000 +0200 @@ -1,2 +1,3 @@ Don-t-create-a-database.patch Don-t-explicitly-link-tcpflood-against-lgcrypt.patch +fix-testbench-buffer-overflow-ftbs.patch