Closed FGasper closed 2 years ago
Looks similar to #147 … probably just needs a similar fix.
Seen in latest master as well as 1.8.1. We believe it worked before 1.8.0, but I haven’t confirmed.
This fixes it:
diff --git a/rr.c b/rr.c
index 433e61d4..5fc9c733 100644
--- a/rr.c
+++ b/rr.c
@@ -398,7 +398,7 @@ ldns_rr_new_frm_str_internal(ldns_rr **newrr, const char *str,
/* skip spaces */
while (ldns_buffer_position(rd_buf) < ldns_buffer_limit(rd_buf)
- && *(ldns_buffer_current(rd_buf)) == ' '
+ && NULL != strchr( LDNS_PARSE_NO_NL, *(ldns_buffer_current(rd_buf)))
&& !quoted) {
ldns_buffer_skip(rd_buf, 1);
Should probably roll up that NULL != …
stuff into a nice macro.
… when compiled, prints:
The TAB shouldn’t break the NAPTR parse.