From: Jeff Peeler Date: Sat, 3 Jan 2009 20:29:54 +0000 (+0000) Subject: When parsing environment variable ASTERISK_PROMPT, make sure to proceed to the next... X-Git-Tag: 1.6.2.0-beta1~507 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=334a89f7546ed7689e986d465833e84cbdc2f2d0;p=thirdparty%2Fasterisk.git 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 --- diff --git a/main/asterisk.c b/main/asterisk.c index 2b3832a4d1..ccacc6aa6d 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -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 */