diff options
author | marha <marha@users.sourceforge.net> | 2011-11-25 08:32:21 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-11-25 08:32:21 +0100 |
commit | 849d328b25c2f3c87d539e1fe7af38e7580a0409 (patch) | |
tree | 349c425a87ddb3aaa1d7832d5a8e68252fc73ddb /xorg-server/hw/xfree86/common/xf86Config.c | |
parent | a8a12d4c8be177f63cae7dc96c2b52f09e228a76 (diff) | |
parent | a0b4a1330be6a36ad095222d2ea83927cd33514d (diff) | |
download | vcxsrv-849d328b25c2f3c87d539e1fe7af38e7580a0409.tar.gz vcxsrv-849d328b25c2f3c87d539e1fe7af38e7580a0409.tar.bz2 vcxsrv-849d328b25c2f3c87d539e1fe7af38e7580a0409.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/glx/glxdriswrast.c
xorg-server/glx/single2.c
xorg-server/hw/xwin/winconfig.c
xorg-server/os/osinit.c
xorg-server/os/xdmcp.c
xorg-server/xkb/xkbInit.c
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Config.c')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Config.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c index cb4be4210..fef4bf1fe 100644 --- a/xorg-server/hw/xfree86/common/xf86Config.c +++ b/xorg-server/hw/xfree86/common/xf86Config.c @@ -195,8 +195,7 @@ xf86ValidateFontPath(char *path) dirlen = p1 - path_elem; else dirlen = strlen(path_elem); - strncpy(dir_elem, path_elem, dirlen); - dir_elem[dirlen] = '\0'; + strlcpy(dir_elem, path_elem, dirlen + 1); flag = stat(dir_elem, &stat_buf); if (flag == 0) if (!S_ISDIR(stat_buf.st_mode)) @@ -249,9 +248,9 @@ xf86ModulelistFromConfig(pointer **optlist) { int count = 0, i = 0; char **modulearray; - char *ignore[] = { "GLcore", "speedo", "bitmap", "drm", - "freetype", "type1", - NULL }; + const char *ignore[] = { "GLcore", "speedo", "bitmap", "drm", + "freetype", "type1", + NULL }; pointer *optarray; XF86LoadPtr modp; Bool found; @@ -523,7 +522,7 @@ fixup_video_driver_list(char **drivers) } static char ** -GenerateDriverlist(char * dirname) +GenerateDriverlist(const char * dirname) { char **ret; const char *subdirs[] = { dirname, NULL }; @@ -554,7 +553,7 @@ xf86DriverlistFromCompile(void) * available is printed. */ static void -xf86ConfigError(char *msg, ...) +xf86ConfigError(const char *msg, ...) { va_list ap; @@ -2301,8 +2300,8 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout) { ConfigStatus xf86HandleConfigFile(Bool autoconfig) { - const char *filename, *dirname, *sysdirname; - char *filesearch, *dirsearch; + char *filename, *dirname, *sysdirname; + const char *filesearch, *dirsearch; MessageType filefrom = X_DEFAULT; MessageType dirfrom = X_DEFAULT; char *scanptr; @@ -2353,6 +2352,10 @@ xf86HandleConfigFile(Bool autoconfig) return CONFIG_NOFILE; } + free(filename); + free(dirname); + free(sysdirname); + if ((xf86configptr = xf86readConfigFile ()) == NULL) { xf86Msg(X_ERROR, "Problem parsing the config file\n"); return CONFIG_PARSE_ERROR; |