about summary refs log tree commit diff
path: root/nss/nsswitch.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/nsswitch.c')
-rw-r--r--nss/nsswitch.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index 18129bb5c0..36c1d0035e 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;
 	}