There is a bug on pg. 485, line 38: my_elems = realloc(my_elems, my_elems_size); Should be: my_elems = realloc(my_elems, my_elems_size*sizeof(void*)); ~Jim.