[RESEND][PATCH] gadget: f_thor: fix wrong file size cast

2021-01-20 Thread Seung-Woo Kim
Casting 32bit int value directly into 64bit unsigned type causes wrong value for file size equal or larger than 2GB. Fix the wrong file size by casting uint32_t first. Fixes: commit 1fe9ae76b113 ("gadget: f_thor: update to support more than 4GB file as thor 5.0") Reported-by: Junghoon Kim

Re: [PATCH] gadget: f_thor: fix wrong file size cast

2020-10-18 Thread Jaehoon Chung
On 10/16/20 4:29 PM, Seung-Woo Kim wrote: > Casting 32bit int value directly into 64bit unsigned type causes > wrong value for file size equal or larger than 2GB. Fix the wrong > file size by casting uint32_t first. > > Fixes: commit 1fe9ae76b113 ("gadget: f_thor: update to support more than 4GB

[PATCH] gadget: f_thor: fix wrong file size cast

2020-10-16 Thread Seung-Woo Kim
Casting 32bit int value directly into 64bit unsigned type causes wrong value for file size equal or larger than 2GB. Fix the wrong file size by casting uint32_t first. Fixes: commit 1fe9ae76b113 ("gadget: f_thor: update to support more than 4GB file as thor 5.0") Reported-by: Junghoon Kim