Changed to calloc() and memcpy() because there were cases where realloc() did not work. Also fixed semantically incorrect calloc() arguments.
Changed to calloc() and memcpy() because there were cases where realloc() did not work. Also fixed semantically incorrect calloc() arguments.

daichigoto/tttcmds,daichigoto/tttcmds,daichigoto/tttcmds