bugGNU troff - Bugs: bug #55257, xtotroff.c: Defined size of the...


bug #55257: xtotroff.c: Defined size of the array "encoding" is too short

Submitted by:  Bjarni Ingi Gislason <bjarniig>
Submitted on:  Thu 20 Dec 2018 08:54:01 PM UTC  
Category:  None Severity:  3 - Normal
Item Group:  Build/Installation Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Mon 20 Jan 2020 12:57:11 AM UTC, comment #1: 

  I was somehow in my master branch when I issued a "make check".
I thus got a warning that I had already reported.

  I had fixed this, with a comment, in my branch.

  The fix is so simple, that keeping the issue unfixed and the report
open is a waste.

Bjarni Ingi Gislason <bjarniig>
Thu 20 Dec 2018 08:54:01 PM UTC, original submission:  

From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Thu, 20 Dec 2018 20:47:07 +0000
Subject: xtotroff.c: Defined size of the array "encoding" is too short

  The X11 part of the groff software is only compiled if the needed
libraries are found, see README.

  Possible warnings from the compiler:

../src/utils/xtotroff/xtotroff.c: In function 'MapFont':
../src/utils/xtotroff/xtotroff.c:159:25: warning: '%s' directive writing
up to 255 bytes into a region of size between 0 and 255
   sprintf(encoding, "%s-%s", parsed.CharSetRegistry,
../src/utils/xtotroff/xtotroff.c:159:3: note: 'sprintf' output between 2
and 512 bytes into a destination of size 256
   sprintf(encoding, "%s-%s", parsed.CharSetRegistry,

  The size of "encoding" needs thus to be the sizeof(CharSetRegistry) +
sizeof(CharSetEncoding) + 1 (+1 for the terminating null byte?), which
sizes are defined in "src/include/XFontName.h".

Bjarni Ingi Gislason <bjarniig>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by bjarniig (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.5