diff mbox

cifs: writing past the end of the array

Message ID 20110306132621.GN3416@bicker (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter March 6, 2011, 1:26 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/cifs/smbencrypt.c b/fs/cifs/smbencrypt.c
index 3967635..1525d5e 100644
--- a/fs/cifs/smbencrypt.c
+++ b/fs/cifs/smbencrypt.c
@@ -353,7 +353,7 @@  SMBNTencrypt(unsigned char *passwd, unsigned char *c8, unsigned char *p24)
 	int rc;
 	unsigned char p16[16], p21[21];
 
-	memset(p16, '\0', 21);
+	memset(p16, '\0', 16);
 	memset(p21, '\0', 21);
 
 	rc = E_md4hash(passwd, p16);