blob_handler: Add check to avoid OOB memory access

There's a potential for OOB memory access in statGeneric if
sendIpmiPayload returns a small or empty respones. Added a check to guard
against it and added unit tests.

Change-Id: I224cd3cb391c2f8bbde87aec478bf4042fbdfd47
Signed-off-by: Brandon Kim <brandonkim@google.com>
2 files changed
tree: 965e3ca648ecbe466d217c9a6b522c7f4d04892b
  1. src/
  2. test/
  3. .clang-format
  4. .gitignore
  5. .lcovrc
  6. bootstrap.sh
  7. configure.ac
  8. LICENSE
  9. MAINTAINERS
  10. Makefile.am
  11. README.md
README.md

ipmi-blob-tool

ipmi-blob-tool is a host-side tool that speaks the BLOB protocol over IPMI.

Dependencies

Test cases require google{test,mock}, valgrind, and lcov.

Building

For a standard release build, you want something like:

./bootstrap.sh
./configure --disable-tests
make
make install

For a test / debug build, a typical configuration is

./bootstrap.sh
./configure --enable-tests --enable-coverage --enable-valgrind
make
make check
make check-valgrind
make check-code-coverage