]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Fix parsing of TAB-separated cstrings.
authorFelipe Gasper <felipe@felipegasper.com>
Thu, 9 Dec 2021 17:02:19 +0000 (12:02 -0500)
committerFelipe Gasper <felipe@felipegasper.com>
Thu, 9 Dec 2021 17:02:19 +0000 (12:02 -0500)
Issue #147

rr.c

diff --git a/rr.c b/rr.c
index c98989a460954e7ef125fc066927c4f89b8dc83d..515e25a3c6254a07044bde0d888f1791a12788c0 100644 (file)
--- a/rr.c
+++ b/rr.c
@@ -365,9 +365,9 @@ ldns_rr_new_frm_str_internal(ldns_rr **newrr, const char *str,
                                desc, r_cnt)) &&
                                ldns_buffer_remaining(rd_buf) > 0){
 
-                       /* skip spaces */
+                       /* skip spaces & tabs */
                        while (ldns_buffer_remaining(rd_buf) > 0 &&
-                               *(ldns_buffer_current(rd_buf)) == ' ') {
+                               NULL != strchr( LDNS_PARSE_NO_NL, *(ldns_buffer_current(rd_buf)) )) {
                                ldns_buffer_skip(rd_buf, 1);
                        }