Skip Menu |

This queue is for tickets about the Data-Serializer CPAN distribution.

Report information
The Basics
Id: 63259
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Data-Serializer

People
Owner: neil [...] neely.cx
Requestors: neil.whelchel [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.49
Fixed in: (no value)



Subject: Wrong secret or corrupted data causes perl error in JSON.
When a wrong secret, or the data is corrupted deserialize will call the actual deserializer with an undef argument. This causes perl to exit with an error. This issue might be specific to JSON, I have only done limited testing with other serializers, and so far JSON is the only one to show this problem, so I am not sure if the patch should be applied to the serializer stub or farther back. This patch fixes this problem with JSON: --- JSON.pm.old Thu Apr 16 07:39:39 2009 +++ JSON.pm Tue Nov 23 00:24:07 2010 @@ -13,7 +13,7 @@ } sub deserialize { - return JSON->VERSION < 2 ? JSON->new->jsonToObj($_[1]) : JSON->new->decode($_[1]); + $_[1] and return JSON->VERSION < 2 ? JSON->new->jsonToObj($_[1]) : JSON->new->decode($_[1]); } 1; -Neil-
Applied your patch - uploaded as 0.51