Commit 40b4e103 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Don't access invalid memory address if p wasn't increased. (#159557,

2004-11-26  Matthias Clasen  <mclasen@redhat.com>

	* glib/gkeyfile.c (g_key_file_parse_value_as_string):
	Don't access invalid memory address if p wasn't
	increased.  (#159557, Frederic Crozat)
parent 6b69bf88
2004-11-26 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c (g_key_file_parse_value_as_string):
Don't access invalid memory address if p wasn't
increased. (#159557, Frederic Crozat)
2004-11-25 Matthias Clasen <mclasen@redhat.com>
* tests/strtod-test.c (main): Add a testcase for the previous fix.
......
2004-11-26 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c (g_key_file_parse_value_as_string):
Don't access invalid memory address if p wasn't
increased. (#159557, Frederic Crozat)
2004-11-25 Matthias Clasen <mclasen@redhat.com>
* tests/strtod-test.c (main): Add a testcase for the previous fix.
......
2004-11-26 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c (g_key_file_parse_value_as_string):
Don't access invalid memory address if p wasn't
increased. (#159557, Frederic Crozat)
2004-11-25 Matthias Clasen <mclasen@redhat.com>
* tests/strtod-test.c (main): Add a testcase for the previous fix.
......
2004-11-26 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c (g_key_file_parse_value_as_string):
Don't access invalid memory address if p wasn't
increased. (#159557, Frederic Crozat)
2004-11-25 Matthias Clasen <mclasen@redhat.com>
* tests/strtod-test.c (main): Add a testcase for the previous fix.
......
2004-11-26 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c (g_key_file_parse_value_as_string):
Don't access invalid memory address if p wasn't
increased. (#159557, Frederic Crozat)
2004-11-25 Matthias Clasen <mclasen@redhat.com>
* tests/strtod-test.c (main): Add a testcase for the previous fix.
......
......@@ -3041,7 +3041,7 @@ g_key_file_parse_value_as_string (GKeyFile *key_file,
p++;
}
if (p[-1] == '\\' && error == NULL)
if (p > value && p[-1] == '\\' && error == NULL)
g_set_error (error, G_KEY_FILE_ERROR,
G_KEY_FILE_ERROR_INVALID_VALUE,
_("Key file contains escape character at end of line"));
......
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