[asterisk-bugs] [JIRA] (ASTERISK-29803) pbx_variables: cp4 variables is used uninitialized

Friendly Automation (JIRA) noreply at issues.asterisk.org
Wed Dec 15 10:50:44 CST 2021


    [ https://issues.asterisk.org/jira/browse/ASTERISK-29803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=257446#comment-257446 ] 

Friendly Automation commented on ASTERISK-29803:
------------------------------------------------

Change 17689 merged by Friendly Automation:
pbx_variables: initialize uninitialized variable

[https://gerrit.asterisk.org/c/asterisk/+/17689|https://gerrit.asterisk.org/c/asterisk/+/17689]

> pbx_variables: cp4 variables is used uninitialized
> --------------------------------------------------
>
>                 Key: ASTERISK-29803
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29803
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: PBX/General
>    Affects Versions: 18.9.0
>         Environment: Debian 11
>            Reporter: N A
>            Assignee: N A
>            Severity: Critical
>
> GCC must be getting more stringent every day.
> Asterisk no longer compiles because of this:
> {noformat}
> pbx_variables.c: In function ‘pbx_substitute_variables_helper_full_location’:
> pbx_variables.c:778:7: error: ‘cp4’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
>   778 |    if (cp4) {
>       |       ^
> pbx_variables.c:694:10: note: ‘cp4’ was declared here
>   694 |    char *cp4;
>       |          ^~~
> {noformat}
> Initializing cp4 to NULL fixes the issue.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list