aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/parser/scan.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-22 13:02:12 +0000
committermarha <marha@users.sourceforge.net>2010-04-22 13:02:12 +0000
commit2446c474aae15bcaf31e4b799f94f21d515984d5 (patch)
tree31c649543787afa72f5908dedf07ec8ae37a84a2 /xorg-server/hw/xfree86/parser/scan.c
parent0b44ee3fb92120190fa46e73b7abfbaa8a0adaec (diff)
downloadvcxsrv-2446c474aae15bcaf31e4b799f94f21d515984d5.tar.gz
vcxsrv-2446c474aae15bcaf31e4b799f94f21d515984d5.tar.bz2
vcxsrv-2446c474aae15bcaf31e4b799f94f21d515984d5.zip
svn merge -r541:HEAD "^/branches/released" .
Diffstat (limited to 'xorg-server/hw/xfree86/parser/scan.c')
-rw-r--r--xorg-server/hw/xfree86/parser/scan.c7
1 files changed, 5 insertions, 2 deletions
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;