mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
off by one error
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -170,8 +170,8 @@ static int auth_exec(struct ast_channel *chan, void *data)
|
|||||||
fgets(buf, sizeof(buf), f);
|
fgets(buf, sizeof(buf), f);
|
||||||
if (!feof(f) && !ast_strlen_zero(buf)) {
|
if (!feof(f) && !ast_strlen_zero(buf)) {
|
||||||
size_t len = strlen(buf);
|
size_t len = strlen(buf);
|
||||||
if (buf[len] == '\n')
|
if (buf[len - 1] == '\n')
|
||||||
buf[len] = '\0';
|
buf[len - 1] = '\0';
|
||||||
if (ast_test_flag(&flags,OPT_MULTIPLE)) {
|
if (ast_test_flag(&flags,OPT_MULTIPLE)) {
|
||||||
md5secret = strchr(buf, ':');
|
md5secret = strchr(buf, ':');
|
||||||
if (md5secret == NULL)
|
if (md5secret == NULL)
|
||||||
|
Reference in New Issue
Block a user