summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_clocksource.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2010-07-14 18:06:21 +0000
committerjhb <jhb@FreeBSD.org>2010-07-14 18:06:21 +0000
commita0d408c63351bc900651b657c43df9b4ac732fff (patch)
tree276a560949e1d689f1271e3e8164e20ca00b9a3a /sys/kern/kern_clocksource.c
parente9cdf3df8ed64e88d892e58c59e301608b294879 (diff)
downloadFreeBSD-src-a0d408c63351bc900651b657c43df9b4ac732fff.zip
FreeBSD-src-a0d408c63351bc900651b657c43df9b4ac732fff.tar.gz
Rework the SMBIOS table walker to make it operate like other table walkers
and remove a buffer overflow: - Remove the array of per-type dispatch functions. Instead, pass each structure to a single callback. The callback should check the type of each table entry to take appropriate action. This matches the behavior of other table walkers such as for the MP Table and MADT. - Don't attempt to save an array of string pointers for each structure entry. Instead, just skip the strings. If this code is reused to provide a generic SMBIOS table walker in the future we could provide a method that looks up a specific string N for a given structure record instead of pre-populating an array of pointers. This fixes a buffer overflow for structure entries with more than 20 strings. PR: kern/148546 Reported by: Spencer Minear @ McAfee MFC after: 3 days
Diffstat (limited to 'sys/kern/kern_clocksource.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud