[asterisk-commits] file: trunk r103820 - /trunk/apps/app_authenticate.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 19 13:27:50 CST 2008


Author: file
Date: Tue Feb 19 13:27:50 2008
New Revision: 103820

URL: http://svn.digium.com/view/asterisk?view=rev&rev=103820
Log:
len already contains the position we want to examine, if we move one left again we'll actually probably be looking at a digit.
(issue #12030)
Reported by: alligosh

Modified:
    trunk/apps/app_authenticate.c

Modified: trunk/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_authenticate.c?view=diff&rev=103820&r1=103819&r2=103820
==============================================================================
--- trunk/apps/app_authenticate.c (original)
+++ trunk/apps/app_authenticate.c Tue Feb 19 13:27:50 2008
@@ -159,8 +159,8 @@
 					continue;
 
 				len = strlen(buf) - 1;
-				if (buf[len - 1] == '\n')
-					buf[len - 1] = '\0';
+				if (buf[len] == '\n')
+					buf[len] = '\0';
 
 				if (ast_test_flag(&flags, OPT_MULTIPLE)) {
 					md5secret = buf;




More information about the asterisk-commits mailing list