Skip to content

Commit 9bcabf6

Browse files
glebmsezero
authored andcommitted
Fix UB when calling cctype functions
Calling cctype functions, such as isspace, with negative values is undefined behaviour. While glibc allows it, it crashes on uClibc compiled without `UCLIBC_HAS_CTYPE_SIGNED`. Fixes the undefined behaviour by casting all arguments to cctype functions to `unsigned char`.
1 parent f3173c2 commit 9bcabf6

3 files changed

Lines changed: 158 additions & 158 deletions

File tree

0 commit comments

Comments
 (0)