config_set_option.
- auth zone http download stores exact copy of downloaded file,
including comments in the file.
+ - Fix sldns parse failure for CDS alternate delete syntax empty hex.
20 April 2018: Wouter
- man page documentation for dns-over-tls forward-addr '#' notation.
size_t i, end=sldns_buffer_limit(buf);
for(i=0; i<end; i++) {
char c = (char)sldns_buffer_read_u8_at(buf, i);
+ if(c == '\n' && i==end-1) {
+ sldns_buffer_write_u8_at(buf, i, 0);
+ sldns_buffer_set_limit(buf, end-1);
+ return;
+ }
if(c == '\n')
sldns_buffer_write_u8_at(buf, i, (uint8_t)' ');
}
return LDNS_WIREPARSE_ERR_OK;
}
+/** see if the string ends, or ends in whitespace */
+static int
+sldns_is_last_of_string(const char* str)
+{
+ if(*str == 0) return 1;
+ while(isspace((unsigned char)*str))
+ str++;
+ if(*str == 0) return 1;
+ return 0;
+}
+
int sldns_str2wire_hex_buf(const char* str, uint8_t* rd, size_t* len)
{
const char* s = str;
s++;
continue;
}
- if(dlen == 0 && *s == '0' && *(s+1) == 0) {
+ if(dlen == 0 && *s == '0' && sldns_is_last_of_string(s+1)) {
*len = 0;
return LDNS_WIREPARSE_ERR_OK;
}