diff options
author | Ross Zwisler <ross.zwisler@linux.intel.com> | 2018-02-27 10:29:51 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2018-03-06 11:05:37 -0800 |
commit | 9741a559971856fca61a83840b558b4f94500d89 (patch) | |
tree | ab66750172619c8af0d38aeb85e60c6e8bcf84f2 /lib/zstd | |
parent | nfit_test: improve structure offset handling (diff) | |
download | linux-dev-9741a559971856fca61a83840b558b4f94500d89.tar.xz linux-dev-9741a559971856fca61a83840b558b4f94500d89.zip |
nfit_test: fix buffer overrun, add sanity check
It turns out that we were overrunning the 'nfit_buf' buffer in
nfit_test0_setup() in the (t->setup_hotplug == 1) case because we failed to
correctly account for all of the acpi_nfit_memory_map structures.
Fix the structure count which will increase the allocation size of
'nfit_buf' in nfit_test0_alloc(). Also add some WARN_ON()s to
nfit_test0_setup() and nfit_test1_setup() to catch future issues where the
size of the buffer doesn't match the amount of data we're writing.
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'lib/zstd')
0 files changed, 0 insertions, 0 deletions