cifs/sess.c: Buffer access out-of-bounds
d binderman <[email protected]> Tue, 2 Feb 2010 11:59:27 +0000
| Newsgroups | gmane.linux.file-systems.cifs |
|---|---|
| Message-ID | <[email protected]> |
Hello there, I just ran the sourceforge tool cppcheck over the source code of the new Linux kernel 2.6.33-rc6 It said [./cifs/sess.c:250]: (error) Buffer access out-of-bounds The source code is =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 strncpy(bcc_ptr, ses->userNam= e, 300); but =A0=A0=A0=A0=A0=A0 char userName[MAX_USERNAME_SIZE + 1]; Suggest new code =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 strncpy(bcc_ptr, ses->userNam= e, MAX_USERNAME_SIZE + 1); Regards David Binderman = _________________________________________________________________ Tell us your greatest, weirdest and funniest Hotmail stories http://clk.atdmt.com/UKM/go/195013117/direct/01/