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)