forwarded 512036 http://rt.perl.org/rt3/Public/Bug/Display.html?id=56766
tag 512036 patch fixed-upstream
thanks

On Fri, Jan 16, 2009 at 05:21:25PM +0100, Thomas Jahns wrote:
> The following script crashes perl reliably
> 
> --8<-----------------------------------------
> #! /usr/bin/perl
> use Data::Dumper ();
> print Data::Dumper->Dump(['a'], 'b');
> --8<-----------------------------------------
> 
> Note the incorrect second parameter (should be an array ref). Still
> this shouldn't bring down the perl interpreter.

This is [perl #56766], fixed upstream with the attached patch.
-- 
Niko Tyni   nt...@debian.org
>From b09a11114be6edce50b92b1c65da7aba898fd577 Mon Sep 17 00:00:00 2001
From: Vincent Pit <p...@profvince.com>
Date: Thu, 10 Jul 2008 20:10:10 +0200
Subject: [PATCH] [perl #56766] [PATCH]
 Message-ID: <48763462.7020...@profvince.com>

p4raw-id: //depot/p...@34163
---
 ext/Data/Dumper/Dumper.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ext/Data/Dumper/Dumper.pm b/ext/Data/Dumper/Dumper.pm
index d1a3a0f..fe1882f 100644
--- a/ext/Data/Dumper/Dumper.pm
+++ b/ext/Data/Dumper/Dumper.pm
@@ -65,7 +65,7 @@ sub new {
 
   croak "Usage:  PACKAGE->new(ARRAYREF, [ARRAYREF])" 
     unless (defined($v) && (ref($v) eq 'ARRAY'));
-  $n = [] unless (defined($n) && (ref($v) eq 'ARRAY'));
+  $n = [] unless (defined($n) && (ref($n) eq 'ARRAY'));
 
   my($s) = { 
              level      => 0,           # current recursive depth
-- 
1.5.6.5

Reply via email to