Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/kdump Prevent "kdump" from causing a segmentation fa...
details: https://anonhg.NetBSD.org/src/rev/614249451236
branches: trunk
changeset: 485375:614249451236
user: tron <tron%NetBSD.org@localhost>
date: Wed Apr 26 16:05:37 2000 +0000
description:
Prevent "kdump" from causing a segmentation fault if the io buffer that
it's printing to stdout ends on a page boundary. Patch supplied by
Andrew Brown in PR bin/9983.
diffstat:
usr.bin/kdump/kdump.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 9991b82496a5 -r 614249451236 usr.bin/kdump/kdump.c
--- a/usr.bin/kdump/kdump.c Wed Apr 26 15:58:01 2000 +0000
+++ b/usr.bin/kdump/kdump.c Wed Apr 26 16:05:37 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kdump.c,v 1.28 2000/04/10 09:13:45 jdolecek Exp $ */
+/* $NetBSD: kdump.c,v 1.29 2000/04/26 16:05:37 tron Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)kdump.c 8.4 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: kdump.c,v 1.28 2000/04/10 09:13:45 jdolecek Exp $");
+__RCSID("$NetBSD: kdump.c,v 1.29 2000/04/26 16:05:37 tron Exp $");
#endif
#endif /* not lint */
@@ -470,7 +470,7 @@
(void)printf(" \"");
col = 8;
for (; datalen > 0; datalen--, dp++) {
- (void) vis(visbuf, *dp, VIS_CSTYLE, *(dp+1));
+ (void) vis(visbuf, *dp, VIS_CSTYLE, datalen>1?*(dp+1):0);
cp = visbuf;
/*
* Keep track of printables and
Home |
Main Index |
Thread Index |
Old Index