Benjamin Valentin d4aa8aad10 nanocoap: validate input with NDEBUG
A malformed or malicious CoAP request may contain invalid field lengths.
`nanocoap` protects with this by using `assert()`, which safely crashes
the application in debug mode.

In release mode the check is removed.

Instead of allowing arbitrary memory writes, return 0 on invalid inputs.

Discovered by [Coverity](https://scan3.coverity.com/reports.htm#v46910/p10250/fileInstanceId=38357789&defectInstanceId=9793779&mergedDefectId=297306)
2020-08-11 15:54:23 +02:00
..
2020-07-14 21:26:19 +05:30
2020-07-29 11:57:52 +02:00
2018-03-06 14:00:32 +01:00
2019-11-23 22:39:38 +01:00
2020-02-18 13:20:05 +01:00
2020-06-24 18:36:42 +02:00
2018-06-11 19:12:02 +02:00
2015-08-30 14:00:33 +02:00