I have a buffer, I am doing lot of strncat. I want to make sure I never overflow the buffer size.
char buff[64];
strcpy(buff, \"String 1\");
strncat(buff,
Hogan has answered the question sufficently; however, if you are worried about buffer overflows in strcat(...) you should equally be worried about buffer overflows in all the other string functions.
Use strnlen(...) and strncpy(...) to really make sure you stay within your buffer. If you don't have a strnlen(...) function, write it.