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

littlefs: Fix positive seek bounds checking #5782

Merged
merged 1 commit into from
Jan 8, 2018

Conversation

geky
Copy link
Contributor

@geky geky commented Jan 4, 2018

This bug was a result of an annoying corner case around intermingling signed and unsigned offsets. The boundary check that prevents seeking a file to a position before the file was preventing valid seeks with
positive offsets.

This corner case is a bit more complicated than it looks because the offset is signed, while the size of the file is unsigned. Simply casting both to signed or unsigned offsets won't handle large files.

from littlefs-project/littlefs#4
note: intended for patch

This bug was a result of an annoying corner case around intermingling
signed and unsigned offsets. The boundary check that prevents seeking
a file to a position before the file was preventing valid seeks with
positive offsets.

This corner case is a bit more complicated than it looks because the
offset is signed, while the size of the file is unsigned. Simply
casting both to signed or unsigned offsets won't handle large files.
@geky geky changed the title Fix positive seek bounds checking littlefs: Fix positive seek bounds checking Jan 4, 2018
@0xc0170
Copy link
Contributor

0xc0170 commented Jan 4, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jan 4, 2018

Build : SUCCESS

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

Triggering tests

/morph test
/morph uvisor-test
/morph export-build

@mbed-ci
Copy link

mbed-ci commented Jan 4, 2018

@studavekar
Copy link
Contributor

/morph test

@mbed-ci
Copy link

mbed-ci commented Jan 4, 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.

None yet

5 participants