Files
pkgsrc-ng/lang/perl5/patches/patch-ah
2016-01-21 23:40:00 +01:00

19 lines
726 B
Plaintext

$NetBSD: patch-ah,v 1.15 2014/05/29 07:57:07 adam Exp $
NetBSD's implementation sometimes returns "/"; reject that too.
--- caretx.c.orig 2014-05-29 07:34:48.000000000 +0000
+++ caretx.c
@@ -117,8 +117,10 @@ Perl_set_caret_X(pTHX) {
to the executable (or returning an error from the readlink). Any
valid path has a '/' in it somewhere, so use that to validate the
result. See http://www.freebsd.org/cgi/query-pr.cgi?pr=35703
+
+ NetBSD's implementation sometimes returns "/"; reject that too.
*/
- if (len > 0 && memchr(buf, '/', len)) {
+ if (len > 1 && memchr(buf, '/', len)) {
sv_setpvn(caret_x, buf, len);
return;
}