components/perl/perl520/patches/a2p_buffer.patch
changeset 5524 7c50b6f98812
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/perl/perl520/patches/a2p_buffer.patch	Sun Feb 28 23:58:10 2016 +0100
@@ -0,0 +1,19 @@
+Upstream bug https://rt.cpan.org/Public/Bug/Display.html?id=100361
+
+This problem probably won't be in more recent perl version as the a2p was
+removed fro it's core into external module.
+
+--- perl-5.20.1/x2p/walk.c	2016-02-28 14:47:40.050370036 -0800
++++ perl-5.20.1/x2p/walk.c	2016-02-28 14:38:30.190107484 -0800
+@@ -69,8 +69,10 @@ walk(int useval, int level, int node, in
+ 	if (namelist) {
+ 	    while (isALPHA(*namelist)) {
+ 		for (d = tokenbuf,s=namelist;
+-		  isWORDCHAR(*s);
++		  d - tokenbuf < sizeof(tokenbuf) && isWORDCHAR(*s);
+ 		  *d++ = *s++) ;
++		if (d - tokenbuf == sizeof(tokenbuf))
++		    fatal("Internal error: argument longer than %d: %s", sizeof(tokenbuf) - 1, namelist);
+ 		*d = '\0';
+ 		while (*s && !isALPHA(*s)) s++;
+ 		namelist = s;