[git commit] nslookup: fix output corruption for "nslookup 1.2.3.4"
Denys Vlasenko
vda.linux at googlemail.com
Sat Apr 14 21:18:34 UTC 2018
commit: https://git.busybox.net/busybox/commit/?id=4e73c0f659738f141583bbf92b3df5346d5fb3c0
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
function old new delta
nslookup_main 1832 1837 +5
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
networking/nslookup.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/networking/nslookup.c b/networking/nslookup.c
index feeec15aa..92e07e8b1 100644
--- a/networking/nslookup.c
+++ b/networking/nslookup.c
@@ -797,11 +797,9 @@ int nslookup_main(int argc UNUSED_PARAM, char **argv)
char buf80[80];
ptr = make_ptr(buf80, *argv);
-
if (ptr) {
- add_query(&queries, &n_queries, T_PTR, ptr);
- }
- else {
+ add_query(&queries, &n_queries, T_PTR, xstrdup(ptr));
+ } else {
add_query(&queries, &n_queries, T_A, *argv);
#if ENABLE_FEATURE_IPV6
add_query(&queries, &n_queries, T_AAAA, *argv);
More information about the busybox-cvs
mailing list