Bug 49660 - mkfontdir doesn't detect obviously broken fonts.scale file
mkfontdir doesn't detect obviously broken fonts.scale file
Status: CLOSED WONTFIX
Product: Red Hat Raw Hide
Classification: Retired
Component: XFree86 (Show other bugs)
1.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Mike A. Harris
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-07-22 17:38 EDT by Jonathan Kamens
Modified: 2007-04-18 12:35 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-07-25 03:37:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Fix mkfontdir fonts.scale parsing (1021 bytes, patch)
2001-07-22 17:39 EDT, Jonathan Kamens
no flags Details | Diff

  None (edit)
Description Jonathan Kamens 2001-07-22 17:38:44 EDT
If you attempt to concatenate two fonts.scale files by simply appending one
to the other, e.g., if you merge two font directories, mkfontdir won't
detect the resulting corruption (i.e., you've got two count lines in the
file, both of which are wrong, rather than one count line at the top with
the total count in it).  I'll attach a patch which fixes this problem as
well as fixing a security hole -- the code was previously using fscanf into
strings without specifying the size of the strings.
Comment 1 Jonathan Kamens 2001-07-22 17:39:33 EDT
Created attachment 24527 [details]
Fix mkfontdir fonts.scale parsing
Comment 2 Mike A. Harris 2001-07-25 03:37:03 EDT
*** Bug 49658 has been marked as a duplicate of this bug. ***
Comment 3 Mike A. Harris 2001-08-19 19:25:31 EDT
This bug is not a critical bug, so I'd prefer if you sent the fix
upstream so that someone more familiar with the code could eyeball it
for correctness.  I notice you're using sprintf, which is notorious
for buffer overflows, string format bugs, etc..  I dunno if there
are any, but I'd rather see it eyeballed upstream.

Submit fix to: fixes@xfree86.org

Thanks jik.

Note You need to log in before you can comment on or make changes to this bug.