You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by SiPlus <hw...@gmail.com> on 2012/08/29 10:40:20 UTC
Pull request: server/util_md5.c:58 - replace magic number with constant
arithmetic
Hello, dev@.
I request a little change to HTTPD code.
On line 58 of server/util_md5.c, please replace
char *r, result[33]; /* (MD5_DIGESTSIZE * 2) + 1 */
with
char *r, result[2*APR_MD5_DIGESTSIZE+1];
There's only constant arithmetic here, so I don't see a reason to
pre-calculate the size here, and other code files use
2*APR_MD5_DIGESTSIZE+1 often.
Thanks,
SiPlus
Re: Pull request: server/util_md5.c:58 - replace magic number with constant
arithmetic
Posted by pqf <pq...@mailtech.cn>.
Some C compilers don't support this: result[2*APR_MD5_DIGESTSIZE+1] ?
Hello, dev@.
I request a little change to HTTPD code.
On line 58 of server/util_md5.c, please replace
char *r, result[33]; /* (MD5_DIGESTSIZE * 2) + 1 */
with
char *r, result[2*APR_MD5_DIGESTSIZE+1];
There's only constant arithmetic here, so I don't see a reason to
pre-calculate the size here, and other code files use
2*APR_MD5_DIGESTSIZE+1 often.
Thanks,
SiPlus