Date: Thu, 29 Jul 2010 13:46:37 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r210604 - head/sys/dev/ipmi Message-ID: <201007291346.o6TDkbF5056762@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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++; /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007291346.o6TDkbF5056762>