Potential divison-by-zero in outqueue.cpp:241

Jonas Schwertfeger <[email protected]>
Newsgroups gmane.comp.gnu.ccrtp.devel
Message-ID <[email protected]>
Line 241 in outqueue.cpp produces division-by-zero exceptions for RTP 
clock rates < 1000 because "(rate/1000ul)" evaluates to 0 for rates < 
1000. I modified the original line

send.tv_usec = (1000ul*rem) / (rate/1000ul);

to

send.tv_usec = 1000000ul*(rem/rate);

which fixes the bug. If you ever need clock rates below 1000 you'll have 
to fix this bug manually until it is fixed by the ccRTP maintainers in a 
future release.

Regards
Jonas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.