News for hackers. Stuff that matters.
Re:Stop using strncpy already (2013) by hzhou321 on Friday August 31, 2018 @01:55PM (#17887567)
What I meant is more like:

    #define BUFSIZE 100
    char buf[BUFSIZE+1]
    buf[BUFSIZE]=0 // for global var, it is already zeroed, right?
Then one can call strncpy(buf, BUFSIZE, ...) without worrying about null-termination.

There are no comments on this comment yet.