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 bug. Read binary content that contains \x00 will break in read_cstring(). #12

Merged
merged 7 commits into from
Sep 2, 2021

Conversation

HugoAhoy
Copy link
Contributor

@HugoAhoy HugoAhoy commented Sep 2, 2021

Add an argument size which is None by default.
If we provide size, libjfs.read_cstring() will read size byte content from BytesIO.
In juicefs.JuiceFS.read(), provide size returned by jfs_read(), to read_cstring(), then the bug is fixed.

@bbtfr
Copy link
Collaborator

bbtfr commented Sep 2, 2021

👍

@bbtfr bbtfr merged commit 4a99014 into megvii-research:main Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants