]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix to check length in ATMA string to wire.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 21 Jan 2025 11:30:30 +0000 (12:30 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 21 Jan 2025 11:30:30 +0000 (12:30 +0100)
doc/Changelog
sldns/str2wire.c

index ad603e3b894b77e5e4d65a6a6cdbd9d69cb4bf58..40e739fe7fe1224d1f81ea4b9d460a390b2ed173 100644 (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
index 1a956c2b9cbde5376f0b58094faef1f31339ce67..b3f5e97984a196b6c60c7fdd6202489294d7550e 100644 (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;