[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] DAV login problem (and a fix)

From: Robin Farine
Subject: Re: [Gnu-arch-users] DAV login problem (and a fix)
Date: 19 Nov 2003 08:27:54 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

>>>>> Yasushi Saito writes:

    > I noticed today that the DAV interface isn't usable. Without getting
    > into too much detail, here's my fix.
    > (The problem was that the user name and password weren't always
    > zero-terminated.)

I don't think that is the correct fix. Here is what hackerlab says
about str_cpy_n():

/*(c str_cpy_n)
 * t_uchar * str_cpy_n (t_uchar * to,
 *                      const t_uchar * from,
 *                      size_t n);
 * Copy up-to `n' characters from `from' to `to'.  
 * Add a final 0 to `to'.
 * \Warning:/ This function is different from `strncpy'.  `strncpy'
 * always stores exactly `n' characters in `to', padding the result
 * with 0 if a 0 character is encountered in `from' before `n'
 * characters are written.  This function stores up to `n+1' characters:
 * up to `n' non-0 characters from `from', plus a final 0.
 * Returns `to'.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]