First of all, it's been a while since I've written c, so I'm curious if
this is a bulk change I can do.



I'm changing code that another programmer did, but we got rid of him for
doing stupid things. So I'm auditing his source code on a few of our
customer's sites and I came across a strcat. And when I recompile it, I
got warnings saying that it's almost always misused, then I read the
manpage of strlcat and it seemed simple enough to do this:



strcat(mailbox, MAILSPOOLHOME);

strlcat(mailbox, MAILSPOOLHOME, sizeof(mailbox));



Should I look out for anything special or is it safe to do this
everywhere I see strcat or strcpy?

Reply via email to