]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cifs: change bleft in decode_unicode_ssetup back to signed type
authorJeff Layton <jlayton@redhat.com>
Wed, 27 Apr 2011 17:25:51 +0000 (13:25 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 21 May 2011 22:13:01 +0000 (15:13 -0700)
commit96bea36718ae2f617dbbab2587acd6c7c0c9d3df
tree6c8197941ba24373450b9605c4503eff173e263d
parent678562e527fd9979f1765ffa1eb34738fc174425
cifs: change bleft in decode_unicode_ssetup back to signed type

commit bfacf2225a955bea9c41c707fc72ba16009674a0 upstream.

The buffer length checks in this function depend on this value being a
signed data type, but 690c522fa converted it to an unsigned type.

Also, eliminate a problem with the null termination check in the same
function. cifs_strndup_from_ucs handles that situation correctly
already, and the existing check could potentially lead to a buffer
overrun since it increments bleft without checking to see whether it
falls off the end of the buffer.

Reported-and-Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/cifs/sess.c