* \return ldns_rdf*
*/
ldns_rdf *
-ldns_rdf_new_frm_str(ldns_rdf_type type, const char *str)
+ldns_rdf_new_frm_str(ldns_rdf_type type, const char *str_in)
{
ldns_rdf *rdf;
ldns_status status;
+ char *str;
+
+ (void)ldns_unquote(str_in, &str);
switch (type) {
case LDNS_RDF_TYPE_DNAME:
ldns_rr_type rr_type;
ldns_buffer *rr_buf;
ldns_buffer *rd_buf;
- char *unquoted;
char *owner;
char *ttl;
char *clas;
char *rd;
ldns_rdf *r;
- size_t unquoted_len;
uint16_t r_cnt;
uint16_t r_min;
uint16_t r_max;
new = ldns_rr_new();
- unquoted_len = ldns_unquote((char *)str, &unquoted);
owner = XMALLOC(char, MAX_DOMAINLEN + 1);
ttl = XMALLOC(char, 21);
rd = XMALLOC(char, MAX_RDFLEN);
r_cnt = 0;
- ldns_buffer_new_frm_data(rr_buf, unquoted, unquoted_len);
+ ldns_buffer_new_frm_data(rr_buf, str, strlen(str));
/* split the rr in its parts -1 signal trouble */
if (ldns_bget_token(rr_buf, owner, "\t ", MAX_DOMAINLEN) == -1) {