[bug #68375] [troff] have callers of `read_{h, v}units()` check for garbage after numeric expression

"G. Branden Robinson" <[email protected]>
Newsgroups gmane.comp.printing.groff.bugs
Message-ID <[email protected]>
URL:
  <https://savannah.gnu.org/bugs/?68375>

                 Summary: [troff] have callers of `read_{h,v}units()` check
for garbage after numeric expression
                   Group: GNU roff
               Submitter: gbranden
               Submitted: Wed 20 May 2026 02:50:23 PM UTC
                Category: Core
                Severity: 1 - Wish
              Item Group: Warning/Suspicious behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Unlocked
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Wed 20 May 2026 02:50:23 PM UTC By: G. Branden Robinson <gbranden>
Presently, they don't.

`read_{h,v}units()` themselves cannot reliably do this because sometimes they
are called where the input stream is in a delimited context and sometimes when
it is not.  A input character is that is garbage immediately after a numeric
expression is not garbage, but expected, if it is a delimiter-eligible
character matching an opening delimiter.

The callers have the appropriate context, so the callers must check.







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68375>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCag3KNAAKCRCqLAuaBUf3
TiADAPwNS+Qz7WYy3NC8KVeAlWR/mr9XdgOaWQe59oHcs4tk5wEAhTfMggR9ibLu
I166NtJWPfa0d+PsupJiy9h2p1y4cwU=
=nxlf
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.