[PATCH 2/3] UBUNTU: git-ubuntu-log -- tighten up Bug: NNNN matching

Andy Whitcroft apw at canonical.com
Wed Feb 10 12:23:46 UTC 2010


We are currently miss-matching lines such as the following as Bug:
number links:

    BUG: unable to handle kernel NULL pointer dereference at (null)

Ensure that lines only contain numbers, hashes (#), commas (,) and
spaces.

Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
 debian/scripts/misc/git-ubuntu-log |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/scripts/misc/git-ubuntu-log b/debian/scripts/misc/git-ubuntu-log
index 2ac19bc..ab4b7d6 100755
--- a/debian/scripts/misc/git-ubuntu-log
+++ b/debian/scripts/misc/git-ubuntu-log
@@ -189,8 +189,8 @@ sub changelog_input {
 			}
 			while (<STDIN>) {
 				$ignore  =  1 if ($do_ignore && /^ *Ignore: yes/i);
-				if    (/^ *Bug: *(#|)(.*)/i) {
-					foreach $k (split('(,|)*\s*#', $2)) {
+				if    (/^ *Bug: *(#|)([0-9#,\s]*)\s*$/i) {
+					foreach $k (split('(,|\s)\s*(#|)', $2)) {
 						$bugz{$k} = 1 if (($k ne '') and ($k =~ /[0-9]+/));
 					}
 				}
-- 
1.6.3.3





More information about the kernel-team mailing list