svn commit: r210604 - head/sys/dev/ipmi
John Baldwin
jhb at FreeBSD.org
Thu Jul 29 13:46:37 UTC 2010
Author: jhb
Date: Thu Jul 29 13:46:37 2010
New Revision: 210604
URL: http://svn.freebsd.org/changeset/base/210604
Log:
Fix test for double-nul characters that terminate the string table at
the end of each SMBIOS/DMI structure.
Submitted by: Dmitrij Tejblum @ yandex.ru
MFC after: 3 days
Modified:
head/sys/dev/ipmi/ipmi_smbios.c
Modified: head/sys/dev/ipmi/ipmi_smbios.c
==============================================================================
--- head/sys/dev/ipmi/ipmi_smbios.c Thu Jul 29 13:34:40 2010 (r210603)
+++ head/sys/dev/ipmi/ipmi_smbios.c Thu Jul 29 13:46:37 2010 (r210604)
@@ -189,7 +189,7 @@ smbios_walk_table(uint8_t *p, int entrie
* formatted area of this structure.
*/
p += s->length;
- while (p[0] != 0 && p[1] != 0)
+ while (!(p[0] == 0 && p[1] == 0))
p++;
/*
More information about the svn-src-all
mailing list