Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mac68k/nubus Fix code to read a string from the nub...



details:   https://anonhg.NetBSD.org/src/rev/67cd2f81f985
branches:  trunk
changeset: 495578:67cd2f81f985
user:      briggs <briggs%NetBSD.org@localhost>
date:      Mon Jul 31 22:39:17 2000 +0000

description:
Fix code to read a string from the nubus board--it was not terminating
the string properly when the string on the board is longer than the
pre-allocated space.

diffstat:

 sys/arch/mac68k/nubus/nubus.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r e64e4798b605 -r 67cd2f81f985 sys/arch/mac68k/nubus/nubus.c
--- a/sys/arch/mac68k/nubus/nubus.c     Mon Jul 31 22:17:05 2000 +0000
+++ b/sys/arch/mac68k/nubus/nubus.c     Mon Jul 31 22:39:17 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nubus.c,v 1.49 2000/06/29 08:15:13 mrg Exp $   */
+/*     $NetBSD: nubus.c,v 1.50 2000/07/31 22:39:17 briggs Exp $        */
 
 /*
  * Copyright (c) 1995, 1996 Allen Briggs.  All rights reserved.
@@ -714,6 +714,7 @@
                        return 1;
                loc = nubus_adjust_ptr(lanes, loc, 1);
        }
+       *(data_return-1) = '\0';
        return 0;
 }
 



Home | Main Index | Thread Index | Old Index