aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/f_mtp.c
Commit message (Collapse)AuthorAgeFilesLines
* usb: replace %p with %pKManu Gautam2018-11-271-9/+9
| | | | | | | | | | | | | | | Format specifier %p can leak kernel addresses while not valuing the kptr_restrict system settings. When kptr_restrict is set to (1), kernel pointers printed using the %pK format specifier will be replaced with 0's. Debugging Note : &pK prints only Zeros as address. If you need actual address information, write 0 to kptr_restrict. echo 0 > /proc/sys/kernel/kptr_restrict CRs-fixed: 1052849 Change-Id: I0e98145730380ea983fa8f46a28d15dd6c2c31df Signed-off-by: Manu Gautam <mgautam@codeaurora.org> Signed-off-by: Yasir Malik <ymalik@codeaurora.org> Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
* ANDROID: usb: gadget: function: Fix Coding StyleAnson Jacob2018-05-161-5/+5
| | | | | | | | | | | Fix warning by checkpatch.pl: Prefer 'unsigned int' to bare use of 'unsigned' Patch applied by running fix inplace capability of checkpatch: checkpatch.pl -f *.[ch] --types UNSPECIFIED_INT --fix-inplace Change-Id: I2ba09a70e3a748ea8440f77d5c8e0349db248d49 Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
* ANDROID: usb: gadget: function: cleanup: Add blank line after declarationAnson Jacob2018-05-161-0/+3
| | | | | | | | Fix warning generated by checkpatch.pl: Missing a blank line after declarations Change-Id: I8c1b069a57f90027edfdb3cd8fa011dfe87e44b7 Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
* ANDROID: usb: gadget: f_mtp: Return error if count is negativeJerry Zhang2017-12-081-0/+10
| | | | | | | | | | | | | | | If the user passes in a negative file size in a int64, this will compare to be smaller than buffer length, and it will get truncated to form a read length that is larger than the buffer length. To fix, return -EINVAL if the count argument is negative, so the loop will never happen. Bug: 37429972 Test: Test with PoC Change-Id: I5d52e38e6fbe2c17eb8c493f9eb81df6cfd780a4 Signed-off-by: Jerry Zhang <zhangjerry@google.com>
* first commitMeizu OpenSource2016-08-151-0/+2299