incorrect allocation size calculation
Brought to you by:
pihmmodel
Double pointers to realtype are used throughout the code, meanwhile sizeof(realtype) is used to allocate first dimension instead of sizeof(realtype*). Here is an incorrect example from read_alloc.c :
DS->TSD_Riv[i].TS = (realtype **)malloc((DS->TSD_Riv[i].length)*sizeof(realtype))