Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/openssl/dist/crypto/comp Fix to deal wit...
details: https://anonhg.NetBSD.org/src/rev/3ec1b6e3e784
branches: trunk
changeset: 751020:3ec1b6e3e784
user: taca <taca%NetBSD.org@localhost>
date: Fri Jan 22 03:42:47 2010 +0000
description:
Fix to deal with CVE-2009-4355 from OpenSSL's repositroy.
diffstat:
crypto/external/bsd/openssl/dist/crypto/comp/c_zlib.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diffs (41 lines):
diff -r dd57b0a8a661 -r 3ec1b6e3e784 crypto/external/bsd/openssl/dist/crypto/comp/c_zlib.c
--- a/crypto/external/bsd/openssl/dist/crypto/comp/c_zlib.c Fri Jan 22 01:22:00 2010 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/comp/c_zlib.c Fri Jan 22 03:42:47 2010 +0000
@@ -136,15 +136,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;
@@ -188,6 +179,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);
}
@@ -402,7 +399,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;
Home |
Main Index |
Thread Index |
Old Index