gentoo-full-overlay/dev-util/flawfinder/files/flawfinder-1.27-whitespace-traceback.patch

17 lines
685 B
Diff

From: Robert Buchholz <rbu@gentoo.org>
Subject: Fix IndexError that occurs when there is whitespace at the end of the file
Origin: vendor, http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/flawfinder/files/flawfinder-1.27-whitespace-traceback.patch
Bug: http://sourceforge.net/tracker/index.php?func=detail&aid=1834743&group_id=186989&atid=919499
--- flawfinder.orig 2009-09-29 13:55:15.433911571 +0200
+++ flawfinder 2009-09-29 13:56:03.114786154 +0200
@@ -1299,6 +1299,8 @@
m = p_whitespace.match(text,i)
if m:
i = m.end(0)
+ if i >= len(text):
+ break
c = text[i]
if linebegin: # If at beginning of line, see if #include is there.