From 8f7e30fc8b6c4132bf9738ef2679e9f4a14f1cd2 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Sat, 8 Nov 2014 12:26:36 -0600 Subject: [PATCH] Use prefix 9 instead of 1 to get the executable path, to avoid a length limitation. --- libbb/get.exec.path.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libbb/get.exec.path.c b/libbb/get.exec.path.c index a6bed3a04..3dc1ae1b4 100644 --- a/libbb/get.exec.path.c +++ b/libbb/get.exec.path.c @@ -19,7 +19,7 @@ char *get_exec_path(void); #include #include -/* Prefix 1 is set to the directory containing the executable at launch. +/* Prefix 9 is set to the directory containing the executable at launch. * We append the result of a GetName call to this to get the full pathname. */ char *get_exec_path(void) { @@ -32,7 +32,7 @@ char *get_exec_path(void) { if (prefix == NULL) return NULL; prefixRec.pCount = 2; - prefixRec.prefixNum = 1; /* Info for prefix 1 */ + prefixRec.prefixNum = 9; /* Info for prefix 9 */ prefixRec.buffer.getPrefix = prefix; prefix->bufSize = sizeof(ResultBuf255);