[openssh-commits] [openssh] 02/03: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Tue May 5 19:11:24 AEST 2015


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 0b53416bbe6c765d4b8825c2ebc106ee1fabdd4d
Author: Damien Miller <djm at mindrot.org>
Date:   Tue May 5 19:10:23 2015 +1000

    upstream commit
    
       - deraadt at cvs.openbsd.org 2015/01/08 00:30:07
         [bcrypt_pbkdf.c]
         declare a local version of MIN(), call it MINIMUM()
---
 openbsd-compat/bcrypt_pbkdf.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/openbsd-compat/bcrypt_pbkdf.c b/openbsd-compat/bcrypt_pbkdf.c
index f412829..905fc5d 100644
--- a/openbsd-compat/bcrypt_pbkdf.c
+++ b/openbsd-compat/bcrypt_pbkdf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcrypt_pbkdf.c,v 1.10 2014/12/30 01:41:43 djm Exp $ */
+/* $OpenBSD: bcrypt_pbkdf.c,v 1.12 2015/01/08 00:30:07 deraadt Exp $ */
 /*
  * Copyright (c) 2013 Ted Unangst <tedu at openbsd.org>
  *
@@ -37,6 +37,8 @@
 #endif
 #define SHA512_DIGEST_LENGTH crypto_hash_sha512_BYTES
 
+#define	MINIMUM(a,b) (((a) < (b)) ? (a) : (b))
+
 /*
  * pkcs #5 pbkdf2 implementation using the "bcrypt" hash
  *
@@ -158,7 +160,7 @@ bcrypt_pbkdf(const char *pass, size_t passlen, const u_int8_t *salt, size_t salt
 		/*
 		 * pbkdf2 deviation: output the key material non-linearly.
 		 */
-		amt = MIN(amt, keylen);
+		amt = MINIMUM(amt, keylen);
 		for (i = 0; i < amt; i++) {
 			size_t dest = i * stride + (count - 1);
 			if (dest >= origkeylen)

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list