Skip to content

Commit cfcbf0a

Browse files
InterLinked1Friendly Automation
authored and
Friendly Automation
committed
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
1 parent 92cb1c0 commit cfcbf0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main/pbx_variables.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ void pbx_substitute_variables_helper_full_location(struct ast_channel *c, struct
692692
int offset;
693693
int offset2;
694694
int isfunction;
695-
char *cp4;
695+
char *cp4 = NULL;
696696
char workspace[VAR_BUF_SIZE] = "";
697697

698698
/* We have a variable. Find the start and end, and determine

0 commit comments

Comments
 (0)