]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
md4: Use const for the length input parameter
authorSteve Holme <steve_holme@hotmail.com>
Sun, 23 Feb 2020 18:46:24 +0000 (18:46 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Sun, 23 Feb 2020 18:47:32 +0000 (18:47 +0000)
This keeps the interface the same as md5 and sha256.

lib/curl_md4.h
lib/md4.c

index 82df708cee3af0e45cd4840b0e8c0a67ffe2c0a1..c7bb2098154e33fac3930a747635eb783f4b3979 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -28,7 +28,8 @@
 
 #define MD4_DIGEST_LENGTH 16
 
-void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len);
+void Curl_md4it(unsigned char *output, const unsigned char *input,
+                const size_t len);
 
 #endif /* !defined(CURL_DISABLE_CRYPTO_AUTH) */
 
index 2cf674557538ea3bf2d66446502c052c52457dd6..87418647ae4a21f2185055f5fb96e62d7be6e187 100644 (file)
--- a/lib/md4.c
+++ b/lib/md4.c
@@ -508,9 +508,11 @@ static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
 
 #endif /* CRYPTO LIBS */
 
-void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len)
+void Curl_md4it(unsigned char *output, const unsigned char *input,
+                const size_t len)
 {
   MD4_CTX ctx;
+
   MD4_Init(&ctx);
   MD4_Update(&ctx, input, curlx_uztoui(len));
   MD4_Final(output, &ctx);