X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/42c7f0b4ea09d8971a19beeef743ec8981d4aacc..3d2e82c5729148f3f88fbb7de7e6dcbc20d0c867:/src/src/lookups/redis.c diff --git a/src/src/lookups/redis.c b/src/src/lookups/redis.c index 6de675787..53bd8d53d 100644 --- a/src/src/lookups/redis.c +++ b/src/src/lookups/redis.c @@ -163,13 +163,13 @@ if (!cn) socket ? redisConnectUnix(CCS socket) : redisConnect(CCS server, port); if (!redis_handle) { - *errmsg = string_sprintf("REDIS connection failed"); + *errmsg = US"REDIS connection failed"; *defer_break = FALSE; goto REDIS_EXIT; } /* Add the connection to the cache */ - cn = store_get(sizeof(redis_connection)); + cn = store_get(sizeof(redis_connection), FALSE); cn->server = server_copy; cn->handle = redis_handle; cn->next = redis_connections; @@ -227,8 +227,7 @@ if(sdata[1]) /* Run the command. We use the argv form rather than plain as that parses into args by whitespace yet has no escaping mechanism. */ - redis_reply = redisCommandArgv(redis_handle, i, (const char **) argv, NULL); - if (!redis_reply) + if (!(redis_reply = redisCommandArgv(redis_handle, i, CCSS argv, NULL))) { *errmsg = string_sprintf("REDIS: query failed: %s\n", redis_handle->errstr); *defer_break = FALSE; @@ -333,7 +332,7 @@ switch (redis_reply->type) if (result) - store_reset(result->s + result->ptr + 1); + gstring_release_unused(result); else { yield = FAIL; @@ -416,7 +415,7 @@ while ((c = *t++) != 0) if (isspace(c) || c == '\\') count++; if (count == 0) return s; -t = quoted = store_get(Ustrlen(s) + count + 1); +t = quoted = store_get(Ustrlen(s) + count + 1, is_tainted(s)); while ((c = *s++) != 0) {