G. Branden Robinson
2020-05-08 22:44:28 UTC
URL:
<https://savannah.gnu.org/bugs/?58337>
Summary: negative arguments to .ss request cause assertion
failure
Project: GNU troff
Submitted by: gbranden
Submitted on: Fri 08 May 2020 10:44:27 PM UTC
Category: Core
Severity: 3 - Normal
Item Group: Crash/Not responding
Status: In Progress
Privacy: Public
Assigned to: gbranden
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
I didn't think my C99-conformant assert() rewrite would pay off this quickly.
$ ./build/test-groff -Tutf8
.ss 12 -1
a
troff: ../src/roff/troff/number.cpp:653: scale(): assertion failed: 'x >= 0 &&
y > 0'
[...]/build/groff: error: troff: Signal 6 (core dumped)
Same happens if the arguments to .ss are swapped.
Seems like we should just reject negative values for these parameters.
Zeroes are fine. They result in ugly typography (for conventional
applications), but they don't crash groff.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58337>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
<https://savannah.gnu.org/bugs/?58337>
Summary: negative arguments to .ss request cause assertion
failure
Project: GNU troff
Submitted by: gbranden
Submitted on: Fri 08 May 2020 10:44:27 PM UTC
Category: Core
Severity: 3 - Normal
Item Group: Crash/Not responding
Status: In Progress
Privacy: Public
Assigned to: gbranden
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
I didn't think my C99-conformant assert() rewrite would pay off this quickly.
$ ./build/test-groff -Tutf8
.ss 12 -1
a
troff: ../src/roff/troff/number.cpp:653: scale(): assertion failed: 'x >= 0 &&
y > 0'
[...]/build/groff: error: troff: Signal 6 (core dumped)
Same happens if the arguments to .ss are swapped.
Seems like we should just reject negative values for these parameters.
Zeroes are fine. They result in ugly typography (for conventional
applications), but they don't crash groff.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58337>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/