diff options
| author | Bin Meng <bmeng.cn@gmail.com> | 2017-09-27 21:50:07 -0700 |
|---|---|---|
| committer | Marek Vasut <marex@denx.de> | 2017-10-01 16:32:55 +0200 |
| commit | 72ac8f3fc29016a31ee309b4d025b487e78906ab (patch) | |
| tree | c9d2599b699a9f9ff57581b4a70322d591289755 /scripts | |
| parent | fae35857e1c38776854442f59d6b56c17e93fc39 (diff) | |
| download | u-boot-72ac8f3fc29016a31ee309b4d025b487e78906ab.tar.gz u-boot-72ac8f3fc29016a31ee309b4d025b487e78906ab.tar.xz u-boot-72ac8f3fc29016a31ee309b4d025b487e78906ab.zip | |
usb: storage: Fix overwritten in usb_stor_set_max_xfer_blk()
The stored 'blk' value is overwritten to 'size / 512' before it can
be used in usb_stor_set_max_xfer_blk(). This is not what we want.
In fact, when 'size' exceeds the upper limit (USHRT_MAX * 512), we
should simply assign 'size' to the upper limit.
Reported-by: Coverity (CID: 167250)
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
