Files
palladum-lightning/common
Matt Whitlock 41d31dcd19 avoid UB when calling ctype functions
The character classification functions in <ctype.h> are designed to
classify characters returned by <stdio.h> getchar() and friends, which
return characters as signed integers in the range 0 to 255 or EOF. The
behavior of the ctype functions is undefined if they are passed a value
outside of that range, which may happen if they are passed a char-typed
value and the system's char type is signed.

<ccan/str/str.h> defines some inline utility functions that perform the
necessary cast to coerce a char-typed argument into the allowed value
range. Call these wrappers instead of the bare ctype functions when
classifying char-typed characters.

Changelog-None
2025-08-18 14:03:20 +09:30
..
2025-08-15 15:23:57 +09:30
2023-09-21 20:08:24 +09:30
2024-08-10 15:20:59 +09:30
2023-06-23 13:12:42 +09:30
2024-07-10 12:21:19 +09:30
2024-03-07 14:09:14 +01:00
2025-08-15 15:23:57 +09:30
2024-11-12 06:42:52 +10:30
2023-09-21 20:08:24 +09:30
2023-07-11 11:41:15 +09:30
2023-07-11 11:41:15 +09:30
2025-08-14 04:12:17 +09:30
2024-10-07 14:05:47 +02:00
2024-10-07 14:05:47 +02:00
2025-05-13 14:52:15 +09:30
2025-04-24 17:34:12 +09:30
2025-05-13 14:52:15 +09:30
2025-05-13 14:52:15 +09:30
2024-11-21 14:15:36 +10:30
2024-11-21 14:15:36 +10:30