File: 0002-once-we-have-a-phrase-do-not-backtrack-through-it.patch

package info (click to toggle)
libemail-address-perl 1.895-1%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 452 kB
  • sloc: perl: 276; makefile: 9
file content (20 lines) | stat: -rw-r--r-- 658 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
From 43bc3ea102cc41f4b20da4c1a0c73db6fac2b457 Mon Sep 17 00:00:00 2001
From: Ricardo Signes <rjbs@cpan.org>
Date: Sat, 14 Jun 2014 00:10:39 -0400
Subject: [PATCH 2/8] once we have a phrase, do not backtrack through it

---
 lib/Email/Address.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/lib/Email/Address.pm
+++ b/lib/Email/Address.pm
@@ -141,7 +141,7 @@ following comment.
 
 $addr_spec  = qr/$local_part\@$domain/;
 $angle_addr = qr/$cfws*<$addr_spec>$cfws*/;
-$name_addr  = qr/$display_name?$angle_addr/;
+$name_addr  = qr/(?>$display_name?)$angle_addr/;
 $mailbox    = qr/(?:$name_addr|$addr_spec)$comment*/;
 
 sub _PHRASE   () { 0 }