Re: Are bad developer libraries the problem with M$ software?

From: Andrew Griffiths (andrewg@d2.net.au)
Date: 11/19/02

  • Next message: Steven M. Christey: "RE: Are bad developer libraries the problem with M$ software?"
    Date: Tue, 19 Nov 2002 10:22:51 +1100
    From: Andrew Griffiths <andrewg@d2.net.au>
    To: Frank Knobbe <fknobbe@knobbeits.com>
    
    

    Frank Knobbe wrote:
    > On Mon, 2002-11-18 at 17:10, Andrew Griffiths wrote:
    >
    >
    >>Another thing to use is consistency, for example,
    >>

    > Of course in your example you allow dst to overflow in the strncpy.
    > Using
    > strncpy(dst, user_supplied_data, sizeof(dst)-1);
    > would have prevented that if my math is correct.
    >

    Yup, hence the need for consistency when dealing with the -1 in
    calcuations, etc.

    Sincerely,
    Andrew Griffiths