diff options
Diffstat (limited to 'addrtoname.c')
-rw-r--r-- | addrtoname.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addrtoname.c b/addrtoname.c index d77f27b..c92870d 100644 --- a/addrtoname.c +++ b/addrtoname.c @@ -381,6 +381,9 @@ lookup_bytestring(register const u_char *bs, const unsigned int nlen) tp->e_addr2 = k; tp->e_bs = (u_char *) calloc(1, nlen + 1); + if (tp->e_bs == NULL) + error("lookup_bytestring: calloc"); + memcpy(tp->e_bs, bs, nlen); tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp)); if (tp->e_nxt == NULL) |