Double check that your buffer is as large as you specify.
When using functions that accept a number of bytes to copy, such as strncpy(), be aware
that if the destination buffer size is equal to the source buffer size, it may not NULLterminate the string.
Check buffer boundaries if accessing the buffer in a loop and make sure you are not in