Package: libconfig-simple-perl / 4.59-6

empty_string.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: If the array is empty, we return an empty string.
Origin: vendor
Bug-Debian: http://bugs.debian.org/593043
Bug: https://rt.cpan.org/Ticket/Display.html?id=77642
Forwarded: https://rt.cpan.org/Ticket/Display.html?id=77642
Author: Raphaƫl Hertzog <hertzog@debian.org>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2012-06-05

--- a/Simple.pm
+++ b/Simple.pm
@@ -471,6 +471,7 @@
   }
 
   defined($rv) or return;
+  return "" if scalar(@$rv) == 0;
 
   for ( my $i=0; $i < @$rv; $i++ ) {
     $rv->[$i] =~ s/\\n/\n/g;