Change EVP_MAXCHUNK so it doesn't wraparound to 0 on some platforms (IP32L64).
authorDr. Stephen Henson <steve@openssl.org>
Sat, 3 Dec 2011 21:44:01 +0000 (21:44 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sat, 3 Dec 2011 21:44:01 +0000 (21:44 +0000)
crypto/evp/evp_locl.h

index 94162d6419020372eb49d0aee4bc5fe8ececa6ae..6d1753522a95ec1f34b8f3b9d1c6f9f9b3dc94c4 100644 (file)
@@ -75,7 +75,7 @@ static int cname##_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const uns
        return 1;\
 }
 
-#define EVP_MAXCHUNK ((size_t)1<<(sizeof(long)*8-2))
+#define EVP_MAXCHUNK ((size_t)1<<(sizeof(int)*8-2))
 
 #define BLOCK_CIPHER_func_ofb(cname, cprefix, cbits, kstruct, ksched) \
 static int cname##_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) \