From 33a3af8008520f472727bf2144bae9a7585bc53e Mon Sep 17 00:00:00 2001 From: Eric Koegel Date: Sun, 14 Sep 2014 17:32:27 +0300 Subject: Fencepost array access error Array 'temp_data[100]' accessed at index 100, which is out of bounds. https://bugs.freedesktop.org/show_bug.cgi?id=71066 Signed-off-by: Richard Hughes --- src/up-wakeups.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/up-wakeups.c b/src/up-wakeups.c index a0719e1..38b8870 100644 --- a/src/up-wakeups.c +++ b/src/up-wakeups.c @@ -283,8 +283,8 @@ up_strsplit_complete_set (const gchar *string, const gchar *delimiters, guint ma /* find length of string */ len = &string[i] - start; - if (len > 100) - len = 100; + if (len > 99) + len = 99; strncpy (temp_data, start, len); temp_data[len] = '\0'; -- cgit v1.2.1