[asterisk-bugs] [Asterisk 0014291]: [patch] Floating point exception crash when saying number between 9999 and 100000 with zh or tw language

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Jan 20 22:39:20 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14291 
====================================================================== 
Reported By:                dant
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14291
Category:                   Core/Internationalization
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-01-20 21:46 CST
Last Modified:              2009-01-20 22:39 CST
====================================================================== 
Summary:                    [patch] Floating point exception crash when saying
number between 9999 and 100000 with zh or tw language
Description: 
Issue 12319 introduced some new code to say.c to make saying numbers in
Chinese more correct... This code causes an asterisk crash when trying to
say a number between 10000 and 99999 inclusive.

The crash occurs in ast_say_number_full_tw in say.c when performing 
if (((num / 10000) % (num/100000)) == 0)
  playz++;
in the section of code that deal with numbers between 10000 and 100000000,
which, for numbers below 100000 results in a divide by zero issue due to it
being an integer operator causing an untrapped floating point exception.



====================================================================== 

---------------------------------------------------------------------- 
 (0098297) dant (reporter) - 2009-01-20 22:39
 http://bugs.digium.com/view.php?id=14291#c98297 
---------------------------------------------------------------------- 
Patch uploaded (currently License PENDING, so may not be visible to all)
that removes the mentioned line and also removes a few more lines from that
function that cause it to add extra zeros when dealing with numbers over
99999 in a place they shouldn't be... e.g. 999999 should be 99 wan 9
thousand 9 hundred 99, without the additional lines removed it is said as
99 wan 09 thousand 9 hundred 99... 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-01-20 22:39 dant           Note Added: 0098297                          
======================================================================




More information about the asterisk-bugs mailing list