Bug 49660 - mkfontdir doesn't detect obviously broken fonts.scale file
Summary: mkfontdir doesn't detect obviously broken fonts.scale file
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: XFree86
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-07-22 21:38 UTC by Jonathan Kamens
Modified: 2007-04-18 16:35 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-07-25 07:37:07 UTC
Embargoed:


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

Description Jonathan Kamens 2001-07-22 21:38:44 UTC
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 21:39:33 UTC
Created attachment 24527 [details]
Fix mkfontdir fonts.scale parsing

Comment 2 Mike A. Harris 2001-07-25 07:37:03 UTC
*** Bug 49658 has been marked as a duplicate of this bug. ***

Comment 3 Mike A. Harris 2001-08-19 23:25:31 UTC
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

Thanks jik.


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