cifs: use memcpy for magic string in cifs signature generation BSRSPYL
authorJeff Layton <jlayton@redhat.com>
Tue, 11 Oct 2011 10:41:32 +0000 (06:41 -0400)
committerSteve French <smfrench@gmail.com>
Thu, 13 Oct 2011 04:41:18 +0000 (23:41 -0500)
...it's more efficient since we know the length.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/cifsencrypt.c

index 30acd22147e19cc9b62acccc5f2ced7dbdbe9a90..12f1c126301313ca9e48ba820be23a4e396aa731 100644 (file)
@@ -92,7 +92,7 @@ int cifs_sign_smb(struct smb_hdr *cifs_pdu, struct TCP_Server_Info *server,
                return rc;
 
        if (!server->session_estab) {
-               strncpy(cifs_pdu->Signature.SecuritySignature, "BSRSPYL", 8);
+               memcpy(cifs_pdu->Signature.SecuritySignature, "BSRSPYL", 8);
                return rc;
        }
 
@@ -189,7 +189,7 @@ int cifs_sign_smb2(struct kvec *iov, int n_vec, struct TCP_Server_Info *server,
                return rc;
 
        if (!server->session_estab) {
-               strncpy(cifs_pdu->Signature.SecuritySignature, "BSRSPYL", 8);
+               memcpy(cifs_pdu->Signature.SecuritySignature, "BSRSPYL", 8);
                return rc;
        }