Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci don't print using string pointer one off the end...



details:   https://anonhg.NetBSD.org/src/rev/3ae731951363
branches:  trunk
changeset: 477088:3ae731951363
user:      cgd <cgd%NetBSD.org@localhost>
date:      Sun Oct 10 18:52:03 1999 +0000

description:
don't print using string pointer one off the end of the eso_rev2model
array.  pointed out by Kouichi Hashikawa in PR#8601.

diffstat:

 sys/dev/pci/eso.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 64f9cda55add -r 3ae731951363 sys/dev/pci/eso.c
--- a/sys/dev/pci/eso.c Sun Oct 10 18:49:15 1999 +0000
+++ b/sys/dev/pci/eso.c Sun Oct 10 18:52:03 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: eso.c,v 1.8 1999/09/28 13:57:45 kleink Exp $   */
+/*     $NetBSD: eso.c,v 1.9 1999/10/10 18:52:03 cgd Exp $      */
 
 /*
  * Copyright (c) 1999 Klaus J. Klein
@@ -210,7 +210,7 @@
        sc->sc_revision = PCI_REVISION(pa->pa_class);
 
        printf(": ESS Solo-1 PCI AudioDrive ");
-       if (sc->sc_revision <=
+       if (sc->sc_revision <
            sizeof (eso_rev2model) / sizeof (eso_rev2model[0]))
                printf("%s\n", eso_rev2model[sc->sc_revision]);
        else
@@ -858,7 +858,7 @@
        strncpy(retp->name, "ESS Solo-1", sizeof (retp->name));
        snprintf(retp->version, sizeof (retp->version), "0x%02x",
            sc->sc_revision);
-       if (sc->sc_revision <=
+       if (sc->sc_revision <
            sizeof (eso_rev2model) / sizeof (eso_rev2model[0]))
                strncpy(retp->config, eso_rev2model[sc->sc_revision],
                    sizeof (retp->config));



Home | Main Index | Thread Index | Old Index