[Live-devel] segfault in our_srandom
Florian Winter
fw at graphics.cs.uni-sb.de
Tue Nov 11 15:38:54 PST 2003
hi!
i am currently implementing an RTPStrategy for the Network Multimedia
Middleware (NMM, www.networkmultimedia.org)
using LIVE.COM and I have the following problem: the our_random and
our_srandom functions seem to cause segmentation faults.
I replaced the implementation of these functions with calls to the
stdlib functions random() and srandom() and it seemed to work then.
it seems that our_srandom is accessing memory outside the random table.
I didn't look into it further, because the code is rather hard
to debug, as it uses pointers to elements of a static array...
maybe you should replace the implementation of our_srandom and
our_random by a less error-prone one. for example calculating an
integer index into the random table and then doing some bounds checking
(or a modulo operation) should at least prevent bad memory
accesses.
More information about the live-devel
mailing list