diff mbox

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

Message ID 1265804627-21720-3-git-send-email-apw@canonical.com
State Accepted
Delegated to: Stefan Bader
Headers show

Commit Message

Andy Whitcroft Feb. 10, 2010, 12:23 p.m. UTC
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@canonical.com>
---
 debian/scripts/misc/git-ubuntu-log |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

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]+/));
 					}
 				}