[Asterisk-code-review] pbx_variables: initialize uninitialized variable (asterisk[master])
Friendly Automation
asteriskteam at digium.com
Wed Dec 15 10:49:10 CST 2021
Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/17654 )
Change subject: pbx_variables: initialize uninitialized variable
......................................................................
pbx_variables: initialize uninitialized variable
The variable cp4 in a variable substitution function
can potentially be used without being initialized
currently. This causes Asterisk to no longer compile.
This initializes cp4 to NULL to make the compiler
happy.
ASTERISK-29803 #close
Change-Id: I392579cbb76db2795d5820c9427cf55fbcee9e72
---
M main/pbx_variables.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Michael Bradeen: Looks good to me, but someone else must approve
Friendly Automation: Approved for Submit
diff --git a/main/pbx_variables.c b/main/pbx_variables.c
index 2088740..7a85989 100644
--- a/main/pbx_variables.c
+++ b/main/pbx_variables.c
@@ -692,7 +692,7 @@
int offset;
int offset2;
int isfunction;
- char *cp4;
+ char *cp4 = NULL;
char workspace[VAR_BUF_SIZE] = "";
/* We have a variable. Find the start and end, and determine
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/17654
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I392579cbb76db2795d5820c9427cf55fbcee9e72
Gerrit-Change-Number: 17654
Gerrit-PatchSet: 2
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211215/de98b463/attachment-0001.html>
More information about the asterisk-code-review
mailing list