casaroli opened a new pull request, #20749: URL: https://github.com/apache/nuttx/pull/20749
## Summary `dn_comp()` accepted a domain name with an empty label, for example `"a..b"`, and wrote a 0 length byte in the middle of the encoded name. That byte ends the name, so the rest of the name was lost. This PR makes `dn_comp()` return -1 for an empty label. ## Impact `dn_comp()` now rejects names that it encoded wrongly before. ## Testing A test program calls `dn_comp()` with `"a..b"`: on master it returns a length; with this PR it returns -1. Other names encode as before. Build: `qemu-armv8a:netnsh`. `tools/checkpatch.sh -c -u -m -g` passes. -- 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]
