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
1.6.2
Jeff Peeler 17 years ago
parent e1f941d7f6
commit 334a89f754

@ -2235,10 +2235,10 @@ static char *cli_prompt(EditLine *editline)
t--;
break;
}
t++;
} else {
ast_str_append(&prompt, 0, "%c", *t);
}
t++;
}
if (color_used) {
/* Force colors back to normal at end */

Loading…
Cancel
Save