URL:
  <https://savannah.gnu.org/bugs/?68947>

                 Summary: src/libs/libdriver/printer.cpp: robustify
`printer::load_font()`
                   Group: GNU roff
               Submitter: gbranden
               Submitted: Sun 22 Nov 2026 09:47:16 PM UTC
                Category: Driver - others/general
                Severity: 3 - Normal
              Item Group: Refactoring
                  Status: None
                 Privacy: Public
             Assigned to: gbranden
             Open/Closed: Open
         Discussion Lock: Unlocked
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sun 22 Nov 2026 09:47:16 PM UTC By: G. Branden Robinson <gbranden>
Ingo identified a few possible problems with this function.

Copying relevant discussion from bug #68812.

>> * There are at least two places where something is added to the input value
>> n without checking for overflow.
> 
> I'll have a look at that.
> 
>> * The operator "new" is called on the font type without sanity checking for
>> unreasonably large values of the upper bound.
> 
> I suspect we should keep the grout we read from going hog wild with mounting
> position values as the formatter does when handling the `fp` request.
> 
>> * The old nfonts value is doubled without checking for overflow.
> 
> Good point.  I just blundered into a similar land mine of my own making in
> grotty.








    _______________________________________________________

Reply to this item at:

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

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to