summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/md4
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/md4/md4.c5
-rw-r--r--src/lib/libcrypto/md4/md4.h5
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/md4/md4.c b/src/lib/libcrypto/md4/md4.c
index 42c5b21428..9cf1ff9532 100644
--- a/src/lib/libcrypto/md4/md4.c
+++ b/src/lib/libcrypto/md4/md4.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: md4.c,v 1.17 2024/03/28 08:00:07 jsing Exp $ */ 1/* $OpenBSD: md4.c,v 1.18 2024/06/01 07:36:16 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -336,10 +336,7 @@ unsigned char *
336MD4(const unsigned char *d, size_t n, unsigned char *md) 336MD4(const unsigned char *d, size_t n, unsigned char *md)
337{ 337{
338 MD4_CTX c; 338 MD4_CTX c;
339 static unsigned char m[MD4_DIGEST_LENGTH];
340 339
341 if (md == NULL)
342 md = m;
343 if (!MD4_Init(&c)) 340 if (!MD4_Init(&c))
344 return NULL; 341 return NULL;
345 MD4_Update(&c, d, n); 342 MD4_Update(&c, d, n);
diff --git a/src/lib/libcrypto/md4/md4.h b/src/lib/libcrypto/md4/md4.h
index cb4f3cb6e9..bf4313b345 100644
--- a/src/lib/libcrypto/md4/md4.h
+++ b/src/lib/libcrypto/md4/md4.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: md4.h,v 1.17 2023/07/08 06:47:26 jsing Exp $ */ 1/* $OpenBSD: md4.h,v 1.18 2024/06/01 07:36:16 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -92,8 +92,11 @@ typedef struct MD4state_st {
92 92
93int MD4_Init(MD4_CTX *c); 93int MD4_Init(MD4_CTX *c);
94int MD4_Update(MD4_CTX *c, const void *data, size_t len); 94int MD4_Update(MD4_CTX *c, const void *data, size_t len);
95 __attribute__ ((__bounded__(__buffer__, 2, 3)));
95int MD4_Final(unsigned char *md, MD4_CTX *c); 96int MD4_Final(unsigned char *md, MD4_CTX *c);
96unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md); 97unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md);
98 __attribute__ ((__nonnull__(3)))
99 __attribute__ ((__bounded__(__buffer__, 1, 2)));
97void MD4_Transform(MD4_CTX *c, const unsigned char *b); 100void MD4_Transform(MD4_CTX *c, const unsigned char *b);
98#ifdef __cplusplus 101#ifdef __cplusplus
99} 102}