Module Name: src
Committed By: bouyer
Date: Mon Feb 1 21:45:57 UTC 2010
Modified Files:
src/crypto/dist/openssl/crypto/comp [netbsd-4]: c_zlib.c
Log Message:
Pull up following revision(s) (requested by taca in ticket #1378):
crypto/dist/openssl/crypto/comp/c_zlib.c: patch
Fix to deal with CVE-2009-4355 from OpenSSL's repositroy.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5.4.1 -r1.1.1.5.4.2 \
src/crypto/dist/openssl/crypto/comp/c_zlib.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/dist/openssl/crypto/comp/c_zlib.c
diff -u src/crypto/dist/openssl/crypto/comp/c_zlib.c:1.1.1.5.4.1 src/crypto/dist/openssl/crypto/comp/c_zlib.c:1.1.1.5.4.2
--- src/crypto/dist/openssl/crypto/comp/c_zlib.c:1.1.1.5.4.1 Sat Aug 25 17:52:33 2007
+++ src/crypto/dist/openssl/crypto/comp/c_zlib.c Mon Feb 1 21:45:57 2010
@@ -133,15 +133,6 @@
static int zlib_stateful_ex_idx = -1;
-static void zlib_stateful_free_ex_data(void *obj, void *item,
- CRYPTO_EX_DATA *ad, int ind,long argl, void *argp)
- {
- struct zlib_state *state = (struct zlib_state *)item;
- inflateEnd(&state->istream);
- deflateEnd(&state->ostream);
- OPENSSL_free(state);
- }
-
static int zlib_stateful_init(COMP_CTX *ctx)
{
int err;
@@ -185,6 +176,12 @@
static void zlib_stateful_finish(COMP_CTX *ctx)
{
+ struct zlib_state *state =
+ (struct zlib_state *)CRYPTO_get_ex_data(&ctx->ex_data,
+ zlib_stateful_ex_idx);
+ inflateEnd(&state->istream);
+ deflateEnd(&state->ostream);
+ OPENSSL_free(state);
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_COMP,ctx,&ctx->ex_data);
}
@@ -396,7 +393,7 @@
if (zlib_stateful_ex_idx == -1)
zlib_stateful_ex_idx =
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_COMP,
- 0,NULL,NULL,NULL,zlib_stateful_free_ex_data);
+ 0,NULL,NULL,NULL,NULL);
CRYPTO_w_unlock(CRYPTO_LOCK_COMP);
if (zlib_stateful_ex_idx == -1)
goto err;