You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "casaroli (via GitHub)" <gi...@apache.org> on 2026/10/17 21:16:36 UTC

[PR] libs/libc/netdb: Reject empty labels in dn_comp(). [nuttx]

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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] libs/libc/netdb: Reject empty labels in dn_comp(). [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis merged PR #20749:
URL: https://github.com/apache/nuttx/pull/20749


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] libs/libc/netdb: Reject empty labels in dn_comp(). [nuttx]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20749:
URL: https://github.com/apache/nuttx/pull/20749#issuecomment-6241320869

   <!-- membrowse-pr-comment -->
   ## <img src="https://membrowse.com/membrowse-logo.svg" height="24" align="top"> MemBrowse Memory Report
   
   *No memory changes detected for:*
   - [arduino-mega2560](https://membrowse.com/public/apache/nuttx/target/arduino-mega2560/compare?head=9ace28e76dfb1a46d8a926f3589ffa2c46596ef6&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
   - [esp32-devkitc](https://membrowse.com/public/apache/nuttx/target/esp32-devkitc/compare?head=9ace28e76dfb1a46d8a926f3589ffa2c46596ef6&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
   - [hifive1-revb](https://membrowse.com/public/apache/nuttx/target/hifive1-revb/compare?head=9ace28e76dfb1a46d8a926f3589ffa2c46596ef6&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
   - [mirtoo](https://membrowse.com/public/apache/nuttx/target/mirtoo/compare?head=9ace28e76dfb1a46d8a926f3589ffa2c46596ef6&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
   - [qemu-armv8a](https://membrowse.com/public/apache/nuttx/target/qemu-armv8a/compare?head=9ace28e76dfb1a46d8a926f3589ffa2c46596ef6&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
   - [qemu-intel64](https://membrowse.com/public/apache/nuttx/target/qemu-intel64/compare?head=9ace28e76dfb1a46d8a926f3589ffa2c46596ef6&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
   - [rx65n-rsk2mb](https://membrowse.com/public/apache/nuttx/target/rx65n-rsk2mb/compare?head=9ace28e76dfb1a46d8a926f3589ffa2c46596ef6&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
   - [s698pm-dkit](https://membrowse.com/public/apache/nuttx/target/s698pm-dkit/compare?head=9ace28e76dfb1a46d8a926f3589ffa2c46596ef6&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
   - [stm32-nucleo-f103rb](https://membrowse.com/public/apache/nuttx/target/stm32-nucleo-f103rb/compare?head=9ace28e76dfb1a46d8a926f3589ffa2c46596ef6&base=d2ce23c49ebfdd9f5ed541a08493eb62c1aa20a5)
   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org