diff options
author | marha <marha@users.sourceforge.net> | 2010-12-10 19:06:59 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-12-10 19:06:59 +0000 |
commit | 3a20d23b48c1051e1f22295fd886cc7f643417f6 (patch) | |
tree | 5192dddd9ecf591de2e22504f7268c2935382d90 /xorg-server/hw/xfree86/common/xf86Config.c | |
parent | 531a0d974b98074978535f086a73b6b662fa0cea (diff) | |
download | vcxsrv-3a20d23b48c1051e1f22295fd886cc7f643417f6.tar.gz vcxsrv-3a20d23b48c1051e1f22295fd886cc7f643417f6.tar.bz2 vcxsrv-3a20d23b48c1051e1f22295fd886cc7f643417f6.zip |
xserver git update 10/12/2010
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Config.c')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Config.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c index c439221f9..4246f6d71 100644 --- a/xorg-server/hw/xfree86/common/xf86Config.c +++ b/xorg-server/hw/xfree86/common/xf86Config.c @@ -208,9 +208,7 @@ xf86ValidateFontPath(char *path) continue;
}
else {
- p1 = xnfalloc(strlen(dir_elem)+strlen(DIR_FILE)+1);
- strcpy(p1, dir_elem);
- strcat(p1, DIR_FILE);
+ XNFasprintf(&p1, "%s%s", dir_elem, DIR_FILE);
flag = stat(p1, &stat_buf);
if (flag == 0)
if (!S_ISREG(stat_buf.st_mode))
@@ -585,12 +583,11 @@ configFiles(XF86ConfFilesPtr fileconf) else if (fileconf && fileconf->file_fontpath) {
pathFrom = X_CONFIG;
if (xf86Info.useDefaultFontPath) {
- defaultFontPath = Xprintf("%s%s%s",
- fileconf->file_fontpath,
- *temp_path ? "," : "", temp_path);
- if (defaultFontPath != NULL) {
+ if (asprintf(&defaultFontPath, "%s%s%s", fileconf->file_fontpath,
+ *temp_path ? "," : "", temp_path) == -1)
+ defaultFontPath = NULL;
+ else
must_copy = FALSE;
- }
}
else
defaultFontPath = fileconf->file_fontpath;
|