[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 45/63: conncache: Remove the DEBUGASSERT on length
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 45/63: conncache: Remove the DEBUGASSERT on length check |
Date: |
Fri, 07 Jun 2019 18:37:07 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit bdf6d8af3e7be26ed9b49f6bfae986ec44964429
Author: Steve Holme <address@hidden>
AuthorDate: Wed May 29 07:59:40 2019 +0100
conncache: Remove the DEBUGASSERT on length check
We trust the calling code as this is an internal function.
Closes #3962
---
lib/conncache.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/conncache.c b/lib/conncache.c
index 88463354b..2f4dd4bc3 100644
--- a/lib/conncache.c
+++ b/lib/conncache.c
@@ -61,6 +61,8 @@
Curl_share_unlock((x), CURL_LOCK_DATA_CONNECT)
#endif
+#define HASHKEY_SIZE 128
+
static void conn_llist_dtor(void *user, void *element)
{
struct connectdata *conn = element;
@@ -178,8 +180,6 @@ static void hashkey(struct connectdata *conn, char *buf,
/* report back which name we used */
*hostp = hostname;
- DEBUGASSERT(len > 32);
-
/* put the number first so that the hostname gets cut off if too long */
msnprintf(buf, len, "%ld%s", port, hostname);
}
@@ -224,7 +224,7 @@ struct connectbundle *Curl_conncache_find_bundle(struct
connectdata *conn,
struct connectbundle *bundle = NULL;
CONN_LOCK(conn->data);
if(connc) {
- char key[128];
+ char key[HASHKEY_SIZE];
hashkey(conn, key, sizeof(key), hostp);
bundle = Curl_hash_pick(&connc->hash, key, strlen(key));
}
@@ -277,7 +277,7 @@ CURLcode Curl_conncache_add_conn(struct conncache *connc,
bundle = Curl_conncache_find_bundle(conn, data->state.conn_cache, NULL);
if(!bundle) {
int rc;
- char key[128];
+ char key[HASHKEY_SIZE];
result = bundle_create(data, &new_bundle);
if(result) {
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [gnurl] 29/63: Revert all SASL authzid (new feature) commits, (continued)
- [GNUnet-SVN] [gnurl] 29/63: Revert all SASL authzid (new feature) commits, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 21/63: md4: include the mbedtls config.h to get the MD4 info, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 07/63: hiperfifo: remove unused variable, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 12/63: curl: --sasl-authzid added to support CURLOPT_SASL_AUTHZID from the tool, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 25/63: Fix typo., gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 37/63: conncache: make "bundles" per host name when doing proxy tunnels, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 35/63: curl-win32.h: Enable Unix Domain Sockets based on the Windows SDK version, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 42/63: appveyor: add support for other build systems, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 43/63: appveyor: add Visual Studio solution build, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 27/63: RELEASE-NOTES: synced, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 45/63: conncache: Remove the DEBUGASSERT on length check,
gnunet <=
- [GNUnet-SVN] [gnurl] 33/63: HAProxy tests: add keywords, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 32/63: tests: make test 1420 and 1406 work with rtsp-disabled libcurl, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 51/63: http: don't parse body-related headers bodyless responses, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 53/63: NTLM: reset proxy "multipass" state when CONNECT request is done, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 58/63: curl_share_setopt.3: improve wording [ci ship], gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 56/63: TODO: "at least N milliseconds between requests" [ci skip], gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 46/63: http2: Stop drain from being permanently set on, gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 19/63: os400: take care of CURLOPT_SASL_AUTHZID in curl_easy_setopt_ccsid()., gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 24/63: tool_setopt: for builds with disabled-proxy, skip all proxy setopts(), gnunet, 2019/06/07
- [GNUnet-SVN] [gnurl] 18/63: .github/FUNDING: mention our opencollective "home" [ci skip], gnunet, 2019/06/07