- Fix to check length in ATMA string to wire.

This commit is contained in:
W.C.A. Wijngaards 2025-01-21 12:30:30 +01:00
parent 207ae97ff9
commit 5f58ced71e
2 changed files with 3 additions and 0 deletions

View file

@ -7,6 +7,7 @@
- Fix compile of interface check code when dnscrypt or quic is
disabled.
- Fix encoding of RR type ATMA.
- Fix to check length in ATMA string to wire.
20 January 2025: Yorgos
- Merge #1222: Unique DoT and DoH SSL contexts to allow for different

View file

@ -2559,6 +2559,8 @@ int sldns_str2wire_atma_buf(const char* str, uint8_t* rd, size_t* len)
if(slen > LDNS_MAX_RDFLEN*2)
return LDNS_WIREPARSE_ERR_LABEL_OVERFLOW;
if(*len < 1)
return LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL;
if(*s == 0) {
/* empty string */
rd[0] = 0;