aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/parser
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-22 08:57:22 +0000
committermarha <marha@users.sourceforge.net>2010-04-22 08:57:22 +0000
commitd2bf55b405ea8f980984aab4be7d4b878c9e6981 (patch)
tree676ad441e287f6de1950260c3d2ef0b720f69bad /xorg-server/hw/xfree86/parser
parenta46e26df6103fb0e6e00d8d11d58c3f7a358208c (diff)
downloadvcxsrv-d2bf55b405ea8f980984aab4be7d4b878c9e6981.tar.gz
vcxsrv-d2bf55b405ea8f980984aab4be7d4b878c9e6981.tar.bz2
vcxsrv-d2bf55b405ea8f980984aab4be7d4b878c9e6981.zip
git update 22/4/2010
Diffstat (limited to 'xorg-server/hw/xfree86/parser')
-rw-r--r--xorg-server/hw/xfree86/parser/read.c4
-rw-r--r--xorg-server/hw/xfree86/parser/scan.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/xorg-server/hw/xfree86/parser/read.c b/xorg-server/hw/xfree86/parser/read.c
index 1091be5e5..4e42b24f0 100644
--- a/xorg-server/hw/xfree86/parser/read.c
+++ b/xorg-server/hw/xfree86/parser/read.c
@@ -219,15 +219,15 @@ xf86readConfigFile (void)
}
else
{
- Error (INVALID_SECTION_MSG, xf86tokenString ());
free(val.str);
val.str = NULL;
+ Error (INVALID_SECTION_MSG, xf86tokenString ());
}
break;
default:
- Error (INVALID_KEYWORD_MSG, xf86tokenString ());
free(val.str);
val.str = NULL;
+ Error (INVALID_KEYWORD_MSG, xf86tokenString ());
}
}
diff --git a/xorg-server/hw/xfree86/parser/scan.c b/xorg-server/hw/xfree86/parser/scan.c
index 8aab0cf41..06710d55a 100644
--- a/xorg-server/hw/xfree86/parser/scan.c
+++ b/xorg-server/hw/xfree86/parser/scan.c
@@ -845,10 +845,13 @@ static int
ConfigFilter(const struct dirent *de)
{
const char *name = de->d_name;
- size_t len = strlen(name);
+ size_t len;
size_t suflen = strlen(XCONFIGSUFFIX);
- if (!name || name[0] == '.' || len <= suflen)
+ if (!name || name[0] == '.')
+ return 0;
+ len = strlen(name);
+ if(len <= suflen)
return 0;
if (strcmp(&name[len-suflen], XCONFIGSUFFIX) != 0)
return 0;