Bug#512036: calling Data::Dumper->Dump(['a'], 'b') crashes perl interpreter

2009-01-26 Thread Niko Tyni
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 b09a4be6edce50b92b1c65da7aba898fd577 Mon Sep 17 00:00:00 2001
From: Vincent Pit 
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



Bug#512036: calling Data::Dumper->Dump(['a'], 'b') crashes perl interpreter

2009-01-16 Thread Thomas Jahns
Package: perl
Version: 5.10.0-19
Severity: normal

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.

Greetings, Thomas Jahns


-- System Information:
Debian Release: 5.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages perl depends on:
ii  libc6 2.7-18 GNU C Library: Shared libraries
ii  libdb4.6  4.6.21-11  Berkeley v4.6 Database Libraries [
ii  libgdbm3  1.8.3-3GNU dbm database routines (runtime
ii  perl-base 5.10.0-19  minimal Perl system
ii  perl-modules  5.10.0-19  Core Perl modules

Versions of packages perl recommends:
ii  netbase   4.34   Basic TCP/IP networking system

Versions of packages perl suggests:
pn  libterm-readline-gnu-perl | l  (no description available)
ii  perl-doc  5.10.0-19  Perl documentation

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org