[patch] cifs: writing past the end of the array
Shirish Pargaonkar
shirishpargaonkar at gmail.com
Sun Mar 6 07:56:29 MST 2011
On Sun, Mar 6, 2011 at 7:26 AM, Dan Carpenter <error27 at gmail.com> wrote:
> This is a cut and paste error. p16 only has 16 chars, not 21.
>
> Signed-off-by: Dan Carpenter <error27 at gmail.com>
>
> 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);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Looks correct.
Reviewed-by: Shirish Pargaonkar <shirishpargaonkar at gmail.com>
More information about the samba-technical
mailing list