aboutsummaryrefslogtreecommitdiff
path: root/src/record.c
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-21 17:09:31 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-21 17:09:31 +0200
commit08c48ad70641ffff389288dcaaa08aad8851cc1a (patch)
tree97ba6e91c8f423468e3bf0c453b1de72703664de /src/record.c
parent51da994a563fd4746410f3b093fa7acb4fde3a20 (diff)
downloaddns-08c48ad70641ffff389288dcaaa08aad8851cc1a.tar.gz
TODOs
Diffstat (limited to 'src/record.c')
-rw-r--r--src/record.c8
1 files changed, 6 insertions, 2 deletions
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 )