summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland "Test-tools" Bär <roland@verifysoft.de>2007-08-06 12:37:52 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2007-08-06 12:37:52 -0700
commitf6aa2200f2fb4f4d4bb51e67d68e86aabcac0c4b (patch)
tree3cab6fe9bf29940a58a7e38f3b54ee07b4ccbabc
parente717eb82dc2e55f852919312d04f5cfc8ee55bc8 (diff)
Probable off by one buffer overflow in .../xorgconfig/xorgconfig.c
X.Org Bug #11858 <http://bugs.freedesktop.org/show_bug.cgi?id=11858> Patch #11005 <http://bugs.freedesktop.org/attachment.cgi?id=11005>
-rw-r--r--hw/xfree86/utils/xorgconfig/xorgconfig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/utils/xorgconfig/xorgconfig.c b/hw/xfree86/utils/xorgconfig/xorgconfig.c
index 736b01183..8d9c03f5d 100644
--- a/hw/xfree86/utils/xorgconfig/xorgconfig.c
+++ b/hw/xfree86/utils/xorgconfig/xorgconfig.c
@@ -2442,7 +2442,7 @@ write_fontpath_section(FILE *f)
len = nextdir - thisdir;
nextdir++;
}
- if (len > sizeof(cur))
+ if (len >= sizeof(cur))
continue;
strncpy(cur, thisdir, len);
cur[len] = '\0';