Can't type ten steenking lines without a glaring bug...

John A. Weeks III john at newave.UUCP
Thu Apr 11 08:58:54 AEST 1991


In article <3676 at inews.intel.com> bhoughto at nevin.intel.com (Blair P. Houghton) writes:
>In article <3661 at inews.intel.com> bhoughto at hopi.intel.com (Blair P. Houghton, simpering, compiler-wastrel, code-anal weenie) writes:
>>	buf = (char *) malloc ( stb.st_size * (sizeof (char *)) );

>Of course, the second line above should be

>	buf = (char *) malloc ( stb.st_size );

At least the buffer size was as big as or bigger than expected,
rather than smaller.  Buffer that are too small make running 
programs rather interesting....  8-)

-john-

-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
John A. Weeks III               (612) 942-6969             john at newave.mn.org
NeWave Communications                       ...uunet!tcnet!wd0gol!newave!john



More information about the Comp.lang.c mailing list