[pjsip] Divide by Zero Error

Jim Gomes Jim.Gomes at tideworks.com
Fri Feb 22 19:23:57 EST 2008



The following code in the function pjmedia_silence_det_set_params(...)
gave a divide by zero error:

    sd->min_signal_cnt = min_signal / sd->ptime;

    sd->min_silence_cnt = min_silence / sd->ptime;

    sd->recalc_cnt = recalc_time / sd->ptime;


I was experiencing other errors, but this code should be protected
against error conditions and should check the value of sd->ptime for
zero before performing the division operation.


Jim Gomes
Senior Software Engineer
Gate Technologies
Tideworks Technology, Inc.
(206) 382-2197

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080222/c10435c1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2743 bytes
Desc: image001.jpg
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080222/c10435c1/attachment.jpg>

More information about the pjsip mailing list