From: Dan Carpenter Date: Mon, 26 Sep 2011 06:30:40 +0000 (+0300) Subject: wl3501_cs: min_t() cast truncates high bits X-Git-Tag: v3.2-rc1~129^2~183^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fb40577b05a869904a8fcf7098d26f3c7809644;p=pandora-kernel.git wl3501_cs: min_t() cast truncates high bits wrqu->encoding.length comes from the network administrator. It's size u16. We want to limit "tocopy" to the smallest value of either "len_keys", "wrqu->encoding.length" or 100. But because .length gets cast from u16 to u8 we might use a random, smaller value than the was desired. It's probably not very serious, but we may as well fix it. Btw, this is from code auditing and not from testing. I don't know if this affects anyone in real life. Signed-off-by: Dan Carpenter Signed-off-by: John W. Linville --- Reading git-diff-tree failed