Module Name: src
Committed By: maxv
Date: Thu Jun 27 19:56:10 UTC 2019
Modified Files:
src/sys/kern: kern_exec.c
Log Message:
Fix this fucking shit once and for all, for fuck's sake.
To generate a diff of this commit:
cvs rdiff -u -r1.476 -r1.477 src/sys/kern/kern_exec.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.476 src/sys/kern/kern_exec.c:1.477
--- src/sys/kern/kern_exec.c:1.476 Thu Jun 27 17:09:31 2019
+++ src/sys/kern/kern_exec.c Thu Jun 27 19:56:10 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exec.c,v 1.476 2019/06/27 17:09:31 christos Exp $ */
+/* $NetBSD: kern_exec.c,v 1.477 2019/06/27 19:56:10 maxv Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.476 2019/06/27 17:09:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.477 2019/06/27 19:56:10 maxv Exp $");
#include "opt_exec.h"
#include "opt_execfmt.h"
@@ -639,8 +639,10 @@ exec_makepathbuf(struct lwp *l, const ch
}
len++;
- if (len + 1 >= MAXPATHLEN)
+ if (len + 1 >= MAXPATHLEN) {
+ error = ENAMETOOLONG;
goto err;
+ }
bp = path + MAXPATHLEN - len;
memmove(bp, path, len);
*(--bp) = '/';