lkml.org 
[lkml]   [1996]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: pi.c
Date
> 
> 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?)

Cheers,

--
joost witteveen
joost@rulcmc.leidenuniv.nl
joostje@debian.org
--
Use Debian/GNU Linux!

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.032 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site