diff options
author | Denys Vlasenko | 2018-04-14 23:18:34 +0200 |
---|---|---|
committer | Denys Vlasenko | 2018-04-14 23:18:34 +0200 |
commit | 4e73c0f659738f141583bbf92b3df5346d5fb3c0 (patch) | |
tree | 47b9ac19cf8292f8ac792d797d2100c3ed167bc5 /networking | |
parent | cf950cd3eae0c8d1f711163ea1d99d5891f4f392 (diff) | |
download | busybox-4e73c0f659738f141583bbf92b3df5346d5fb3c0.zip busybox-4e73c0f659738f141583bbf92b3df5346d5fb3c0.tar.gz |
nslookup: fix output corruption for "nslookup 1.2.3.4"
function old new delta
nslookup_main 1832 1837 +5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/nslookup.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/networking/nslookup.c b/networking/nslookup.c index feeec15..92e07e8 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); |