Commit ada5fe97 authored by Michael Natterer's avatar Michael Natterer 😴

Bug 772025 - Incomplete toolrc file causes GIMP to hang

gimp_config_deserialize_properties(): don't loop infinitely when
encountering EOF in a truncated file.
parent ce4c4a44
......@@ -140,7 +140,6 @@ gimp_config_deserialize_properties (GimpConfig *config,
guint scope_id;
guint old_scope_id;
GTokenType token;
GTokenType next;
g_return_val_if_fail (GIMP_IS_CONFIG (config), FALSE);
......@@ -172,7 +171,10 @@ gimp_config_deserialize_properties (GimpConfig *config,
while (TRUE)
{
next = g_scanner_peek_next_token (scanner);
GTokenType next = g_scanner_peek_next_token (scanner);
if (next == G_TOKEN_EOF)
break;
if (G_UNLIKELY (next != token &&
! (token == G_TOKEN_SYMBOL &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment