s3: Use strlcpy in pdb_ads_connect
authorVolker Lendecke <vl@samba.org>
Sat, 5 Feb 2011 13:41:52 +0000 (14:41 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 6 Feb 2011 15:44:56 +0000 (16:44 +0100)
source3/passdb/pdb_ads.c

index 01f730eb20fbf872c0f5ea7e6ec7abcd96603c2d..7a299e585477ab5531819ad79cc1d03068ed633d 100644 (file)
@@ -2206,8 +2206,8 @@ static NTSTATUS pdb_ads_connect(struct pdb_ads_state *state,
 
        ZERO_STRUCT(state->socket_address);
        state->socket_address.sun_family = AF_UNIX;
-       strncpy(state->socket_address.sun_path, location,
-               sizeof(state->socket_address.sun_path) - 1);
+       strlcpy(state->socket_address.sun_path, location,
+               sizeof(state->socket_address.sun_path));
 
        ld = pdb_ads_ld(state);
        if (ld == NULL) {