diff options
-rw-r--r-- | apps/app_voicemail.c | 2 | ||||
-rw-r--r-- | utils/astman.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index dec07f918..c15b39ff6 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -582,7 +582,7 @@ static struct ast_vm_user *find_user(struct ast_vm_user *ivm, const char *contex while (cur) { if (ast_test_flag((&globalflags), VM_SEARCH) && !strcasecmp(mailbox, cur->mailbox)) break; - if ((!strcasecmp(context, cur->context)) && (!strcasecmp(mailbox, cur->mailbox))) + if (context && (!strcasecmp(context, cur->context)) && (!strcasecmp(mailbox, cur->mailbox))) break; cur=cur->next; } diff --git a/utils/astman.c b/utils/astman.c index 20ae8ec87..c74f5f787 100644 --- a/utils/astman.c +++ b/utils/astman.c @@ -660,8 +660,8 @@ static int login(char *hostname) struct MD5Context md5; unsigned char digest[16]; MD5Init(&md5); - MD5Update(&md5, challenge, strlen(challenge)); - MD5Update(&md5, pass, strlen(pass)); + MD5Update(&md5, (unsigned char *)challenge, strlen(challenge)); + MD5Update(&md5, (unsigned char *)pass, strlen(pass)); MD5Final(digest, &md5); for (x=0; x<16; x++) len += sprintf(md5key + len, "%2.2x", digest[x]); |