summaryrefslogtreecommitdiffhomepage
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/inet_common.c3
-rw-r--r--libbb/obscure.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/libbb/inet_common.c b/libbb/inet_common.c
index 207720e96..7208db9ea 100644
--- a/libbb/inet_common.c
+++ b/libbb/inet_common.c
@@ -175,7 +175,8 @@ int FAST_FUNC INET6_resolve(const char *name, struct sockaddr_in6 *sin6)
return -1;
}
memcpy(sin6, ai->ai_addr, sizeof(*sin6));
- freeaddrinfo(ai);
+ if (ai)
+ freeaddrinfo(ai);
return 0;
}
diff --git a/libbb/obscure.c b/libbb/obscure.c
index dd8cd319a..9ecc1f672 100644
--- a/libbb/obscure.c
+++ b/libbb/obscure.c
@@ -109,10 +109,12 @@ static const char *obscure_msg(const char *old_p, const char *new_p, const struc
if (string_checker(new_p, pw->pw_name)) {
return "similar to username";
}
+#ifndef __BIONIC__
/* no gecos as-is, as sub-string, reversed, capitalized, doubled */
if (pw->pw_gecos[0] && string_checker(new_p, pw->pw_gecos)) {
return "similar to gecos";
}
+#endif
/* hostname as-is, as sub-string, reversed, capitalized, doubled */
hostname = safe_gethostname();
i = string_checker(new_p, hostname);