[Home]

Summary:ASTERISK-15152: [patch] Conditional jump or move depends on uninitialised STACK value
Reporter:Ed Guy (edguy3)Labels:
Date Opened:2009-11-17 07:17:59.000-0600Date Closed:2009-11-25 15:31:36.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) edguy16261.patch
Description:Need to initialize "sin" before accessing its members.

==31642== Thread 25:
==31642== Conditional jump or move depends on uninitialised value(s)
==31642==    at 0x80D7252: ast_rtp_get_peer (rtp.c:2101)
==31642==    by 0x5D7EB7B: do_monitor (chan_sip.c:16928)
==31642==    by 0x810742B: dummy_start (utils.c:856)

                /* Might be a timeout now -- see if we're on hold */
                struct sockaddr_in sin;
                ast_rtp_get_peer(sip->rtp, &sin);

...
int ast_rtp_get_peer(struct ast_rtp *rtp, struct sockaddr_in *them)
{
       if ((them->sin_family != AF_INET) || ...


Same pattern repeats at line chan_sip.c:5688.

I believe initializing as follows will suffice:
struct sockaddr_in XXX = { 0, };

( unfortunately, this is not the crash for which I have been valgrinding)

****** ADDITIONAL INFORMATION ******

URL: http://svn.digium.com/svn/asterisk/branches/1.4
Revision: 230313
Comments:By: Digium Subversion (svnbot) 2009-11-25 15:30:46.000-0600

Repository: asterisk
Revision: 231233

U   branches/1.4/channels/chan_sip.c

------------------------------------------------------------------------
r231233 | dvossel | 2009-11-25 15:30:45 -0600 (Wed, 25 Nov 2009) | 8 lines

fixes conditional jump or move depending on uninitialised STACK value

(closes issue ASTERISK-15152)
Reported by: edguy3
Patches:
     edguy16261.patch uploaded by edguy3 (license 917)


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

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

By: Digium Subversion (svnbot) 2009-11-25 15:31:35.000-0600

Repository: asterisk
Revision: 231234

_U  trunk/

------------------------------------------------------------------------
r231234 | dvossel | 2009-11-25 15:31:35 -0600 (Wed, 25 Nov 2009) | 13 lines

Blocked revisions 231233 via svnmerge

........
 r231233 | dvossel | 2009-11-25 15:23:41 -0600 (Wed, 25 Nov 2009) | 8 lines
 
 fixes conditional jump or move depending on uninitialised STACK value
 
 (closes issue ASTERISK-15152)
 Reported by: edguy3
 Patches:
       edguy16261.patch uploaded by edguy3 (license 917)
........

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

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