Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst PR 55045: strlcpy(NULL, ..., 0) considered ...



details:   https://anonhg.NetBSD.org/src/rev/f89dc502ff8e
branches:  trunk
changeset: 1007911:f89dc502ff8e
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Mar 04 11:15:06 2020 +0000

description:
PR 55045: strlcpy(NULL, ..., 0) considered harmfull in some implementations.

diffstat:

 usr.sbin/sysinst/main.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r e6c378d54c14 -r f89dc502ff8e usr.sbin/sysinst/main.c
--- a/usr.sbin/sysinst/main.c   Wed Mar 04 04:58:52 2020 +0000
+++ b/usr.sbin/sysinst/main.c   Wed Mar 04 11:15:06 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.22 2020/02/19 21:51:21 martin Exp $ */
+/*     $NetBSD: main.c,v 1.23 2020/03/04 11:15:06 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -144,6 +144,8 @@
        memset(pm_new, 0, sizeof *pm_new);
 
        for (arg = fflagopts; arg->name != NULL; arg++) {
+               if (arg->var == NULL)
+                       continue;
                if (arg->var == cdrom_dev)
                        get_default_cdrom(arg->var, arg->size);
                else



Home | Main Index | Thread Index | Old Index