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:
Jeff Peeler
2009-01-03 20:29:54 +00:00
parent e1f941d7f6
commit 334a89f754

View File

@@ -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 */