URL: <https://savannah.gnu.org/bugs/?68796>
Summary: [troff] assertion failure when `defcolor` request
given invalid color identifier
Group: GNU roff
Submitter: gbranden
Submitted: Mon 19 Oct 2026 01:33:34 AM UTC
Category: Formatter
Severity: 4 - Important
Item Group: Crash/Unresponsive
Status: In Progress
Privacy: Public
Assigned to: gbranden
Open/Closed: Open
Discussion Lock: Unlocked
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Mon 19 Oct 2026 01:33:34 AM UTC By: G. Branden Robinson <gbranden>
$ printf '.defcolor \002 gray 0.5f\n' | ~/groff-1.24.2/bin/groff -T ascii
troff:<standard input>:1: error: character code 2 is not allowed in an
identifier
troff: ../src/roff/troff/input.cpp:1597: void define_color(): Assertion
`color_name != 0' failed.
/home/branden/groff-1.24.2/bin/groff: error: troff: Aborted (core dumped)
$ printf '.defcolor gray \002 0.5f\n' | ~/groff-1.24.2/bin/groff -T ascii
troff:<standard input>:1: error: character code 2 is not allowed in an
identifier
$ printf '.defcolor gray gray \002\n' | ~/groff-1.24.2/bin/groff -T ascii
troff:<standard input>:1: error: ignoring invalid numeric expression
containing character ''
Color _space_ name validation (the second argument) is okay. We see two
issues here.
1. The color name (identifier) check needs to not core; and
2. the diagnostic thrown by the numeric expression analyzer needs a bounds
check when writing the bogus character.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68796>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
