]> ruderich.org/simon Gitweb - blhc/blhc.git/commitdiff
fix false positive in `rm` lines
authorSimon Ruderich <simon@ruderich.org>
Tue, 15 Sep 2015 08:28:49 +0000 (10:28 +0200)
committerSimon Ruderich <simon@ruderich.org>
Tue, 15 Sep 2015 08:39:19 +0000 (10:39 +0200)
Fixes Debian Bug #772853 reported by Jakub Wilk.

NEWS
bin/blhc
t/logs/false-positives

diff --git a/NEWS b/NEWS
index 818a4fccc3c0072fa9f579ded919ad26f43960e3..223de68b6ddd3afd26cdc7f973e783406841f465 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@ Version 0.XX
   #784959), reported by Raphaël Hertzog.
 - Fix false positive with `gcc -v` (Debian Bug #765756), reported by Andreas
   Beckmann.
   #784959), reported by Raphaël Hertzog.
 - Fix false positive with `gcc -v` (Debian Bug #765756), reported by Andreas
   Beckmann.
+- Fix false positive in `rm` lines (Debian Bug #772853), reported by Jakub
+  Wilk.
 
 
 Version 0.05
 
 
 Version 0.05
index cc4f44bb723a2fc6c2321b08a84ce4c3f23a2cac..4be8e84bfdccba8ff7d165bee13244d0c48286c2 100755 (executable)
--- a/bin/blhc
+++ b/bin/blhc
@@ -952,6 +952,10 @@ foreach my $file (@ARGV) {
             # contains them.
             next if $line =~ m{^\s+/usr/lib/gcc/$cc_regex_full_prefix/
                                    [0-9.]+/cc1(?:plus)?}xo;
             # contains them.
             next if $line =~ m{^\s+/usr/lib/gcc/$cc_regex_full_prefix/
                                    [0-9.]+/cc1(?:plus)?}xo;
+            # Ignore false positive with `rm` which may remove files which
+            # look like a compiler executable thus causing the line to be
+            # treated as a normal compiler line.
+            next if $line =~ m{^\s*rm\s+};
 
             # Check if additional hardening options were used. Used to ensure
             # they are used for the complete build.
 
             # Check if additional hardening options were used. Used to ensure
             # they are used for the complete build.
index b0ac298d77cf05d611656cc1ad810fa917ca21c6..8ef70d61ef5326829e28fe3dc4505827ae3b6d4b 100644 (file)
@@ -6,6 +6,8 @@ swig -Wall -c++ -python test.i
 
 + CC=gcc CFLAGS=-g -O2 ... sh ../../build.sh -r -c lto
 
 
 + CC=gcc CFLAGS=-g -O2 ... sh ../../build.sh -r -c lto
 
+rm -f afl-gcc afl-as afl-fuzz afl-showmap as afl-g++ afl-clang afl-clang++ *.o *~ a.out core core.[1-9][0-9]* *.stackdump test .test test-instr .test-instr0 .test-instr1
+
 # gcc -v can cause false positives.
 cd GUI && qmake
 /usr/bin/make -C GUI
 # gcc -v can cause false positives.
 cd GUI && qmake
 /usr/bin/make -C GUI