aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--resolv/res_query.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/resolv/res_query.c b/resolv/res_query.c
index 75b0e5f..5d0a68d 100644
--- a/resolv/res_query.c
+++ b/resolv/res_query.c
@@ -610,7 +610,9 @@ __res_context_querydomain (struct resolv_context *ctx,
RES_SET_H_ERRNO(statp, NO_RECOVERY);
return (-1);
}
- sprintf(nbuf, "%s.%s", name, domain);
+ char *p = __stpcpy (nbuf, name);
+ *p++ = '.';
+ strcpy (p, domain);
}
return __res_context_query (ctx, longname, class, type, answer,
anslen, answerp, answerp2, nanswerp2,