]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Look at the correct buffer for our digest info instead of an empty one.
authorSean Bright <sean@malleable.com>
Thu, 5 May 2011 02:25:20 +0000 (02:25 +0000)
committerSean Bright <sean@malleable.com>
Thu, 5 May 2011 02:25:20 +0000 (02:25 +0000)
(issue #18598)
Reported by: ksn

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

main/utils.c

index 25e6a7ec1bf8bb530947a1a35fb1a6eb18042c36..bd6805b16d6a11b4080e8a46135bf13e069bcbaf 100644 (file)
@@ -1958,7 +1958,7 @@ int ast_utils_init(void)
  */
 int ast_parse_digest(const char *digest, struct ast_http_digest *d, int request, int pedantic) {
        int i;
-       char *c, key[512], val[512], tmp[512];
+       char *c, key[512], val[512];
        struct ast_str *str = ast_str_create(16);
 
        if (ast_strlen_zero(digest) || !d || !str) {
@@ -1970,7 +1970,7 @@ int ast_parse_digest(const char *digest, struct ast_http_digest *d, int request,
 
        c = ast_skip_blanks(ast_str_buffer(str));
 
-       if (strncasecmp(tmp, "Digest ", strlen("Digest "))) {
+       if (strncasecmp(c, "Digest ", strlen("Digest "))) {
                ast_log(LOG_WARNING, "Missing Digest.\n");
                ast_free(str);
                return -1;