Subtracting one from the size of the buffer is an ugly kludge - it would makes it marginally more likely that you'll be left with an unterminated string, except of course that you did memset node full of '\0' bytes (just setting node[CF_MAXVARSIZE-1] = '\0' would do all the benefit of this, though; there is no benefit to setting the array members between first and last).  In any case, when sp points to a short string, do you **really** care about memset()ting the rest of node (twice), after the end of the copy of sp, with '\0' bytes ?  I'm pretty sure that's a waste of time, too; but strncpy() shall do it for you (in addition to the time you've done it yourself).  In short: strncpy() doesn't do what you think it does; and what it does do is borked and stupid.  Please use strlcpy() instead, check its return and do something sensible on overflow.