[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #64205] [mm] `INITI` validates arguments poorly
From: |
G. Branden Robinson |
Subject: |
[bug #64205] [mm] `INITI` validates arguments poorly |
Date: |
Wed, 17 May 2023 03:12:20 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?64205>
Summary: [mm] `INITI` validates arguments poorly
Group: GNU roff
Submitter: gbranden
Submitted: Wed 17 May 2023 07:12:17 AM UTC
Category: Macro mm
Severity: 3 - Normal
Item Group: Warning/Suspicious behaviour
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Wed 17 May 2023 07:12:17 AM UTC By: G. Branden Robinson <gbranden>
Affects groff 1.22.4.
.de INITI
.if \\n[.$]<2 .@error \\$0: expected 2 or 3 arguments, got \\n[.$]
.\" ignore if INITI has already been used
.if d ind*file .@error \\$0: index file name already set
.ds ind*file \\$2.ind
.if \\n[D]>1 .tm INITI: source \\*[ind*file]
.if !d ind*file .@error \\$0: index file name not specified
.ds ind*type \\$1
The "index file name not specified" error will never be thrown; `ind*file` is
always defined (and with a non-empty value, though that doesn't matter for the
'd' conditional expression operator; empty strings exist nevertheless).
Also the content of the first argument is not validated at all, but blindly
assigned to `ind*type`.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64205>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #64205] [mm] `INITI` validates arguments poorly,
G. Branden Robinson <=