diff options
Diffstat (limited to 'nss')
-rw-r--r-- | nss/digits_dots.c | 3 | ||||
-rw-r--r-- | nss/getXXbyYY.c | 1 | ||||
-rw-r--r-- | nss/nsswitch.c | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/nss/digits_dots.c b/nss/digits_dots.c index dab64bf..29aa5b1 100644 --- a/nss/digits_dots.c +++ b/nss/digits_dots.c @@ -246,8 +246,7 @@ goto done; } - strcpy (hostname, name); - resbuf.h_name = hostname; + resbuf.h_name = strcpy (hostname, name); resbuf.h_aliases = *host_aliases; (*host_aliases)[0] = NULL; (*h_addr_ptrs)[0] = (char *) host_addr; diff --git a/nss/getXXbyYY.c b/nss/getXXbyYY.c index 47df15b..0df916b 100644 --- a/nss/getXXbyYY.c +++ b/nss/getXXbyYY.c @@ -117,6 +117,7 @@ FUNCTION_NAME (ADD_PARAMS) process gets a chance for a normal termination. */ save = errno; free (buffer); + buffer = NULL; __set_errno (save); } buffer = new_buf; diff --git a/nss/nsswitch.c b/nss/nsswitch.c index 18129bb..36c1d00 100644 --- a/nss/nsswitch.c +++ b/nss/nsswitch.c @@ -587,8 +587,7 @@ nss_parse_service_list (const char *line) free (new_service); return result; } - memcpy (source, name, line - name); - source[line - name] = '\0'; + *((char *) __mempcpy (source, name, line - name)) = '\0'; new_service->name = source; } |