[Xfce4-commits] [apps/xfce4-terminal] 01/01: Validate array index before accessing array member

noreply at xfce.org noreply at xfce.org
Mon Jun 27 12:57:39 CEST 2016


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

f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.

commit a4acf5a0d12c886f5aeabe37692a4c06b3138b4c
Author: Igor <f2404 at yandex.ru>
Date:   Mon Jun 27 13:57:35 2016 +0300

    Validate array index before accessing array member
---
 terminal/terminal-screen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index 10df84c..d6f476c 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -882,7 +882,7 @@ terminal_screen_update_colors (TerminalScreen *screen)
       g_free (palette_str);
 
       if (colors != NULL)
-        for (; colors[n] != NULL && n < 16; n++)
+        for (; n < 16 && colors[n] != NULL; n++)
           if (!gdk_rgba_parse (palette + n, colors[n]))
             {
               g_warning ("Unable to parse color \"%s\".", colors[n]);

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


More information about the Xfce4-commits mailing list