[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
strlcpy manpage
- To: misc@openbsd.org
- Subject: strlcpy manpage
- From: Jacob Meuser <jakemsr@jakemsr.com>
- Date: Mon, 18 Mar 2002 03:39:00 -0800
- Content-Disposition: inline
- User-Agent: Mutt/1.3.27i
At the bottom strlcpy manpage, there's an example:
char *dir, *file, pname[MAXPATHLEN];
size_t n;
...
n = strlcpy(pname, dir, sizeof(pname));
if (n >= sizeof(pname))
goto toolong;
if (strlcpy(pname + n, file, sizeof(pname) - n) >= sizeof(pname) -n)
goto toolong;
Earlier in the manpage, it says arg 1 of strlcpy should be a true "C"
string. Is the " + n" in the second strlcpy an error, or am I missing
something here?
--
<jakemsr@jakemsr.com>