Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

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

From: Luciano Miguel Ferreira Rocha <strange(at)nsk.no-ip.org>
Date: Mon Nov 25 2002 - 15:25:26 EST

I don't know how one can expect better and more secure code from the community when this being a security list some post like this shows clearly no knowledge of C.

On Fri, Nov 22, 2002 at 10:27:53PM +0500, Ali Saifullah Khan wrote:
> Here is a test done on the return of sizes by sizeof() using pointers.

   ^^^^^^^^^^^^^^^^^^^^

Read it like this: new array with 1024 elements of type pointer to char. As a pointer occupies the natural word size (32 bits or 64bits), no wonder you get 4*1024 (sizeof(char *) * numer_of_elements).

> int len = sizeof(testbuff);

> using " int len = sizeof((char*)testbuff); "
sizeof returns the size of types. You can use it with vars (and then the normal form is sizeof var, not sizeof(var)), but if you're changing the type with the var with a cast, of course you'll get the size of that new type.

Regards,
Luciano Rocha

-- 
Consciousness: that annoying time between naps.
Received on Mon Nov 25 23:37:20 2002

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:44 EDT

Do you need help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library