[linux-cifs-client] cifs/sess.c: Buffer access out-of-bounds

d binderman dcb314 at hotmail.com
Tue Feb 2 05:15:24 MST 2010



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

                strncpy(bcc_ptr, ses->userName, 300);

but

       char userName[MAX_USERNAME_SIZE + 1];

Suggest new code

                strncpy(bcc_ptr, ses->userName, 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/


More information about the linux-cifs-client mailing list