FontForge cannot start if an X resource has continued lines

Bug #926905 reported by Mike McNally
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fontforge (Ubuntu)
New
Undecided
Unassigned

Bug Description

The X Resource Manager config file syntax allows entries to be continued across newlines. To do that, one preceeds the newline with a backslash.

If such entries are present in the current resource database, the FontForge code that parses the resources fails (or it can fail sometimes, at least). The proximal cause is a call to the routine "copyn()" in the file Unicode/memory.c, such that the "n" parameter is negative. That makes the code think that "galloc()" has failed, and it exits.

The code that makes the bogus "copyn()" call is the function "GResourceAddResourceString()" in gdraw/gresource.c. I didn't fully analyze the code that's trying to parse the string, but it's clearly making assumptions about the nature of the resource database lines that aren't true in the case of a continued, multi-line entry.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: fontforge 0.0.20110222-1ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-15.25-generic 3.0.13
Uname: Linux 3.0.0-15-generic x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Sat Feb 4 15:42:42 2012
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110426)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
SourcePackage: fontforge
UpgradeStatus: Upgraded to oneiric on 2011-11-03 (92 days ago)

Revision history for this message
Mike McNally (emmecinque) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.