PelionIoT / mbed-coap

CoAP C library - Builder and Parser for CoAP messages
Apache License 2.0
29 stars 16 forks source link

Use block size received in packet, not one defined in build #123

Closed ristohuhtala closed 3 years ago

ristohuhtala commented 3 years ago

[x] I confirm this contribution is my own and I agree to license it with Apache 2.0. [x] I confirm the moderators may change the PR before merging it in.

Summary of changes

Calculating block size from received packet, not using build definition. Old implementation could cause hard fault if blockwise PUT is using smaller block size than SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE definition