Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Fix this fucking shit once and for all, for fuck's ...



details:   https://anonhg.NetBSD.org/src/rev/2a8910d352ae
branches:  trunk
changeset: 452330:2a8910d352ae
user:      maxv <maxv%NetBSD.org@localhost>
date:      Thu Jun 27 19:56:10 2019 +0000

description:
Fix this fucking shit once and for all, for fuck's sake.

diffstat:

 sys/kern/kern_exec.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r a5600c54b473 -r 2a8910d352ae sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c      Thu Jun 27 17:09:31 2019 +0000
+++ b/sys/kern/kern_exec.c      Thu Jun 27 19:56:10 2019 +0000
@@ -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 @@
        }
 
        len++;
-       if (len + 1 >= MAXPATHLEN)
+       if (len + 1 >= MAXPATHLEN) {
+               error = ENAMETOOLONG;
                goto err;
+       }
        bp = path + MAXPATHLEN - len;
        memmove(bp, path, len);
        *(--bp) = '/';



Home | Main Index | Thread Index | Old Index