[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
Wed Jan 21 16:09:43 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14291 
====================================================================== 
Reported By:                dant
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   14291
Category:                   Core/Internationalization
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     assigned
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-21 16:09 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.



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

---------------------------------------------------------------------- 
 (0098365) svnbot (reporter) - 2009-01-21 16:09
 http://bugs.digium.com/view.php?id=14291#c98365 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 169794

U   trunk/main/say.c

------------------------------------------------------------------------
r169794 | mmichelson | 2009-01-21 16:09:42 -0600 (Wed, 21 Jan 2009) | 17
lines

Fix a crash when saying certain numbers in Chinese

This commit fixes a crash that was occurring when attempting to
say a number between 10000 and 100000 due to dividing by 0.

This also removes some places where a "zero" is spoken when it
should not be.


(closes issue http://bugs.digium.com/view.php?id=14291)
Reported by: dant
Patches:
      say.c-14291.diff uploaded by dant (license 670)
Tested by: dant



------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=169794 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-01-21 16:09 svnbot         Checkin                                      
2009-01-21 16:09 svnbot         Note Added: 0098365                          
======================================================================




More information about the asterisk-bugs mailing list