diff options
Diffstat (limited to 'ares/ares_expand_name.c')
-rw-r--r-- | ares/ares_expand_name.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ares/ares_expand_name.c b/ares/ares_expand_name.c index 114d0c507..8c5be9b44 100644 --- a/ares/ares_expand_name.c +++ b/ares/ares_expand_name.c @@ -106,6 +106,8 @@ int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf, /* Nuke the trailing period if we wrote one. */ if (q > *s) *(q - 1) = 0; + else + *q = 0; /* zero terminate */ return ARES_SUCCESS; } |