Originally Posted By: Florastamine

Code:
STRING **array = (STRING *) sys_malloc(sizeof(STRING) * N);



This code line is wrong. It allocates N times the length of a STRING struct!

It should be:
Code:
STRING **array = (STRING**) sys_malloc(sizeof(STRING*) * N);



that allocates N times the length of a pointer to a STRING struct.

Salud!