Fix hang on UTF-16 LE BOM file by chrchr-github · Pull Request #636 · cppcheck-opensource/simplecpp
-
Notifications
You must be signed in to change notification settings - Fork 103
Merged
Conversation
chrchr-github
changed the title
Fix hang on UTF- 16 LE BOM file
Fix hang on UTF-16 LE BOM file
Yeah - there's several places which lack checks for EOF. I have WIP tests for that and other corner cases/gaps somewhere - something to be done in preparation of #566.
With #647 it should be possible to write a test which uses the input in question.
With #647 it should be possible to write a test which uses the input in question.
Can we just run the tests with all three options?
Can we just run the tests with all three options?
Yes, if somebody adds the functionality. It didn't seem straight forward to me so I haven't yet. Feel free to do so.
I think I took a wrong turn. That should trigger with regular unit test. So please add a test for it.
I think I took a wrong turn. That should trigger with regular unit test. So please add a test for it.
Ah - you mentioned FileStream in the ticket. Still I think we should have a unit test (if missing).
So there is also some kind of platform divergence going on...
Of course f.write("\xFF\xFE\x3B\x00") does something different on Linux, because why wouldn't it?
~$ hexdump pytest.cpp
0000000 bfc3 bec3 003b
0000006
I guess CI will be fixed by #641
@chrchr-github I want to release simplecpp so we can update cppcheck repo before the release. do you want to merge now to get this into the release or rather wait?
@chrchr-github I want to release simplecpp so we can update cppcheck repo before the release. do you want to merge now to get this into the release or rather wait?
It's also a hang in cppcheck, so we might as well merge it (I don't have permission though).