[Xfce4-commits] [xfce/exo] 01/01: Check index range before accessing array, thanks f2404! https://github.com/xfce-mirror/exo/pull/2

noreply at xfce.org noreply at xfce.org
Sat Aug 20 23:51:21 CEST 2016


This is an automated email from the git hooks/post-receive script.

bluesabre pushed a commit to branch master
in repository xfce/exo.

commit 15590e4bf3e19ad6fc5c33aa43f23d4335e49d8b
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sat Aug 20 17:50:49 2016 -0400

    Check index range before accessing array, thanks f2404!
    https://github.com/xfce-mirror/exo/pull/2
---
 exo/exo-string.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exo/exo-string.c b/exo/exo-string.c
index 056b36a..8ebf2a4 100644
--- a/exo/exo-string.c
+++ b/exo/exo-string.c
@@ -389,7 +389,7 @@ exo_strndupv (gchar **strv,
 
   /* duplicate the first @num string */
   result = g_new (gchar *, num + 1);
-  for (i = 0; strv[i] != NULL && i < num; i++)
+  for (i = 0; i < num && strv[i] != NULL; i++)
     result[i] = g_strdup (strv[i]);
   result[i] = NULL;
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list