From db2a16f414d1766d03c6f3bd8f2042f57e235273 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 22 Nov 2008 22:20:33 +0100 Subject: [PATCH] Ignore NUL character at the end of VPD strings. Broadcom Ethernet controllers have been observed to use NUL-terminated strings. --- ls-vpd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ls-vpd.c b/ls-vpd.c index 413dcfd..f50d7a4 100644 --- a/ls-vpd.c +++ b/ls-vpd.c @@ -52,6 +52,8 @@ print_vpd_string(const byte *buf, word len) byte ch = *buf++; if (ch == '\\') printf("\\\\"); + else if (!ch && !len) + ; /* Cards with null-terminated strings have been observed */ else if (ch < 32 || ch == 127) printf("\\x%02x", ch); else -- 2.39.2