Fix invalid memory reads. (#340816, Nick Treleaven)

2006-05-06  Matthias Clasen  <mclasen@redhat.com>

	* glib/gkeyfile.c (g_key_file_set_string_list)
	(g_key_file_set_locale_string_list): Fix invalid memory
	reads.  (#340816, Nick Treleaven)
This commit is contained in:
Matthias Clasen 2006-05-07 04:02:06 +00:00 committed by Matthias Clasen
parent adf3537d60
commit 6fbcec14dc
3 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2006-05-06 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c (g_key_file_set_string_list)
(g_key_file_set_locale_string_list): Fix invalid memory
reads. (#340816, Nick Treleaven)
2006-05-04 Alexander Larsson <alexl@redhat.com>
* glib/gbase64.c: (g_base64_decode_step):

View File

@ -1,3 +1,9 @@
2006-05-06 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c (g_key_file_set_string_list)
(g_key_file_set_locale_string_list): Fix invalid memory
reads. (#340816, Nick Treleaven)
2006-05-04 Alexander Larsson <alexl@redhat.com>
* glib/gbase64.c: (g_base64_decode_step):

View File

@ -1464,7 +1464,7 @@ g_key_file_set_string_list (GKeyFile *key_file,
g_return_if_fail (list != NULL);
value_list = g_string_sized_new (length * 128);
for (i = 0; list[i] != NULL && i < length; i++)
for (i = 0; i < length && list[i] != NULL; i++)
{
gchar *value;
@ -1712,7 +1712,7 @@ g_key_file_set_locale_string_list (GKeyFile *key_file,
g_return_if_fail (length != 0);
value_list = g_string_sized_new (length * 128);
for (i = 0; list[i] != NULL && i < length; i++)
for (i = 0; i < length && list[i] != NULL; i++)
{
gchar *value;