Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 49660

Summary: mkfontdir doesn't detect obviously broken fonts.scale file
Product: [Retired] Red Hat Raw Hide Reporter: Jonathan Kamens <h1k6zn2m>
Component: XFree86Assignee: Mike A. Harris <mharris>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-07-25 07:37:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fix mkfontdir fonts.scale parsing none

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.