Just a quick comment about how to avoid a buffer overrun while programming in C. Instead of using the string copy command, try to use the string n command.

For instance:

char *strncpy(char *dst, char *src, unsigned n)
for(unsigned i = 0; i < ; i++)
*(dst++) = *(src++);
if(*(dst-1) == '\0')
return src;

This should truncate a long string.

Pardon me if there are any code error's, it's been a long day.


--Aku. Soku. Zan.--