From 6baad4b228b7650b90f55163014b616c72619a24 Mon Sep 17 00:00:00 2001 From: Roland Baer Date: Mon, 6 Aug 2007 11:27:50 +0300 Subject: [PATCH] Overrun by one when adding terminating 0 fix --- hw/xfree86/utils/xorgconfig/xorgconfig.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/xfree86/utils/xorgconfig/xorgconfig.c b/hw/xfree86/utils/xorgconfig/xorgconfig.c index 736b011..8d9c03f 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'; -- 1.5.2.3