diff --git a/flawfinder b/flawfinder index f0ba461..9d370c0 100755 --- a/flawfinder +++ b/flawfinder @@ -1300,7 +1300,10 @@ def process_c_file(f, patch_infos): if m: i = m.end(0) - c = text[i] + if i >= len(text): + c = '' + else: + c = text[i] if linebegin: # If at beginning of line, see if #include is there. linebegin = 0 if c == "#": codeinline = 1 # A directive, count as code. @@ -1436,9 +1439,9 @@ def display_header(): print "

Flawfinder Results

" print "Here are the security scan results from" print 'Flawfinder version %s,' % version - print '(C) 2001-2004 David A. Wheeler.' + print '(C) 2001-2007 David A. Wheeler.' else: - print "Flawfinder version %s, (C) 2001-2004 David A. Wheeler." % version + print "Flawfinder version %s, (C) 2001-2007 David A. Wheeler." % version displayed_header = 1