From 08c48ad70641ffff389288dcaaa08aad8851cc1a Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Tue, 21 Sep 2021 17:09:31 +0200 Subject: TODOs --- src/record.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/record.c') diff --git a/src/record.c b/src/record.c index 22b350f..e323718 100644 --- a/src/record.c +++ b/src/record.c @@ -128,7 +128,11 @@ static ssize_t record_rdata_qname(char* _str, void** _rdata) { return -1; } - *_rdata = malloc(qlen); + /* + * TODO Some funny business is going on around here + * Related to fqdn_to_qname() + */ + *_rdata = malloc(qlen+1); if ( !*_rdata ) return -1; @@ -215,7 +219,7 @@ uint16_t record_type_from_str(char* _str) { ssize_t record_rdata_from_str(void** _rdata, char *_str, uint16_t _rdtype) { uint16_t index; - if ( _rdtype >= record_types_len ) + if ( _rdtype > record_types_len ) return -1; if ( !_rdata || !_str ) -- cgit v1.2.3