Source-Changes-HG archive

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

[src/trunk]: src/sbin/umount Fix previous to avoid using an uninitialized poi...



details:   https://anonhg.NetBSD.org/src/rev/0aa1bf9bc0cf
branches:  trunk
changeset: 346105:0aa1bf9bc0cf
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sun Jun 26 03:51:28 2016 +0000

description:
Fix previous to avoid using an uninitialized pointer when using -R (raw).

diffstat:

 sbin/umount/umount.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r cb7a4214da4d -r 0aa1bf9bc0cf sbin/umount/umount.c
--- a/sbin/umount/umount.c      Sun Jun 26 03:40:39 2016 +0000
+++ b/sbin/umount/umount.c      Sun Jun 26 03:51:28 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: umount.c,v 1.50 2016/06/26 03:40:39 dholland Exp $     */
+/*     $NetBSD: umount.c,v 1.51 2016/06/26 03:51:28 dholland Exp $     */
 
 /*-
  * Copyright (c) 1980, 1989, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)umount.c   8.8 (Berkeley) 5/8/95";
 #else
-__RCSID("$NetBSD: umount.c,v 1.50 2016/06/26 03:40:39 dholland Exp $");
+__RCSID("$NetBSD: umount.c,v 1.51 2016/06/26 03:51:28 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -259,10 +259,9 @@
                if (!namematch(ai))
                        return 1;
 #endif /* ! SMALL */
+               snprintf(umountprog, sizeof(umountprog), "umount_%s", type);
        }
 
-       snprintf(umountprog, sizeof(umountprog), "umount_%s", type);
-
 #ifndef SMALL
        if (verbose) {
                (void)printf("%s: unmount from %s\n", name, mntpt);



Home | Main Index | Thread Index | Old Index