-
Notifications
You must be signed in to change notification settings - Fork 673
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 infinite loop when using characters from unicode supplementary pl… #828
Conversation
Hi @Ratio2 , Thank you for the PR. There are a couple of changes in your PR probably not all related to the issue. |
…anes ('🔈' for example)
@Liryna Make cleanup as you requested. |
Hi @Ratio2 , I have tried to reproduce your issue with a small sample outside dokan_fuse and could not reproduce the infinite loop.
Am I doing something different ? |
@Liryna I reproduce bug in encfs bundle: https://github.com/jetwhiz/encfs4win/releases/download/v1.10.1/encfs-installer.exe, but bug in dokan itself. |
Hi @jetwhiz, Do you have any knowledge about such issue ? |
@Liryna Bug occured when we convert utf-16 to utf-8. We got 4 bytes, but with invalid value. When we decode this utf-8, only 2 bytes consumed instead 4, second 2 bytes return error with negative result and str len increased (negative cast to big number => undefined behavior) instead reducing. |
Do you have sample data (src buffer) that I could use to reproduce ? |
@Liryna I don't report this issue to encfs team. Just find problem and fix it in dokan ;) |
@Liryna Sorry, my test was bad, i fixed it:
|
@Liryna One more simple test:
|
Thank you very much @Ratio2 ! 🏆 I am not the author of the dokan_fuse. I was wondering if you understood why the author used the condition |
@Liryna |
@Liryna Condition |
Thank you @Ratio2 this explanation is very helpful 👍 |
I wonder if this is related to the issue regarding Thai characters eating up 100% CPU resources? jetwhiz/encfs4win#94 Do Thai characters fall into this category? |
Hi @jetwhiz http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=%E0%B8%8B%E0%B9%88&mode=char |
…anes ('🔈' for example)
Fixes # .
Checklist
Changes proposed in this pull request: