[asterisk-commits] jpeeler: trunk r167125 - /trunk/main/asterisk.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jan 3 14:29:55 CST 2009


Author: jpeeler
Date: Sat Jan  3 14:29:54 2009
New Revision: 167125

URL: http://svn.digium.com/view/asterisk?view=rev&rev=167125
Log:
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.


Modified:
    trunk/main/asterisk.c

Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?view=diff&rev=167125&r1=167124&r2=167125
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Sat Jan  3 14:29:54 2009
@@ -2235,10 +2235,10 @@
 					t--;
 					break;
 				}
-				t++;
 			} else {
 				ast_str_append(&prompt, 0, "%c", *t);
 			}
+			t++;
 		}
 		if (color_used) {
 			/* Force colors back to normal at end */




More information about the asterisk-commits mailing list