Yo Ertic!

        cp = buffer;
        cq = tag;
-       while (*cq != '\0')
+       while (*cq != '\0' && cp < buffer + sizeof(buffer) - 1)
                *cp++ = *cq++;


Why not just use strlcpy?  NTPsec has its own copy if the OS does
not provide it.  This sort of bit-picky C code is where problems lurk.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        [email protected]  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin

Attachment: pgp5GyBL9eElM.pgp
Description: OpenPGP digital signature

_______________________________________________
devel mailing list
[email protected]
http://lists.ntpsec.org/mailman/listinfo/devel

Reply via email to