Commit Graph

56 Commits

Author SHA1 Message Date
Chris Lamb
a4754e228f
Correct 'certificate' typo. (#10867) 2022-06-15 13:37:39 +03:00
michael-grunder
47400870ae Reapply: Rename sds calls so they don't conflict.
Reapply this commit on top of hiredis as a local change. Previosuly it
was pulled from a private hiredis branch, which resulted with it going
away on subtree pull.
2022-02-14 14:00:57 +02:00
Yossi Gottlieb
886a04c2c3 Merge commit '418de21d8feb35303904ec718fcd1387e4699d2f' into refresh-hiredis 2022-02-14 13:52:57 +02:00
Yossi Gottlieb
922ef86a3b
hiredis: improve calloc() overflow fix. (#9630)
Cherry pick a more complete fix to 0215324a6 that also doesn't leak
memory from latest hiredis.
2021-10-12 20:16:29 +03:00
Oran Agra
0215324a66
Fix redis-cli / redis-sential overflow on some platforms (CVE-2021-32762) (#9587)
The redis-cli command line tool and redis-sentinel service may be vulnerable
to integer overflow when parsing specially crafted large multi-bulk network
replies. This is a result of a vulnerability in the underlying hiredis
library which does not perform an overflow check before calling the calloc()
heap allocation function.

This issue only impacts systems with heap allocators that do not perform their
own overflow checks. Most modern systems do and are therefore not likely to
be affected. Furthermore, by default redis-sentinel uses the jemalloc allocator
which is also not vulnerable.

Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2021-10-04 12:10:17 +03:00
Yunier Pérez
12e4f31d94
Allow to override OPENSSL_PREFIX (#9567)
While the original issue was on Linux, this should work for other
platforms as well.
2021-09-30 15:51:19 +03:00
sundb
4bc14da2b3
Fix some redundancy use of semicolon in do-while macros (#8221)
* Fix some redundancy use of semicolon in do-while macros
2020-12-21 22:57:45 -08:00
Yossi Gottlieb
1e301ff83e
Fix redis-cli crash on nil invalidate messages. (#8183)
This is a backport of redis/hiredis@b9b9f44.

Co-authored-by: michael-grunder <michael.grunder@gmail.com>
2020-12-13 22:11:06 +02:00
michael-grunder
6866158f0d Merge commit 'bffbbeaa9a1a6b8e81384297272cb0631502e8fd' into hiredis-unique-sds-symbols 2020-08-15 12:24:31 -07:00
michael-grunder
5f536b5d23 Merge commit '7ee5a41aac7e5abc90d050fa509fa953ca7f1da1' as 'deps/hiredis' 2020-08-06 12:41:58 -07:00
michael-grunder
3ddb6ffa34 Remove hiredis so we can add it as a subtree 2020-08-06 12:41:46 -07:00
antirez
5e399d5d33 hiredis udpated (RESP3 WIP). 2019-09-23 17:41:04 +02:00
antirez
c3899720f6 hiredis updated to master version. 2019-09-20 20:08:38 +02:00
Angus Pearson
bea09a7fa6 Add <strings.h> include to deps/hiredis/read.c to fix Implicit Declaration of strcasecmp warning 2019-05-08 11:36:31 +01:00
antirez
dfa9d2c74c RESP3: hiredis: implement bool type. 2019-01-09 17:00:30 +01:00
antirez
045b1f6339 RESP3: hiredis: save the original double string. 2019-01-09 17:00:30 +01:00
antirez
ee4c355a3e RESP3: hiredis: implement null type. 2019-01-09 17:00:30 +01:00
antirez
b8134dbfa7 RESP3: hiredis: fix double implementation. 2019-01-09 17:00:30 +01:00
antirez
a2b2d88f38 RESP3: hiredis: initial double implementation. 2019-01-09 17:00:30 +01:00
antirez
24a05e39f0 RESP3: hiredis: fix hiredis.c assert for new types. 2019-01-09 17:00:29 +01:00
antirez
d4a4375d05 RESP3: hiredis: free map and set replies. 2019-01-09 17:00:29 +01:00
antirez
eb3c5a70d4 RESP3: hiredis: fix read.c assert for new types. 2019-01-09 17:00:29 +01:00
antirez
d5c54f0b3a RESP3: hiredis updated with recent version + some RESP3 support. 2019-01-09 17:00:29 +01:00
antirez
fb6ebaa598 Backport hiredis issue 525 fix to compile on FreeBSD.
Close #4947.
2018-05-25 16:33:23 +02:00
antirez
6712bce92c deps/hiredis updated to latest version.
Close #3687.
2016-12-21 12:12:36 +01:00
antirez
e57cccdefb Lua debugger: use sds_malloc() to allocate eval cli array.
Redis-cli handles the debugger "eval" command in a special way since
sdssplitargs() would not be ok: we need to send the Redis debugger the
whole Lua script without any parsing. However in order to later free the
argument vector inside redis-cli using just sdsfreesplitres(), we need
to allocate the array of SDS pointers using the same allocator SDS is
using, that may differ to what Redis is using.

So now a newer version of SDS exports sds_malloc() and other allocator
functions to give access, to the program it is linked to, the allocator
used internally by SDS.
2015-11-17 15:43:23 +01:00
antirez
b684e2dad1 deps/hiredis SDS updated to version 2.0.0. 2015-07-25 17:51:48 +02:00
antirez
c806dd799b Fix Sentinel memory leak (hiredis bug)
This fixes issue #2535, that was actually an hiredis library bug (I
submitted an issue and fix to the redis/hiredis repo as well).

When an asynchronous hiredis connection subscribes to a Pub/Sub channel
and gets an error, and in other related conditions, the function
redisProcessCallbacks() enters a code path where the link is
disconnected, however the function returns before freeing the allocated
reply object. This causes a memory leak. The memory leak was trivial to
trigger in Redis Sentinel, which uses hiredis, every time we tried to
subscribe to an instance that required a password, in case the Sentinel
was configured either with the wrong password or without password at
all. In this case, the -AUTH error caused the leaking code path to be
executed.

It was verified with Valgrind that after this change the leak no longer
happens in Sentinel with a misconfigured authentication password.
2015-04-28 22:10:23 +02:00
Aaron Rutkovsky
3a82b8ac64 Fix typos
Closes #1513
2014-09-29 06:49:07 -04:00
Matt Stancliff
56c1f8805e Fix hiredis getaddrinfo leak
Fixed in Redis by 1a5e5b6, but since that part of code
is largely copy/paste from Redis, the fix needs to be
ported over too.

Closes #2012
2014-09-18 14:47:55 -04:00
antirez
293348d0de Missing va_end also added in hiredis copy of sds.c. 2014-08-26 10:05:32 +02:00
Mariano Pérez Rodríguez
8bbc1897c4 Missing assert removal from sdsIncrLen()
Companion for 8eeb1802ec, but dealing with hiredis.
2014-08-25 15:24:15 -03:00
antirez
68db7b1f56 Use unsigned integers in SDS header.
This raises the max string to 4GB without any downside.
2014-08-13 10:53:51 +02:00
siahl
009cabf103 Add support for compiling on AIX
Closes #1900
2014-08-07 12:12:54 +02:00
antirez
be8f4d49d4 Silence different signs comparison warning in sds.c. 2014-06-23 11:50:24 +02:00
antirez
5c7286efbd Use Redis updated sds.c for deps/hiredis. 2014-06-23 11:44:50 +02:00
antirez
1506c64c8b Dummy zmalloc.h restored into deps/hiredis. 2014-06-23 11:44:34 +02:00
Matt Stancliff
28f32c99d0 hiredis: Update to latest version
This is hiredis f225c276be7fd0646019b51023e3f41566633dfe

This update includes all changes that diverged inside of Redis since
the last update.  This version also allows optional source address
binding for connections which we need for some Sentinel deployments.
2014-06-23 11:44:34 +02:00
antirez
610224d0d0 Fix sdsempty() prototype in sds.h. 2013-08-12 11:38:21 +02:00
antirez
320fa02b9b Use latest sds.c in the hiredis library under deps. 2013-07-25 10:32:19 +02:00
antirez
4735f03c5a hiredis: minimal IPv6 support. 2013-07-11 13:11:27 +02:00
antirez
d01aad329c Added missing license and copyright in deps/hiredis. 2012-12-17 11:11:09 +01:00
Patrick TJ McPhee
289942b625 Define _XOPEN_SOURCE appropriately on NetBSD. 2012-12-12 10:49:12 -05:00
antirez
d6704c9bd0 hiredis library updated.
This version of hiredis merges modifications of the Redis fork with
latest changes in the hiredis repository.

The same version was pushed on the hiredis repository and will probably
merged into the master branch in short time.
2012-08-21 17:27:01 +02:00
antirez
ad0df18fdc Fix 32bit build of hiredis 2012-02-19 20:49:20 +01:00
antirez
8e65b6a33d Applied a few modifications to hiredis to tune it for speed (redis-benchmark) and ability to read more deeply nested replies (redis-cli). 2012-02-19 20:33:59 +01:00
antirez
b66e5add82 The hiredis lib shipped with Redis was updated to latest version. 2012-02-19 20:26:50 +01:00
antirez
65330badb9 hiredis/redis changes for speed with big payloads: read buffer size set
to 16k, request buffer size is no longer destroyed when emtpy and large
(better fix needed). Redis clients static output buffer set to 16k as
well.
2011-11-08 10:59:59 +01:00
antirez
63d62eb786 hiredis max multi bulk nesting level raised to 7 2011-06-30 13:34:38 +02:00
Pieter Noordhuis
9703b1b3dc Update hiredis 2011-05-05 16:25:48 +02:00