diff options
author | Jeff Trawick <trawick@apache.org> | 2006-04-12 03:58:08 +0200 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2006-04-12 03:58:08 +0200 |
commit | 7eb56e278685bd7db177daebdcad8ddde908831e (patch) | |
tree | 90e781d4da5477722369aba7cdeca852d7f09060 /support/htdbm.c | |
parent | The crypt() prototype is in <unistd.h> instead of <crypt.h> (diff) | |
download | apache2-7eb56e278685bd7db177daebdcad8ddde908831e.tar.xz apache2-7eb56e278685bd7db177daebdcad8ddde908831e.zip |
If we don't have a prototype for crypt() we shouldn't
be calling it.
Casting to the desired pointer return type hides the
truncation of the return value when sizeof(ptr) >
sizeof(int) and no prototype was included.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@393365 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support/htdbm.c')
-rw-r--r-- | support/htdbm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/support/htdbm.c b/support/htdbm.c index 84ab8f07e9..07057e7730 100644 --- a/support/htdbm.c +++ b/support/htdbm.c @@ -321,7 +321,7 @@ static apr_status_t htdbm_make(htdbm_t *htdbm) (void) srand((int) time((time_t *) NULL)); to64(&salt[0], rand(), 8); salt[8] = '\0'; - apr_cpystrn(cpw, (char *)crypt(htdbm->userpass, salt), sizeof(cpw) - 1); + apr_cpystrn(cpw, crypt(htdbm->userpass, salt), sizeof(cpw) - 1); fprintf(stderr, "CRYPT is now deprecated, use MD5 instead!\n"); #endif default: |