From cb23cf75a0c897bf1d99412f6024affccb57f1af Mon Sep 17 00:00:00 2001 From: christos Date: Thu, 13 Apr 2006 03:34:46 +0000 Subject: [PATCH] Coverity CID 1543: Fix buffer off-by-one on error. --- sys/dev/isapnp/isapnpres.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/isapnp/isapnpres.c b/sys/dev/isapnp/isapnpres.c index 64a105a6cff0..25aaefc6b0e0 100644 --- a/sys/dev/isapnp/isapnpres.c +++ b/sys/dev/isapnp/isapnpres.c @@ -1,4 +1,4 @@ -/* $NetBSD: isapnpres.c,v 1.15 2005/12/11 12:22:16 christos Exp $ */ +/* $NetBSD: isapnpres.c,v 1.16 2006/04/13 03:34:46 christos Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: isapnpres.c,v 1.15 2005/12/11 12:22:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isapnpres.c,v 1.16 2006/04/13 03:34:46 christos Exp $"); #include #include @@ -519,7 +519,7 @@ parse: if (len >= ISAPNP_MAX_TAGSIZE) { printf("%s: Maximum tag size exceeded, card %d\n", sc->sc_dev.dv_xname, c + 1); - len = ISAPNP_MAX_TAGSIZE; + len = ISAPNP_MAX_TAGSIZE - 1; if (++warned == 10) goto bad; }