char array is not initialized. memset(array, 0, length); same with ? int seems to be always inited to 0 (malloc, realloc)