|
|||||||||||
|
Re: Are bad developer libraries the problem with M$ software?
From: Frank Knobbe <fknobbe(at)knobbeits.com>
Date: Mon Nov 18 2002 - 22:25:46 EST On Mon, 2002-11-18 at 17:10, Andrew Griffiths wrote: > Another thing to use is consistency, for example,
If sizeof(dst) is 50, then a 0 terminated string is is 49 chars long (len(dst) is 49). That means we've got 50-49-1 = 0 which is correct as there is no room left in dst.
Of course in your example you allow dst to overflow in the strncpy.
Using
Frank
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:44 EDT |
||||||||||
|
|||||||||||