[asterisk-bugs] [Asterisk 0011348]: RTP session ID is negative half the time on x86_64

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Nov 26 09:25:47 CST 2007


The following issue has been ASSIGNED. 
====================================================================== 
http://bugs.digium.com/view.php?id=11348 
====================================================================== 
Reported By:                sperreault
Assigned To:                file
====================================================================== 
Project:                    Asterisk
Issue ID:                   11348
Category:                   Channels/chan_sip/General
Reproducibility:            random
Severity:                   major
Priority:                   normal
Status:                     assigned
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 89526 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             11-22-2007 08:19 CST
Last Modified:              11-26-2007 09:25 CST
====================================================================== 
Summary:                    RTP session ID is negative half the time on x86_64
Description: 
I'm surprised this hasn't been reported before (which makes me doubt my
findings).

ast_random() returns a positive long. When this gets truncated to an int,
it is no longer guaranteed positive. It will be negative exactly half the
time. This may make clients very unhappy. Eyebeam, for example, drops the
connection when it sees a negative session ID.
====================================================================== 

---------------------------------------------------------------------- 
 svnbot - 11-26-07 09:25  
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 89576

U   trunk/main/utils.c

------------------------------------------------------------------------
r89576 | file | 2007-11-26 09:25:47 -0600 (Mon, 26 Nov 2007) | 6 lines

Make the behavior of using /dev/urandom for random numbers the same as
random().
(closes issue http://bugs.digium.com/view.php?id=11348)
Reported by: sperreault
Patches:
      ast_random2.diff uploaded by sperreault (license 252)

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

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-26-07 09:25  svnbot         Checkin                                      
11-26-07 09:25  svnbot         Note Added: 0074316                          
11-26-07 09:25  svnbot         Status                   new => assigned     
11-26-07 09:25  svnbot         Assigned To               => file            
======================================================================




More information about the asterisk-bugs mailing list