Module Name: src Committed By: mlelstv Date: Sat Jun 6 09:18:55 UTC 2009
Modified Files: src/sbin/atactl: atactl.c Log Message: make space for a trailing \0 in model,revision and serial buffers. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sbin/atactl/atactl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/atactl/atactl.c diff -u src/sbin/atactl/atactl.c:1.53 src/sbin/atactl/atactl.c:1.54 --- src/sbin/atactl/atactl.c:1.53 Mon Mar 16 12:52:32 2009 +++ src/sbin/atactl/atactl.c Sat Jun 6 09:18:55 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: atactl.c,v 1.53 2009/03/16 12:52:32 lukem Exp $ */ +/* $NetBSD: atactl.c,v 1.54 2009/06/06 09:18:55 mlelstv Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: atactl.c,v 1.53 2009/03/16 12:52:32 lukem Exp $"); +__RCSID("$NetBSD: atactl.c,v 1.54 2009/06/06 09:18:55 mlelstv Exp $"); #endif @@ -856,9 +856,9 @@ device_identify(int argc, char *argv[]) { struct ataparams *inqbuf; - char model[sizeof(inqbuf->atap_model)]; - char revision[sizeof(inqbuf->atap_revision)]; - char serial[sizeof(inqbuf->atap_serial)]; + char model[sizeof(inqbuf->atap_model)+1]; + char revision[sizeof(inqbuf->atap_revision)+1]; + char serial[sizeof(inqbuf->atap_serial)+1]; int needswap = 0; /* No arguments. */