ESP8266 code crashes, memory overwritten - stackoverflow?

Any you have an explanation for this taken from post #1 ?

buf[x] = arr[x];       // overflow here int buf[32] to buf[63] ??