diff options
author | digit@chromium.org <digit@chromium.org@4ff67af0-8c30-449e-8e8b-ad334ec8d88c> | 2013-11-05 17:28:49 +0000 |
---|---|---|
committer | digit@chromium.org <digit@chromium.org@4ff67af0-8c30-449e-8e8b-ad334ec8d88c> | 2013-11-05 17:28:49 +0000 |
commit | 08086bd0f0dfbc08d121ccc6fbd27de9eaed55c7 (patch) | |
tree | bbf919c22943d537fb9a16aec3aa03278738e256 /openssl/ssl | |
parent | fc8760c61cfe4155d0636a956ed70726c4d19dd2 (diff) | |
download | openssl-08086bd0f0dfbc08d121ccc6fbd27de9eaed55c7.tar.gz |
sh implementation to avoid unwanted resizes during iteration.
This is a port of the following AOSP patch:
https://android-review.googlesource.com/#/c/68853/
It fixes a bug that happens when trying to delete items from
a lhash table while it is being iterated over with a call
to lh_doall or lh_doall_arg.
It looks like the source tree is slightly out-of-sync from
the state of running ./import_from_android.sh, but the differences
are minor / not significant.
This patch tries to fix a P1 bug, so doesn't try to address this
(the differences have been removed for easier reviewing).
BUG=298606
R=agl@chromium.org,rsleevi@chromium.org,wtc@chromium.org
TBR=darin@chromium.org
Review URL: https://codereview.chromium.org/59793002
git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/openssl@233017 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Diffstat (limited to 'openssl/ssl')
-rw-r--r-- | openssl/ssl/ssl_sess.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/openssl/ssl/ssl_sess.c b/openssl/ssl/ssl_sess.c index 85360af..4f6af55 100644 --- a/openssl/ssl/ssl_sess.c +++ b/openssl/ssl/ssl_sess.c @@ -999,11 +999,8 @@ void SSL_CTX_flush_sessions(SSL_CTX *s, long t) if (tp.cache == NULL) return; tp.time=t; CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX); - i=CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load; - CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load=0; lh_SSL_SESSION_doall_arg(tp.cache, LHASH_DOALL_ARG_FN(timeout), TIMEOUT_PARAM, &tp); - CHECKED_LHASH_OF(SSL_SESSION, tp.cache)->down_load=i; CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX); } |