summaryrefslogtreecommitdiff
path: root/lang/perl5/patches/patch-ah
blob: fee5640feeb2fe35938fb6f6b505b2742f1a70b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- perl.c.orig	2010-05-21 14:41:18.000000000 +0000
+++ perl.c	2010-05-21 14:44:01.000000000 +0000
@@ -1414,8 +1414,10 @@
        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(sv,buf,len);
     }
     else {