summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/lpr/lpr/lpr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/lpr/lpr/lpr.c b/usr.sbin/lpr/lpr/lpr.c
index bddf8ee..d1f0d8e 100644
--- a/usr.sbin/lpr/lpr/lpr.c
+++ b/usr.sbin/lpr/lpr/lpr.c
@@ -600,6 +600,7 @@ test(file)
if (cp == file) {
fd = checkwriteperm(file,"/");
} else {
+ path = alloca(strlen(file) + 1);
strcpy(path,file);
*cp = '\0';
fd = checkwriteperm(path,file);
OpenPOWER on IntegriCloud