KKopyscinski opened a new pull request, #1739:
URL: https://github.com/apache/mynewt-nimble/pull/1739

   acad_len in ble_ll_sync_rx_pkt_in is filled in ble_ll_sync_parse_ext_hdr and 
later accessed in ble_ll_sync_check_acad. There is a possibility that extended 
advertising header is missing data containing acad, and it will not get filled, 
leaving it uninitialised.
   
   This fixes compilation warning:
   ```
   Error: In function 'ble_ll_sync_check_acad',
       inlined from 'ble_ll_sync_rx_pkt_in' at 
repos/apache-mynewt-nimble/nimble/controller/src/ble_ll_sync.c:1207:18:
   repos/apache-mynewt-nimble/nimble/controller/src/ble_ll_sync.c:1064:21: 
error: 'acad_len' may be used uninitialized [-Werror=maybe-uninitialized]
    1064 |     while (acad_len > 2) {
         |            ~~~~~~~~~^~~
   repos/apache-mynewt-nimble/nimble/controller/src/ble_ll_sync.c: In function 
'ble_ll_sync_rx_pkt_in':
   repos/apache-mynewt-nimble/nimble/controller/src/ble_ll_sync.c:1139:13: 
note: 'acad_len' was declared here
    1139 |     uint8_t acad_len;
         |             ^~~~~~~~
   cc1: all warnings being treated as errors
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to