New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overflow in disk_get_sector_size() #7902

Merged
merged 2 commits into from Oct 11, 2018

Conversation

Projects
None yet
5 participants
@orenc17
Contributor

orenc17 commented Aug 27, 2018

Fix overflow in FAT

disk_get_sector_size() was returning a WORD but could have recieved up to a QWORD from get_erase_size()

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change

@0xc0170 0xc0170 requested a review from ARMmbed/mbed-os-storage Aug 28, 2018

@@ -248,7 +251,7 @@ DRESULT disk_ioctl(BYTE pdrv, BYTE cmd, void *buff)
if (_ffs[pdrv] == NULL) {
return RES_NOTRDY;
} else {
*((WORD*)buff) = disk_get_sector_size(pdrv);
*((DWORD*)buff) = disk_get_sector_size(pdrv);

This comment has been minimized.

@davidsaada

davidsaada Aug 28, 2018

Contributor

Is this not a breaking change?

This comment has been minimized.

@orenc17

orenc17 Aug 28, 2018

Contributor

Restored the original return type

@davidsaada

Looks good.

@davidsaada

This comment has been minimized.

Contributor

davidsaada commented Aug 28, 2018

Note to maintainers: Would ask not to merge this PR before #7774 does.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Sep 20, 2018

Note to maintainers: Would ask not to merge this PR before #7774 does.

Integrated. This needs a rebase now.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 9, 2018

@orenc17 Can you update the pull request as requested previously? Or @davidsaada we cherry pick this and apply on the latest codebase via a new pull request.

@orenc17 orenc17 force-pushed the orenc17:fat_fix branch from dd5cb47 to 9e337bb Oct 10, 2018

@orenc17

This comment has been minimized.

Contributor

orenc17 commented Oct 10, 2018

@0xc0170 rebased on top of master

@cmonr cmonr added needs: CI and removed needs: work labels Oct 10, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 10, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 10, 2018

Build : SUCCESS

Build number : 3312
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7902/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr cmonr merged commit 2b04a02 into ARMmbed:master Oct 11, 2018

15 checks passed

ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed , RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Passed, 653 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 9180 cycles (-1144 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8372B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@cmonr cmonr removed the ready for merge label Oct 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment