mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 02:48:29 +00:00
When parsing environment variable ASTERISK_PROMPT, make sure to proceed to the next character when a non format specifier is used (no %). Otherwise, the while loop looking for the null byte will never exit.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2235,10 +2235,10 @@ static char *cli_prompt(EditLine *editline)
|
|||||||
t--;
|
t--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
t++;
|
|
||||||
} else {
|
} else {
|
||||||
ast_str_append(&prompt, 0, "%c", *t);
|
ast_str_append(&prompt, 0, "%c", *t);
|
||||||
}
|
}
|
||||||
|
t++;
|
||||||
}
|
}
|
||||||
if (color_used) {
|
if (color_used) {
|
||||||
/* Force colors back to normal at end */
|
/* Force colors back to normal at end */
|
||||||
|
|||||||
Reference in New Issue
Block a user