File: uninitialzed-value.patch

package info (click to toggle)
libtext-header-perl 1.03%2Bpristine-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 100 kB
  • ctags: 6
  • sloc: perl: 81; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 825 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;