Skip to content
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
Merged

Conversation

orenc17
Copy link
Contributor

@orenc17 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 a team August 28, 2018 06:58
@@ -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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not a breaking change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored the original return type

Copy link
Contributor

@davidsaada davidsaada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@davidsaada
Copy link
Contributor

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

@0xc0170
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor Author

orenc17 commented Oct 10, 2018

@0xc0170 rebased on top of master

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 10, 2018

/morph build

@mbed-ci
Copy link

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
Copy link

mbed-ci commented Oct 10, 2018

@mbed-ci
Copy link

mbed-ci commented Oct 11, 2018

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

Successfully merging this pull request may close these issues.

5 participants