[svn-r2711] Purpose:

Bug fix.
Description:
    When the maximum number of elements in a fixed size, free-list managed array
    was allocated, the free-list code was writing off the end of the array.
Solution:
    Changed definition of free-list managed arrays to allocate correct space for
    the array.
Platforms tested:
    Solaris 2.5 (baldric) w/Purify
This commit is contained in:
Quincey Koziol 2000-10-20 15:34:16 -05:00
parent b3e4cd6e97
commit 79d1d8258f

View File

@ -151,7 +151,7 @@ typedef struct H5FL_arr_head_t {
* Macros for defining & using free lists for an array of a type
*/
/* Declare a free list to manage arrays of type 't' */
#define H5FL_ARR_DEFINE(t,m) H5FL_arr_head_t t##_arr_free_list={0,0,NULL,0,#t##"_arr",m,sizeof(t),{NULL}}
#define H5FL_ARR_DEFINE(t,m) H5FL_arr_head_t t##_arr_free_list={0,0,NULL,0,#t##"_arr",m+1,sizeof(t),{NULL}}
/* Reference a free list for arrays of type 't' defined in another file */
#define H5FL_ARR_EXTERN(t) extern H5FL_arr_head_t t##_arr_free_list