esp-nimble-cpp icon indicating copy to clipboard operation
esp-nimble-cpp copied to clipboard

Initialize ble_gatt_chr_def[]. Fixes #148

Open holdersn opened this issue 1 year ago • 1 comments

IDF 5.2 introduced a new member, cpfd, to the ble_gatt_chr_def struct. It needs to be initialized to nullptr in order to avoid accessing uninitialized memory. By initializing the whole struct, we get everything initialized in a backward-compatible way.

holdersn avatar Mar 26 '24 15:03 holdersn

I've tested this change with both, IDF 5.2.1 and IDF 4.4.5

holdersn avatar Mar 26 '24 15:03 holdersn

Thanks!

h2zero avatar Apr 06 '24 16:04 h2zero

This fixes a crash for me too.

Staars avatar Apr 07 '24 06:04 Staars

Any progress?

Pagliacii avatar Apr 15 '24 02:04 Pagliacii