projects
/
gtk+3.0.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92e309c
)
gtkmountoperation-x11: Do array length check before dereference
author
Philip Withnall
<withnall@endlessm.com>
Mon, 11 Sep 2017 08:23:17 +0000
(09:23 +0100)
committer
Daniel Boles
<dboles@src.gnome.org>
Tue, 12 Sep 2017 20:15:53 +0000
(21:15 +0100)
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=787302
gtk/gtkmountoperation-x11.c
patch
|
blob
|
history
diff --git
a/gtk/gtkmountoperation-x11.c
b/gtk/gtkmountoperation-x11.c
index 10c7bbcf81cd048d1e6179eed61d5f5f4887def7..adb47b16599d0c98c080e89b4d49a70aef5aae1d 100644
(file)
--- a/
gtk/gtkmountoperation-x11.c
+++ b/
gtk/gtkmountoperation-x11.c
@@
-653,7
+653,7
@@
pid_get_env (GPid pid,
n = 0;
while (TRUE)
{
- if (
env[n] == '\0' || n >= env_len
)
+ if (
n >= env_len || env[n] == '\0'
)
break;
if (g_str_has_prefix (env + n, key) && (*(env + n + key_len) == '='))
@@
-666,7
+666,7
@@
pid_get_env (GPid pid,
break;
}
- for (;
env[n] != '\0' && n < env_len
; n++)
+ for (;
n < env_len && env[n] != '\0'
; n++)
;
n++;
}