Source-Changes-HG archive

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

[src/trunk]: src/sbin/mount make sure options is not NULL before we look in i...



details:   https://anonhg.NetBSD.org/src/rev/3952f31160a2
branches:  trunk
changeset: 536776:3952f31160a2
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Sep 21 21:30:27 2002 +0000

description:
make sure options is not NULL before we look in it. Thanks Charles.

diffstat:

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

diffs (28 lines):

diff -r 448f140e7ef0 -r 3952f31160a2 sbin/mount/mount.c
--- a/sbin/mount/mount.c        Sat Sep 21 21:14:54 2002 +0000
+++ b/sbin/mount/mount.c        Sat Sep 21 21:30:27 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mount.c,v 1.61 2002/09/21 18:43:32 christos Exp $      */
+/*     $NetBSD: mount.c,v 1.62 2002/09/21 21:30:27 christos Exp $      */
 
 /*
  * Copyright (c) 1980, 1989, 1993, 1994
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)mount.c    8.25 (Berkeley) 5/8/95";
 #else
-__RCSID("$NetBSD: mount.c,v 1.61 2002/09/21 18:43:32 christos Exp $");
+__RCSID("$NetBSD: mount.c,v 1.62 2002/09/21 21:30:27 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -448,7 +448,8 @@
                if (optbuf)
                        free(optbuf);
 
-               if (buf || strstr(options, "getargs") != NULL) {
+               if (buf || (options != NULL
+                   && strstr(options, "getargs") != NULL)) {
                        char tbuf[1024], *ptr;
                        int nread;
                        if (buf == NULL) {



Home | Main Index | Thread Index | Old Index