From: Wincent Colaiuta Date: Fri, 31 Aug 2007 10:52:42 GMT Subject: Re: Buffer overflows Message-ID: In-Reply-To: <3f4fd2640708301534k40f07a1cva90a59d12ace6138@mail.gmail.com> El 31/8/2007, a las 0:34, Reece Dunn escribió: > As an example, do your safe API do null pointer checks. This is > because strcpy, strlen and the like don't, which is one of the reasons > why they are considered unsafe. But then, if you guarantee that you > are not passing a null pointer to one of these API, why take the hit > of the additional checks when you know that these are safe. Do you really think that comparing a pointer to NULL is going to be a speed hit? I would imagine that on most architectures it boils down to one or two machine code instructions. Cheers, Wincent