[roll third_party/pigweed] pw_i2c: Fix invalid copy

Add error checking for copying expected rx data to rx buffer in
MockInitiator to prevent potential seg faults.

Testing:
Create a failed expectation case for reading data.
See the assert instead of seg fault.

Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/49481

third_party/pigweed Rolled-Commits: 88bedd00384aed9..53c2f3e2569d7e5
Roller-URL: https://ci.chromium.org/b/8844144756901006833
Cq-Cl-Tag: roller-builder:pigweed-experimental-roller
Cq-Cl-Tag: roller-bid:8844144756901006833
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I5eed3c6997d361490a37a9f8d4e8c09f5a85e5ad
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/experimental/+/49661
Reviewed-by: Pigweed Integration Roller <pigweed-integration-roller@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Pigweed Integration Roller <pigweed-integration-roller@pigweed.google.com.iam.gserviceaccount.com>
1 file changed
tree: 9660a3ecb7ac7369d55724fdcf706052777b4e0c
  1. .gitattributes
  2. .gitignore
  3. .gitmodules
  4. .gn
  5. BUILD.gn
  6. BUILDCONFIG.gn
  7. PW_PLUGINS
  8. README.md
  9. activate.bat
  10. applications/
  11. banner.txt
  12. bootstrap.bat
  13. bootstrap.sh
  14. build_overrides/
  15. env_setup.json
  16. navbar.md
  17. pw_board_led/
  18. pw_board_led_arduino/
  19. pw_board_led_host/
  20. pw_board_led_stm32cubef4/
  21. pw_board_led_stm32f429i_disc1/
  22. pw_spin_delay/
  23. pw_spin_delay_arduino/
  24. pw_spin_delay_host/
  25. pw_spin_delay_stm32cubef4/
  26. pw_spin_delay_stm32f429i_disc1/
  27. pw_sys_io_stm32cubef4/
  28. targets/
  29. third_party/
  30. tools/
README.md

Pigweed Experimental

This repository contains experimental pigweed modules.

Repository setup

Clone this repo with --recursive to get all required submodules.

git clone --recursive https://pigweed.googlesource.com/pigweed/experimental

This will pull the Pigweed source repository into third_party/pigweed. If you already cloned but forgot to --recursive run git submodule update --init to pull all submodules.