[patch] net/p5-RPC-XML loop detection bug
Anton Berezin
tobez at tobez.org
Tue Apr 23 08:52:48 UTC 2013
On Tue, Apr 23, 2013 at 10:35:45AM +0200, Dag-Erling Smørgrav wrote:
> The hash serializing code in RPC::XML tries to detect and prevent loops,
> but what it actually does is detect and prevent repetitions. The
> easiest way to reproduce this is to try to serialize a hash containing
> two DateTime objects representing the same time, because DateTime
> objects are singletons.
>
> I've submitted a patch upstream and received a positive response, but it
> hasn't appeared on github and there is no sign of a new release. I'd
> like to commit the following patch to net/p5-RPC-XML:
Approved with perl@ hat on. :-)
Cheers,
\Anton.
> Index: net/p5-RPC-XML/Makefile
> ===================================================================
> --- net/p5-RPC-XML/Makefile (revision 316245)
> +++ net/p5-RPC-XML/Makefile (working copy)
> @@ -7,6 +7,7 @@
>
> PORTNAME= RPC-XML
> PORTVERSION= 0.77
> +PORTREVISION= 1
> CATEGORIES= net www perl5
> MASTER_SITES= CPAN
> PKGNAMEPREFIX= p5-
> Index: net/p5-RPC-XML/files/patch-lib-RPC-XML.pm
> ===================================================================
> --- net/p5-RPC-XML/files/patch-lib-RPC-XML.pm (revision 0)
> +++ net/p5-RPC-XML/files/patch-lib-RPC-XML.pm (working copy)
> @@ -0,0 +1,10 @@
> +--- lib/RPC/XML.pm.orig 2011-08-22 11:29:30.000000000 +0200
> ++++ lib/RPC/XML.pm 2013-04-23 10:28:19.780990362 +0200
> +@@ -258,6 +258,7 @@
> + $type = reftype $_;
> + die "Un-convertable reference: $type, cannot use\n";
> + }
> ++ $seenrefs->{$_}--;
> + }
> + # You have to check ints first, because they match the
> + # next pattern (for doubles) too
>
> Property changes on: net/p5-RPC-XML/files/patch-lib-RPC-XML.pm
> ___________________________________________________________________
> Added: fbsd:nokeywords
> ## -0,0 +1 ##
> +yes
> \ No newline at end of property
>
> DES
> --
> Dag-Erling Smørgrav - des at des.no
> _______________________________________________
> freebsd-perl at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-perl
> To unsubscribe, send any mail to "freebsd-perl-unsubscribe at freebsd.org"
--
Our society can survive even a large amount of irrational regulation.
-- John McCarthy
More information about the freebsd-perl
mailing list