From: Tim Gardner Date: Fri, 10 Feb 2012 00:19:52 +0000 (-0600) Subject: rtlwifi: rtl8192se firmware load can overflow target buffer X-Git-Tag: v3.4-rc1~177^2~108^2~39^2~105 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fccdcf5091eaaa0d7582bedbc035163b40714b9;p=pandora-kernel.git rtlwifi: rtl8192se firmware load can overflow target buffer Define RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE which represents the maximimum possible firmware file size. Use it in the definition of the buffer which receives the firmware file data. Set RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE closer to the actual size of the firmware file, e.g., 90000 (down from hard coded 164000). The current size of rtlwifi/rtl8192sefw.bin is 88856. Set max_fw_size to RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE for the size limit check. Fix the error case where max_fw_size is not cleared if the size limit check fails. Cc: Chaoming Li Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Tim Gardner Signed-off-by: Larry Finger Signed-off-by: John W. Linville --- Reading git-diff-tree failed