Fix hang on UTF-16 LE BOM file#636
Conversation
|
Yeah - there's several places which lack checks for |
|
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? |
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. |
Ah - you mentioned |
|
So there is also some kind of platform divergence going on... |
|
These (hanging) runs may be cancelled by the way: |
Of course |
|
I guess CI will be fixed by #641 |
| static bool isNameChar(unsigned char ch) | ||
| static bool isNameChar(int ch) | ||
| { | ||
| return std::isalnum(ch) || ch == '_' || ch == '$'; |
There was a problem hiding this comment.
I believe the input to std::isalnum must be 0-0xff
There was a problem hiding this comment.
hmm the documentation says:
the behavior of std::isalnum is undefined if the argument's value is neither representable as unsigned char nor equal to EOF.
so we are safe right?
There was a problem hiding this comment.
hmm the documentation says:
the behavior of std::isalnum is undefined if the argument's value is neither representable as unsigned char nor equal to EOF.
so we are safe right?
That's how I read it too.
fixes #637