Module Name:    src
Committed By:   christos
Date:           Thu Jun 27 17:07:51 UTC 2019

Modified Files:
        src/sys/kern: kern_exec.c

Log Message:
Return an error if the path was too long. Pointed out by maxv


To generate a diff of this commit:
cvs rdiff -u -r1.474 -r1.475 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.474 src/sys/kern/kern_exec.c:1.475
--- src/sys/kern/kern_exec.c:1.474	Wed Jun 26 16:28:59 2019
+++ src/sys/kern/kern_exec.c	Thu Jun 27 13:07:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.474 2019/06/26 20:28:59 maxv Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.475 2019/06/27 17:07:51 christos 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.474 2019/06/26 20:28:59 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.475 2019/06/27 17:07:51 christos Exp $");
 
 #include "opt_exec.h"
 #include "opt_execfmt.h"
@@ -640,7 +640,7 @@ exec_makepathbuf(struct lwp *l, const ch
 
 	len++;
 	if (len + 1 >= MAXPATHLEN)
-		goto out;
+		goto err;
 	bp = path + MAXPATHLEN - len;
 	memmove(bp, path, len);
 	*(--bp) = '/';

Reply via email to