mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
fix(bitscrambler): validate and safely load LUT data
Reject LUT loads that exceed the hardware address space and assemble each 32-bit LUT word via memcpy so unaligned and partial inputs do not read past the caller buffer. Add regression tests for oversized and partial unaligned LUT loads.
This commit is contained in:
@@ -89,6 +89,7 @@ esp_err_t bitscrambler_load_program(bitscrambler_handle_t handle, const void *pr
|
||||
* @return
|
||||
* - ESP_OK
|
||||
* - ESP_ERR_INVALID_ARG: Invalid handle or lut pointer
|
||||
* - ESP_ERR_INVALID_SIZE: LUT data exceeds hardware capacity
|
||||
*/
|
||||
esp_err_t bitscrambler_load_lut(bitscrambler_handle_t handle, void *lut, size_t size_bytes);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user