<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-15"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Playing with my dispatcher configuration (openser-1.2.1) I discovered
that ds_select_dst() crashes openser when dispatche param
ds_use_default is set to 1 and the set from where the destination is
picked up contains just one address. This appens because in dispatch.c
at row 784 the code is<br>
<br>
if(ds_use_default!=0)<br>
                hash = hash%(_ds_list[idx].nr-1);<br>
        else<br>
                hash = hash%_ds_list[idx].nr;<br>
<br>
so if ds_use_default is set and the address set has 1 destination the %
causes a crash.<br>
To avoid this it's enough to modifiy the if statement like:<br>
<br>
if (ds_use_default!=0 &amp;&amp; _ds_list[idx].nr!=1)<br>
<br>
Just my two cents.<br>
Regards,<br>
Federico<br>
<div class="moz-signature">-- <br>
<title>Federico Cabiddu</title>
<p class="MsoNormal">
</p>
<p style="margin-top: 0pt; margin-bottom: 0pt;"><font face="arial"><font
 size="2">Federico Cabiddu
R&amp;D Software Engineering<br>
Abbeynet S.p.A. - <a href="http://www.abbeynet.com"> www.abbeynet.com</a><br>
<br>
phone: +39 070 2339349<br>
<br>
<a href="http://www.federico_cabiddu.sitofono.it"> <img
 src="cid:part1.01030704.08080602@abbeynet.it" border="0"></a></font></font></p>
<p><br>
</p>
</div>
</body>
</html>