]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
len already contains the position we want to examine, if we move one left again we...
authorJoshua Colp <jcolp@digium.com>
Tue, 19 Feb 2008 19:27:50 +0000 (19:27 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 19 Feb 2008 19:27:50 +0000 (19:27 +0000)
(issue #12030)
Reported by: alligosh

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103820 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_authenticate.c

index 429971c36d6d3ee634cd04051bf07f25317cc77c..48574a4772d6d19654ce536adf1e917926f9efc4 100644 (file)
@@ -159,8 +159,8 @@ static int auth_exec(struct ast_channel *chan, void *data)
                                        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;