Description: fix warning 'Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Text/Header.pm line 68.'
Origin: vendor
Bug-Debian: https://bugs.debian.org/217791
Author: Nicolas Bertolissio <bertol@debian.org>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2015-09-28
Forwarded: https://rt.cpan.org/Ticket/Display.html?id=107396
Bug: https://rt.cpan.org/Ticket/Display.html?id=107396

--- a/Header.pm
+++ b/Header.pm
@@ -65,7 +65,7 @@
     while (my $line = $lines[$i]) {
 
         # join multiple indented lines per RFC 822
-        $line .= $lines[$i] while ($lines[++$i] =~ /^\s+/);
+        $line .= $lines[$i] while (defined($lines[++$i]) && ($lines[$i] =~ /^\s+/));
 
         # split the two and change the tag to lowercase 
         my($tag, $val) = $line =~ m/([-\w]+)\s*:\s*(.*)/s;
