[asterisk-bugs] [Asterisk 0016261]: [patch] Conditional jump or move depends on uninitialised STACK value

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Nov 25 15:29:12 CST 2009


The following issue has been ASSIGNED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16261 
====================================================================== 
Reported By:                edguy3
Assigned To:                dvossel
====================================================================== 
Project:                    Asterisk
Issue ID:                   16261
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
JIRA:                       SWP-420 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!): 230313 
Request Review:              
====================================================================== 
Date Submitted:             2009-11-17 07:17 CST
Last Modified:              2009-11-25 15:29 CST
====================================================================== 
Summary:                    [patch] Conditional jump or move depends on
uninitialised STACK value
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) 
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-11-25 15:29 dvossel        Status                   ready for review =>
assigned
2009-11-25 15:29 dvossel        Assigned To               => dvossel         
======================================================================




More information about the asterisk-bugs mailing list