Overview
| Artifact ID: | d036d7f8037afaf802aa3e3d669217960068b40b90980d23eaff921bcb953e62 |
|---|---|
| Ticket: | 67fcef9acaf767003180ee05b8a35ef8ea6ae049
Possible regex ranges integer overflow |
| User & Date: | serhiy.storchaka on 2026-10-11 11:04:57 |
Changes
- icomment:
Not reproducible in 8.6, 9.0 or 9.1. Regexp escapes are capped at U+10FFFF (<code>lexdigits()</code> in regc_lex.c), CHR_MAX is 0x10FFFF in 9.x, and <code>range()</code> uses <code>int</code>, so neither the loop nor the allocation size can overflow. In 8.6, <code>chr</code> is 16-bit by default, and the escape cap also applies with <code>TCL_UTF_MAX > 4</code>. The full case-insensitive range <code><nowiki>[\U00000000-\U0010ffff]</nowiki></code> compiles in milliseconds.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"