commit | eba238f4d548a7ee770973182922b93ff0a4e88c | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@google.com> | Mon Nov 15 15:25:18 2021 -0800 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Nov 15 23:53:32 2021 +0000 |
tree | a05120af29eb4c42dfffcadba45071435564ad8e | |
parent | 13845149c264a3fa8a46b92c51f906ab50eba32e [diff] |
pw_transfer: Fix undefined behavior in memcpy Passing nullptr to memcpy is undefined behavior, even when copying 0 bytes. Switch to std::copy to avoid this. Fixes: 543 Change-Id: I31139435e8d3860003874ad6c21211d476af6577 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/69060 Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com> Reviewed-by: Ted Pudlik <tpudlik@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/