aizu-m
6a850b9aac
wc: fix out-of-bounds read for single-byte wide characters
...
In legacy CJK locales a single input byte can decode to a wide character
above UCHAR_MAX, e.g. SHIFT-JIS bytes 0xA1..0xDF become U+FF61..U+FF9F.
wc then indexed its 256-entry wc_isprint/wc_isspace tables with that
value and read past their end.
* src/wc.c (wc): Take the byte-indexed fast path only when the decoded
character fits in a byte; wider values fall through to c32width and
c32isspace.
* tests/wc/wc-sjis.sh: New test.
* tests/local.mk (all_tests): Add it.
* NEWS: Mention the fix.
Link: https://github.com/coreutils/coreutils/pull/298
2026-06-19 15:39:10 +01:00
..
2026-04-15 15:08:27 +01:00
2026-04-07 12:20:10 +01:00
2026-01-01 10:56:16 -08:00
2026-04-16 21:16:08 -07:00
2026-06-02 11:43:06 +01:00
2026-06-02 11:43:06 +01:00
2026-01-01 10:56:16 -08:00
2026-05-30 21:29:19 +01:00
2026-04-22 19:12:44 -07:00
2026-06-06 11:46:43 +01:00
2026-02-18 18:31:49 +00:00
2026-06-10 13:50:04 +01:00
2026-06-16 20:20:36 -07:00
2026-05-20 13:09:28 +01:00
2026-04-15 12:56:16 +01:00
2026-02-28 18:36:34 -08:00
2026-03-27 21:15:18 +00:00
2026-04-15 15:08:27 +01:00
2026-04-06 18:22:56 +01:00
2026-02-25 14:52:57 +00:00
2026-02-18 18:31:49 +00:00
2026-06-07 19:45:30 -07:00
2026-01-01 10:56:16 -08:00
2026-05-25 16:07:05 +01:00
2026-01-01 10:56:16 -08:00
2026-01-01 10:56:16 -08:00
2026-06-08 21:57:39 -07:00
2026-06-11 00:14:21 -07:00
2026-04-06 17:29:24 +01:00
2026-06-09 14:38:15 +01:00
2026-06-18 19:31:39 -07:00
2026-02-18 18:31:49 +00:00
2026-05-14 21:05:01 -07:00
2026-02-18 18:31:49 +00:00
2026-06-16 18:48:15 +01:00
2026-03-20 19:46:04 -07:00
2026-06-18 16:35:17 +01:00
2026-04-16 21:41:40 +01:00
2026-06-14 15:20:26 -07:00
2026-01-16 13:22:28 -08:00
2026-06-12 17:17:43 +01:00
2026-01-01 10:56:16 -08:00
2026-06-11 21:42:47 -07:00
2026-03-22 13:32:52 -07:00
2026-01-24 12:47:51 +00:00
2026-04-10 11:09:10 +01:00
2026-01-01 10:56:16 -08:00
2026-01-01 10:56:16 -08:00
2026-01-01 10:56:16 -08:00
2026-06-04 13:13:27 +01:00
2026-05-07 23:32:52 -07:00
2026-06-09 14:08:02 +01:00
2026-06-18 14:20:35 +01:00
2026-06-04 13:48:05 +01:00
2026-01-24 12:49:52 +00:00
2026-03-04 17:57:54 +00:00
2026-06-14 10:52:46 -07:00
2026-05-19 19:06:13 +01:00
2026-06-14 22:50:50 -07:00
2026-03-13 20:37:10 -07:00
2026-04-10 11:09:10 +01:00
2026-03-23 12:11:35 +00:00
2026-03-24 19:02:21 -07:00
2026-04-09 21:25:27 +01:00
2026-06-09 18:20:39 -07:00
2026-04-28 11:25:41 -07:00
2026-06-19 15:39:10 +01:00
2026-02-18 18:31:49 +00:00
2026-01-01 10:56:16 -08:00
2026-01-01 10:56:16 -08:00
2026-01-01 10:56:16 -08:00
2026-06-19 15:39:10 +01:00
2026-01-01 10:56:16 -08:00
2026-01-01 20:50:59 -08:00