Summary: | ASTERISK-15900: [patch] Potential malfunction due to unitialized local variable | ||
Reporter: | John Covert (jcovert) | Labels: | |
Date Opened: | 2011-01-18 19:39:20.000-0600 | Date Closed: | 2011-05-06 13:03:13 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) chan_sip.c.patch | |
Description: | The compiler correctly reports: In function 'parse_register_contact': 'single_binding_found' may be used uninitialized Upon inspection, if (!strcasecmp(curi, "*")) we will set wildcard = 1 and single_binding_found will have a random value, since initialization of local variables is undefined. At the next line: if (wildcard_found && (ast_strlen_zero(expires) || expire != 0 || single_binding_found)) we now test single binding found in an "or", and the result will be random. A patch to 1.8 head is provided. | ||
Comments: | By: Digium Subversion (svnbot) 2011-01-19 09:45:19.000-0600 Repository: asterisk Revision: 302414 U branches/1.8/channels/chan_sip.c ------------------------------------------------------------------------ r302414 | seanbright | 2011-01-19 09:45:18 -0600 (Wed, 19 Jan 2011) | 7 lines Initialize an uninitialied variable. (closes issue ASTERISK-15900) Reported by: jcovert Patches: chan_sip.c.patch uploaded by jcovert (license 551) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=302414 By: Digium Subversion (svnbot) 2011-01-19 09:46:29.000-0600 Repository: asterisk Revision: 302414 U branches/1.8/channels/chan_sip.c ------------------------------------------------------------------------ r302414 | seanbright | 2011-01-19 09:45:17 -0600 (Wed, 19 Jan 2011) | 7 lines Initialize an uninitialized variable. (closes issue ASTERISK-15900) Reported by: jcovert Patches: chan_sip.c.patch uploaded by jcovert (license 551) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=302414 By: Digium Subversion (svnbot) 2011-01-19 09:46:58.000-0600 Repository: asterisk Revision: 302415 _U trunk/ U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r302415 | seanbright | 2011-01-19 09:46:57 -0600 (Wed, 19 Jan 2011) | 14 lines Merged revisions 302414 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r302414 | seanbright | 2011-01-19 10:45:17 -0500 (Wed, 19 Jan 2011) | 7 lines Initialize an uninitialized variable. (closes issue ASTERISK-15900) Reported by: jcovert Patches: chan_sip.c.patch uploaded by jcovert (license 551) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=302415 By: Digium Subversion (svnbot) 2011-05-06 12:59:10 Repository: asterisk Revision: 317719 U branches/1.4/channels/chan_sip.c ------------------------------------------------------------------------ r317719 | rmudgett | 2011-05-06 12:59:09 -0500 (Fri, 06 May 2011) | 11 lines Regression after r297603 (Improve handling of REGISTER requests with multiple contact headers.) Uninitialized variable. (issue ASTERISK-15900) (closes issue ASTERISK-17382) Reported by: pnlarsson Patches: issue18785_enegaard.patch uploaded by enegaard (license 1197) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=317719 By: Digium Subversion (svnbot) 2011-05-06 13:03:13 Repository: asterisk Revision: 317720 _U branches/1.6.2/ U branches/1.6.2/channels/chan_sip.c ------------------------------------------------------------------------ r317720 | rmudgett | 2011-05-06 13:03:13 -0500 (Fri, 06 May 2011) | 18 lines Merged revisions 317719 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r317719 | rmudgett | 2011-05-06 12:59:05 -0500 (Fri, 06 May 2011) | 11 lines Regression after r297603 (Improve handling of REGISTER requests with multiple contact headers.) Uninitialized variable. (issue ASTERISK-15900) (closes issue ASTERISK-17382) Reported by: pnlarsson Patches: issue18785_enegaard.patch uploaded by enegaard (license 1197) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=317720 |