File: 03-750357-unnamed-users.patch

package info (click to toggle)
libmailtools-perl 2.13-1~bpo70%2B1
  • links: PTS
  • area: main
  • in suites: wheezy-backports
  • size: 416 kB
  • sloc: perl: 2,213; makefile: 50
file content (21 lines) | stat: -rw-r--r-- 850 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Guilhem Moulin <guilhem@guilhem.org>
Subject: Re: Bug#750357: caff: Perl warning when sending mail
Date: Fri, 6 Jun 2014 22:16:13 +0200

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750357

(split /,/, $name)[0] is undefined when $name is the empty string.

Index: libmailtools-perl-2.13/lib/Mail/Internet.pm
===================================================================
--- libmailtools-perl-2.13.orig/lib/Mail/Internet.pm
+++ libmailtools-perl-2.13/lib/Mail/Internet.pm
@@ -535,7 +535,7 @@ sub cleaned_header_dup()
     # seperated fields, only the first of which should be used to prevent
     # accidental exposure of system-local information like phone numbers/
     # room numbers.
-    $name = (split /,/, $name)[0];
+    $name = (split /,/, $name)[0] if $name ne "";
 
     if($name =~ /[^\w\s]/)
     {   $name =~ s/"/\"/g;