I made a smaller scenario of my bigger problem. What I try to do is pass a string to a function which will make a new string out of it. However I ran into some problems.
Try changing
strcat(buff, ".");
into
strcpy(buff, ".");
Or alternativly initialise buff when declaring it like so:
buff
char buff[1024] = "";