Really initialize the whole GPtrArray to 0 after resizing. Pionted out by

2000-04-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* garray.c (g_ptr_array_maybe_expand): Really initialize the whole
	GPtrArray to 0 after resizing. Pionted out by David Menestrina
	<dmenest@Princeton.EDU>. Fixes Bug #9270. This needn't be applied
	to glib-1.3.
This commit is contained in:
Sebastian Wilhelmi 2000-04-19 11:06:54 +00:00 committed by Sebastian Wilhelmi
parent e01d746cba
commit 5c722885e3
10 changed files with 76 additions and 18 deletions

View File

@ -1,3 +1,10 @@
2000-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* garray.c (g_ptr_array_maybe_expand): Really initialize the whole
GPtrArray to 0 after resizing. Pionted out by David Menestrina
<dmenest@Princeton.EDU>. Fixes Bug #9270. This needn't be applied
to glib-1.3.
Wed Apr 19 08:32:32 2000 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_new): make sure that
@ -17,8 +24,8 @@ Fri Mar 24 03:34:02 2000 Tim Janik <timj@gtk.org>
2000-03-22 Elliot Lee <sopwith@redhat.com>
* gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in comparing two pointers more
than 4G apart.
* gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in
comparing two pointers more than 4G apart.
2000-03-21 Sebastian Wilhelmi <wilhelmi@ira.uka.de>

View File

@ -1,3 +1,10 @@
2000-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* garray.c (g_ptr_array_maybe_expand): Really initialize the whole
GPtrArray to 0 after resizing. Pionted out by David Menestrina
<dmenest@Princeton.EDU>. Fixes Bug #9270. This needn't be applied
to glib-1.3.
Wed Apr 19 08:32:32 2000 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_new): make sure that
@ -17,8 +24,8 @@ Fri Mar 24 03:34:02 2000 Tim Janik <timj@gtk.org>
2000-03-22 Elliot Lee <sopwith@redhat.com>
* gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in comparing two pointers more
than 4G apart.
* gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in
comparing two pointers more than 4G apart.
2000-03-21 Sebastian Wilhelmi <wilhelmi@ira.uka.de>

View File

@ -1,3 +1,10 @@
2000-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* garray.c (g_ptr_array_maybe_expand): Really initialize the whole
GPtrArray to 0 after resizing. Pionted out by David Menestrina
<dmenest@Princeton.EDU>. Fixes Bug #9270. This needn't be applied
to glib-1.3.
Wed Apr 19 08:32:32 2000 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_new): make sure that
@ -17,8 +24,8 @@ Fri Mar 24 03:34:02 2000 Tim Janik <timj@gtk.org>
2000-03-22 Elliot Lee <sopwith@redhat.com>
* gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in comparing two pointers more
than 4G apart.
* gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in
comparing two pointers more than 4G apart.
2000-03-21 Sebastian Wilhelmi <wilhelmi@ira.uka.de>

View File

@ -1,3 +1,10 @@
2000-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* garray.c (g_ptr_array_maybe_expand): Really initialize the whole
GPtrArray to 0 after resizing. Pionted out by David Menestrina
<dmenest@Princeton.EDU>. Fixes Bug #9270. This needn't be applied
to glib-1.3.
Wed Apr 19 08:32:32 2000 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_new): make sure that
@ -17,8 +24,8 @@ Fri Mar 24 03:34:02 2000 Tim Janik <timj@gtk.org>
2000-03-22 Elliot Lee <sopwith@redhat.com>
* gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in comparing two pointers more
than 4G apart.
* gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in
comparing two pointers more than 4G apart.
2000-03-21 Sebastian Wilhelmi <wilhelmi@ira.uka.de>

View File

@ -1,3 +1,10 @@
2000-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* garray.c (g_ptr_array_maybe_expand): Really initialize the whole
GPtrArray to 0 after resizing. Pionted out by David Menestrina
<dmenest@Princeton.EDU>. Fixes Bug #9270. This needn't be applied
to glib-1.3.
Wed Apr 19 08:32:32 2000 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_new): make sure that
@ -17,8 +24,8 @@ Fri Mar 24 03:34:02 2000 Tim Janik <timj@gtk.org>
2000-03-22 Elliot Lee <sopwith@redhat.com>
* gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in comparing two pointers more
than 4G apart.
* gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in
comparing two pointers more than 4G apart.
2000-03-21 Sebastian Wilhelmi <wilhelmi@ira.uka.de>

View File

@ -1,3 +1,10 @@
2000-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* garray.c (g_ptr_array_maybe_expand): Really initialize the whole
GPtrArray to 0 after resizing. Pionted out by David Menestrina
<dmenest@Princeton.EDU>. Fixes Bug #9270. This needn't be applied
to glib-1.3.
Wed Apr 19 08:32:32 2000 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_new): make sure that
@ -17,8 +24,8 @@ Fri Mar 24 03:34:02 2000 Tim Janik <timj@gtk.org>
2000-03-22 Elliot Lee <sopwith@redhat.com>
* gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in comparing two pointers more
than 4G apart.
* gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in
comparing two pointers more than 4G apart.
2000-03-21 Sebastian Wilhelmi <wilhelmi@ira.uka.de>

View File

@ -1,3 +1,10 @@
2000-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* garray.c (g_ptr_array_maybe_expand): Really initialize the whole
GPtrArray to 0 after resizing. Pionted out by David Menestrina
<dmenest@Princeton.EDU>. Fixes Bug #9270. This needn't be applied
to glib-1.3.
Wed Apr 19 08:32:32 2000 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_new): make sure that
@ -17,8 +24,8 @@ Fri Mar 24 03:34:02 2000 Tim Janik <timj@gtk.org>
2000-03-22 Elliot Lee <sopwith@redhat.com>
* gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in comparing two pointers more
than 4G apart.
* gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in
comparing two pointers more than 4G apart.
2000-03-21 Sebastian Wilhelmi <wilhelmi@ira.uka.de>

View File

@ -1,3 +1,10 @@
2000-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* garray.c (g_ptr_array_maybe_expand): Really initialize the whole
GPtrArray to 0 after resizing. Pionted out by David Menestrina
<dmenest@Princeton.EDU>. Fixes Bug #9270. This needn't be applied
to glib-1.3.
Wed Apr 19 08:32:32 2000 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_new): make sure that
@ -17,8 +24,8 @@ Fri Mar 24 03:34:02 2000 Tim Janik <timj@gtk.org>
2000-03-22 Elliot Lee <sopwith@redhat.com>
* gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in comparing two pointers more
than 4G apart.
* gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in
comparing two pointers more than 4G apart.
2000-03-21 Sebastian Wilhelmi <wilhelmi@ira.uka.de>

View File

@ -312,7 +312,8 @@ g_ptr_array_maybe_expand (GRealPtrArray *array,
else
array->pdata = g_new0 (gpointer, array->alloc);
memset (array->pdata + old_alloc, 0, array->alloc - old_alloc);
memset (array->pdata + old_alloc, 0,
sizeof (gpointer) * (array->alloc - old_alloc));
}
}

View File

@ -312,7 +312,8 @@ g_ptr_array_maybe_expand (GRealPtrArray *array,
else
array->pdata = g_new0 (gpointer, array->alloc);
memset (array->pdata + old_alloc, 0, array->alloc - old_alloc);
memset (array->pdata + old_alloc, 0,
sizeof (gpointer) * (array->alloc - old_alloc));
}
}