Skip to content

Commit 6a4065e

Browse files
fixup! Add resolving of $PROGRAM_NAME from /dev/fd/<number>
1 parent 6241f02 commit 6a4065e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

perl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4230,8 +4230,8 @@ S_open_script(pTHX_ const char *scriptname, bool dosearch, bool *suidscript)
42304230
else {
42314231
char proc_fd_path[64];
42324232
snprintf(proc_fd_path, sizeof(proc_fd_path), "/proc/self/fd/%d", fdscript);
4233-
char target_path[PATH_MAX];
4234-
ssize_t len = readlink(proc_fd_path, target_path, sizeof(target_path) - 1);
4233+
char target_path[MAXPATHLEN];
4234+
SSize_t len = readlink(proc_fd_path, target_path, sizeof(target_path) - 1);
42354235
if (len != -1) {
42364236
Stat_t statbuf;
42374237
target_path[len] = '\0';

0 commit comments

Comments
 (0)