ap_md5_binary, since we know the length of the string is always
MD5_DIGESTSIZE * 2
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92212
13f79535-47bb-0310-9956-
ffa450edef68
const char *hex = "0123456789abcdef";
apr_md5_ctx_t my_md5;
unsigned char hash[MD5_DIGESTSIZE];
- char *r, result[33];
+ char *r, result[33]; /* (MD5_DIGESTSIZE * 2) + 1 */
int i;
/*
}
*r = '\0';
- return apr_pstrdup(p, result);
+ return apr_pstrndup(p, result, MD5_DIGESTSIZE*2);
}
AP_DECLARE(char *) ap_md5(apr_pool_t *p, const unsigned char *string)