Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 8081
Status: resolved
Priority: 0/
Queue: Encode

People
Owner: DANKOGAI [...] cpan.org
Requestors: bjoern [...] hoehrmann.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.02
Fixed in: (no value)



Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.411 (Entity 5.404)
Subject: decode(..., bless{},'x') segfault
X-RT-Original-Encoding: iso-8859-1
Content-Length: 85
With Encode.pm 2.02 decode('utf-8', bless({},'x')) causes Perl to crash on Win32.
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.411 (Entity 5.404)
X-RT-Original-Encoding: iso-8859-1
Content-Length: 819
Download (untitled) / with headers
text/plain 819b
[BJOERN - Thu Oct 21 13:07:16 2004]: Show quoted text
> With Encode.pm 2.02 > > decode('utf-8', bless({},'x')) > > causes Perl to crash on Win32.
It does crash on Mac OS X, too. The patch below will fix it or you can wait for the next version of Encode. Thank you for your report. Dan the Encode Maintainer --- Encode.pm 2004/10/19 04:54:43 2.5 +++ Encode.pm 2004/10/22 04:48:58 @@ -140,6 +140,7 @@ { my ($name, $string, $check) = @_; return undef unless defined $string; + return undef if ref $string; $check ||=0; my $enc = find_encoding($name); unless(defined $enc){ @@ -155,6 +156,7 @@ { my ($name,$octets,$check) = @_; return undef unless defined $octets; + return undef if ref $octets; $check ||=0; my $enc = find_encoding($name); unless(defined $enc){


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.