Source-Changes-HG archive

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

[src/netbsd-8]: src/usr.sbin/acpitools/acpidump Pull up following revision(s)...



details:   https://anonhg.NetBSD.org/src/rev/01a2cb630c05
branches:  netbsd-8
changeset: 447232:01a2cb630c05
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Jan 03 11:26:42 2019 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #1154):

        usr.sbin/acpitools/acpidump/acpi.c: revision 1.43

  Fix acpi_print_string(). Treat NUL termination correctly to not to print
NUL character. For example, this change prints an OEMID "41 4d 44 00 41 4d"
with "AMD". Tested by Patrick Welche.

diffstat:

 usr.sbin/acpitools/acpidump/acpi.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 422f33d450ea -r 01a2cb630c05 usr.sbin/acpitools/acpidump/acpi.c
--- a/usr.sbin/acpitools/acpidump/acpi.c        Thu Jan 03 11:23:54 2019 +0000
+++ b/usr.sbin/acpitools/acpidump/acpi.c        Thu Jan 03 11:26:42 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.15.8.2 2018/12/04 11:58:10 martin Exp $ */
+/* $NetBSD: acpi.c,v 1.15.8.3 2019/01/03 11:26:42 martin Exp $ */
 
 /*-
  * Copyright (c) 1998 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: acpi.c,v 1.15.8.2 2018/12/04 11:58:10 martin Exp $");
+__RCSID("$NetBSD: acpi.c,v 1.15.8.3 2019/01/03 11:26:42 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/endian.h>
@@ -212,6 +212,8 @@
 
        while (length--) {
                c = *s++;
+               if (c == '\0')
+                       return;
                putchar(c);
        }
 }



Home | Main Index | Thread Index | Old Index