mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
beeef5f8a6
This commit validates that the Channel Mask TLVs in a TMF Energy Scan request are non-zero. Additionally, this commit clamps the Count TLV value to the valid range (1, 2, and 3) as required by the Thread specification. The `test_otci` is updated to use count 3 (previously 4). An Energy Scan request with a zero `Channel Mask` is invalid and can cause the device to start a scan that takes a long time or never completes. This change rejects such requests, preventing the device from getting stuck. This was discovered by fuzzer test.