<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Arial" size="2"><span style="font-size:10pt;">
<div>Hello All,</div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div>In the both “ACE_Stats::quotient” methods there seems a potential division by zero problem (See below). It is independent of platform, this is why I didn’t send the problem in a Problem Report. And I checked the latest version in ACE SVN as well. It seems
still same in the latest version.</div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><b>ACE Version     </b><b>:</b> V 630</div>
<div><b>File             :</b> Stats.cpp</div>
<div><b>Method  </b><b>:</b></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Consolas" color="#7F0055"><b>void</b></font></div>
<div><font face="Consolas"><b>ACE_Stats::quotient</b> (<font color="#7F0055"><b>const</b></font> <font color="#005032">ACE_UINT64</font> dividend,</font></div>
<div><font face="Consolas">                     <font color="#7F0055"><b>const</b></font> ACE_UINT32 divisor,</font></div>
<div><font face="Consolas">                     <font color="#005032">ACE_Stats_Value</font> &quotient)</font></div>
<div><font face="Consolas">{</font></div>
<div><font face="Consolas">  <font color="#3F7F5F">// The whole part of the division comes from simple integer division.</font></font></div>
<div><font face="Consolas">  quotient.whole (<font color="#7F0055"><b>static_cast</b></font><ACE_UINT32> (divisor == 0</font></div>
<div><font face="Consolas">                                           ?  0  :  dividend / divisor));</font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Consolas">  <font color="#7F0055"><b>if</b></font> (quotient.precision () > 0  <b>||  divisor == 0</b>)</font></div>
<div><font face="Consolas">    {</font></div>
<div><font face="Consolas">      <font color="#7F0055"><b>const</b></font> ACE_UINT32 <span style="background-color:yellow;">field</span> = quotient.fractional_field ();</font></div>
<div><font face="Consolas">…</font></div>
<div><font face="Consolas">      quotient.fractional (<font color="#7F0055"><b>static_cast</b></font><ACE_UINT32> (</font></div>
<div><font face="Consolas">                             dividend % divisor * <span style="background-color:silver;">field</span> / <b>divisor</b>));</font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div>With best regards,</div>
<div>Okan Vural</div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
</span></font>
</body>
</html>