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)
This commit is contained in:
Matthias Clasen 2004-11-27 02:59:09 +00:00 committed by Matthias Clasen
parent 6b69bf8866
commit 40b4e103b4
6 changed files with 31 additions and 1 deletions

View File

@ -1,3 +1,9 @@
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.

View File

@ -1,3 +1,9 @@
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.

View File

@ -1,3 +1,9 @@
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.

View File

@ -1,3 +1,9 @@
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.

View File

@ -1,3 +1,9 @@
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.

View File

@ -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"));