summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhali <khali>2011-11-18 14:53:58 +0000
committerkhali <khali>2011-11-18 14:53:58 +0000
commit685fd0e6661c50abb37ba2bee42930629f834c5c (patch)
treed08b56235ffc0deadb07ec3df0951a297d2e9b6f
parent6c46f8efc842b488a4bc2b5b9f13395669050f57 (diff)
downloaddmidecode-685fd0e6661c50abb37ba2bee42930629f834c5c.tar.gz
dmidecode.c: Properly print the hexadecimal value of invalid string
characters.
-rw-r--r--CHANGELOG5
-rw-r--r--dmidecode.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 563dc7a..c85dec4 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,8 @@
+2011-11-18 Jean Delvare <khali@linux-fr.org>
+
+ * dmidecode.c: Properly print the hexadecimal value of invalid
+ string characters.
+
2011-11-14 Anton Arapov <anton@redhat.com>
* dmidecode.c: Make dmi_chassis_type aware of the lock bit.
diff --git a/dmidecode.c b/dmidecode.c
index a702e5b..ce324a1 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -197,7 +197,7 @@ static void dmi_dump(const struct dmi_header *h, const char *prefix)
printf("%s\t", prefix);
for (j = 0; j < 16 && j < l - (row << 4); j++)
printf("%s%02X", j ? " " : "",
- s[(row << 4) + j]);
+ (unsigned char)s[(row << 4) + j]);
printf("\n");
}
/* String isn't filtered yet so do it now */