Opened 10 years ago
Last modified 10 years ago
#11322 closed bug
Bash crash in iswprint while running haikuporter — at Initial Version
Reported by: | pulkomandy | Owned by: | zooey |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/libroot.so | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
./haikuporter album
or
./haikuporter --lint
bash crashes when parsing recipes which have unicode characters (in the case of album, in the copyright). This was apparently introduced when outsourcing bash.
There is no gLocaleRoster in this case, and iswprint tries to use the 384-entries flag table for the unicode char, but this results in an out of range access for any non-ASCII char.
So there are two bugs:
- gLocaleRoster shouldn't be NULL (I have tried reproducing the issue out of HaikuPorter, and indeed it isn't NULL in that case)
- The functions should not crash when gLocaleRoster is NULL and they are fed an unicode character.
One way to fix the latter is to add bounds checks to isctype and always return false for out of range characters. But I think it's better to investigate the first issue first.
Note:
See TracTickets
for help on using tickets.