Bug 22 - fontconfig crashes if $HOME is not set
Summary: fontconfig crashes if $HOME is not set
Alias: None
Product: fontconfig
Classification: Unclassified
Component: library (show other bugs)
Version: 2.1
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Keith Packard
QA Contact:
Depends on:
Reported: 2003-02-06 01:34 UTC by Frederic Crozat
Modified: 2003-02-05 16:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Patch to use $HOME only as fallback (1.44 KB, patch)
2003-02-06 01:35 UTC, Frederic Crozat
Details | Splinter Review

Description Frederic Crozat 2003-02-06 01:34:31 UTC
Fontconfig crashes if HOME variable is not set (it can
be the case when using usermode to get root access)..

The attached patch fixes this problem and only relies on $HOME
variable presence when getpwuid doesn't give any info (this is the glib2 way..)
Comment 1 Frederic Crozat 2003-02-06 01:35:38 UTC
Created attachment 16 [details] [review]
Patch to use $HOME only as fallback
Comment 2 Keith Packard 2003-02-06 07:45:49 UTC
I would prefer to use $HOME and fall back to getpwuid only if that's not set, or
perhaps if the application is setuid.  getpwuid seems a bit expensive to use in
every application.
Comment 3 Frederic Crozat 2003-02-06 08:30:09 UTC
I don't have any strong feelings for any approaches.. Since I didn't knew which
one was better, I choose the glib2 way
Comment 4 Keith Packard 2003-02-06 11:30:52 UTC
I've made a minimal patch that solves the immediate problem.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.