Files
Hiroshi SHIBATAandClaude Opus 5 720d9e1154 Fix max_output of the CP50220 encoder
A katakana held back for a possible sound mark is flushed by the next
character, costing a designation and two data bytes before that
character's own designation and data, so one call can write 9 bytes
against a declared max_output of 5:

    ec = Encoding::Converter.new("CP51932", "CP50220")
    ec.primitive_convert("\x8e\xb6\x8e\xe0".b, "X" * 4088, 4088, 8)
    # -e:1: [BUG] probable buffer overflow: 4097 for 4096

9 is past the 8 byte inline write buffer in transcode.c, so this
transcoder now allocates one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-08 15:07:52 +09:00
..
…
2019-12-22 22:49:17 +09:00
…
2023-01-06 12:13:15 +09:00
2023-01-06 12:13:15 +09:00
2023-01-06 12:13:15 +09:00
2023-01-06 12:13:15 +09:00
…
2023-01-06 12:13:15 +09:00
2023-01-06 12:13:15 +09:00
2023-01-06 12:13:15 +09:00
2023-01-06 12:13:15 +09:00
2023-01-06 12:13:15 +09:00
2023-01-06 12:13:15 +09:00
2023-01-06 12:13:15 +09:00
2023-01-06 12:13:15 +09:00
2023-01-06 12:13:15 +09:00
2023-01-06 12:13:15 +09:00
2023-01-06 12:13:15 +09:00
2023-01-06 12:13:15 +09:00
2023-01-06 12:13:15 +09:00
2023-01-06 12:13:15 +09:00
2016-10-28 15:14:32 +00:00