meta-gbmc-staging: entity-manager: Fix OOB read in readFRUContents

In readFRUContents, only copy the actual bytes read by the reader to
prevent leaking stale/uninitialized stack memory. Also handle early EOF
to prevent infinite loops.

TAG=agy
CONV=f4b70096-e101-4613-a40f-d3cf330162cb
no fusion2 link for preEVT
Google-Bug-Id: 517754286
Tested: Built entity-manager successfully with bitbake.
Change-Id: I1cdf70b47e28405e721a7602a90d5eea3ca70f0b
Signed-off-by: Tom Tung <tomtung@google.com>
2 files changed
tree: 586ec7d4c036d28b7bdb9cb446a7de0309cedd4b
  1. classes/
  2. conf/
  3. dynamic-layers/
  4. recipes-bsp/
  5. recipes-connectivity/
  6. recipes-core/
  7. recipes-devtools/
  8. recipes-extended/
  9. recipes-google/
  10. recipes-kernel/
  11. recipes-phosphor/
  12. recipes-support/
  13. recipes-tpm1/
  14. recipes-tpm2/
  15. LICENSE
  16. README.md
README.md

meta-gbmc-staging

This repository contains additions to the openbmc/meta-google layer that are not yet ready for OpenBMC inclusion.

How to use this layer

  1. Clone openbmc/openbmc from GitHub.
  2. Clone this layer from GitHub into a subdirectory of openbmc.