Re: pi.c

joost witteveen (
Mon, 19 Aug 1996 14:57:06 +0200 (MET DST)

> Hi all!
> I am not really sure, if this mail is offtopic - sorry,
> but to this list contribute most linux gurus.

Yes, it's off-topic (I shouldn't post it here eighter, I'm sorry).

> I have following problem: When I compile this program

It's sloppy programme:
With efence, and changeing the declaration
for stor to "long *stor", and mallocing
the longs in main(), I saw: that at the end of the
xprint routine, the following assignment was made (at the end).
stor[(int(++loc)] = m,
with loc being 21. This is out-of bound, I'm sorry.
Aloccating 10000 bytes for stor makes everything OK.
(at least for 4000 digits).

Posting it to linux-kernel anyway so that other pepole don't waist time
on this. (You're reading linux-kernel sorted by thread, anyway, dont' you?)


joost witteveen

Use Debian/GNU Linux!