Thread (5 messages) 5 messages, 3 authors, 2011-03-08
STALE5623d

[patch] cifs: writing past the end of the array

From: Dan Carpenter <hidden>
Date: 2011-03-06 13:26:21
Also in: linux-cifs
Subsystem: filesystems (vfs and infrastructure), the rest · Maintainers: Alexander Viro, Christian Brauner, Linus Torvalds

This is a cut and paste error.  p16 only has 16 chars, not 21.

Signed-off-by: Dan Carpenter <redacted>
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);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help