[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ccrtp-devel] Potential divison-by-zero in outqueue.cpp:241

From: Jonas Schwertfeger
Subject: [Ccrtp-devel] Potential divison-by-zero in outqueue.cpp:241
Date: Tue, 24 May 2005 01:56:57 +0200
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

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);


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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]