michael-grunder
4a126e8a9c
Add valgrind and CMake to tests
2021-10-14 11:40:00 -07:00
michael-grunder
b73c2d410f
Add Centos8
...
I'm sure this can be done with a container matrix but figuring that out
is left for another day.
2021-10-12 14:14:03 -07:00
michael-grunder
e9f6473845
We should run actions on PRs
2021-10-12 13:31:02 -07:00
michael-grunder
6ad4ccf3c7
Add Cygwin build test
2021-10-12 13:06:11 -07:00
michael-grunder
783a3789c2
Add Windows tests in GitHub actions
...
See: #992
TODO: MinGW/cygwin tests
2021-10-10 14:24:58 -07:00
michael-grunder
0cac8dae1b
Switch to GitHub actions
...
Since TravisCI.org was deprecated we've been without any tests. This
commit adds back basic tests in Ubuntu, CentOS, and MacOS.
More sophisticated tests/platforms to come in the future (e.g. 32bit
tests).
See: #992
2021-10-10 13:18:01 -07:00
michael-grunder
fa900ef76f
Fix unused variable warning.
2021-10-10 11:58:19 -07:00
michael-grunder
e489846b72
Minor refactor of CVE-2021-32765 fix.
...
Since `hi_calloc` always passes through one of our wrapper functions,
we can perform this overflow in the wrapper, and get protection
everywhere.
Previous commit: 76a7b10005
Related vuln ID: CVE-2021-32765
[Full Details](https://github.com/redis/hiredis/security/advisories/GHSA-hfm9-39pp-55p2 )
2021-10-10 11:13:23 -07:00
Tongliang Liao
51c740824b
Remove extra comma from cmake var.
...
Or it'll be treated as part of the var name.
2021-10-09 13:19:39 -07:00
michael-grunder
632bf07183
Merge branch 'release/v1.0.2'
2021-10-07 13:25:50 -07:00
michael-grunder
b731283245
Prepare for v1.0.2 GA
2021-10-07 10:00:14 -07:00
michael-grunder
d4e6f109a0
Revert erroneous SONAME bump
2021-10-07 09:48:08 -07:00
michael-grunder
a39824a5df
Merge branch 'release/v1.0.1'
...
Merge the v1.0.1 release branch and bump the dev version to 1.0.2-dev
2021-10-04 13:35:10 -07:00
michael-grunder
8d1bfac464
Prepare for v1.0.1 GA
2021-10-04 13:08:51 -07:00
Yossi Gottlieb
76a7b10005
Fix for integer/buffer overflow CVE-2021-32765
...
This fix prevents hiredis from trying to allocate more than `SIZE_MAX`
bytes, which would result in a buffer overrun.
[Full Details](https://github.com/redis/hiredis/security/advisories/GHSA-hfm9-39pp-55p2 )
2021-10-04 11:56:31 -07:00
Yunier Perez
9eca1f36f4
Allow to override OPENSSL_PREFIX in Linux
2021-10-03 10:58:27 -07:00
rouzier
2d9d77518d
Don't leak memory if an invalid type is set ( #906 )
...
Co-authored-by: James Rouzier <jrouzier@inverse.ca>
2021-08-18 19:13:34 -07:00
Meir Shpilraien (Spielrein)
f5f31ff9b9
Added REDIS_NO_AUTO_FREE_REPLIES flag ( #962 )
...
When set hiredis will not automatically free replies in an async context, and the replies must be freed instead by the user.
Co-authored-by: Michael Grunder <michael.grunder@gmail.com>
2021-07-11 11:26:20 -07:00
michael-grunder
5850a8ecd2
Ensure we curry any connect error to an async context.
2021-06-17 13:37:49 -07:00
michael-grunder
b6f86f38c2
Fix README.md
...
Closes #929
2021-05-23 10:45:47 -07:00
Michael Grunder
667dbf5365
Merge pull request #935 from kristjanvalur/pr5
...
Bugfix: Ignore timeout callback from a successful connect (fixes #945 )
2021-05-02 12:26:05 -07:00
Michael Grunder
9bf6c250e5
Merge pull request #939 from zmartzone/improve_pr_896_ssl_leak
...
improve SSL leak fix redis/hiredis#896
2021-05-02 11:49:48 -07:00
Michael Grunder
959af97609
Merge pull request #949 from plan-do-break-fix/Typo-corrections
...
fix(docs): corrects typos in project README
2021-05-02 11:29:52 -07:00
plan-do-break-fix
0743f57bba
fix(docs): corrects typos in project README
2021-04-24 02:23:36 -05:00
Hans Zandbelt
5f4382247a
improve SSL leak fix redis/hiredis#896
...
Free SSL object when redisSSLConnect fails but avoid doing that for
callers of redisInitiateSSL who are supposed to manager their own SSL
object.
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
2021-04-11 18:49:38 +02:00
Kristján Valur Jónsson
e06ecf7e45
Ignore timeout callback from a successful connect
2021-04-08 09:45:49 +00:00
michael-grunder
dfa33e60b0
Change order independant push logic to not change behavior.
...
Since redisGetReplyFromReader is exposed in a header file, we probably
shouldn't modify how it behaves in any way. For this reason, handle the
changed logic in an internal static helper method.
2021-04-02 09:34:09 -07:00
michael-grunder
6204182aae
Handle the case where an invalidation is sent second.
...
RESP3 invalidation messages always seemed to be sent before the response
to a given command, but it appears this is not always the case:
In Redis 6.2.0RC1 Redis sends the invalidation after the HSET in the
following sequence:
```
hget hash field
$5
value
hset hash field value
:0
>2
$10
invalidate
*1
$4
hash
```
To account for this possibility just wrap redisGetReplyFromReader in a
loop as it is called twice in redisGetReply.
2021-04-02 09:34:09 -07:00
michael-grunder
d6a0b192b4
Merge branch 'reader-updates'
...
Updates and improvements to the RESP3 protocol reader.
* Fix the unset len field when creating RESP3 double objects
* Fix RESP3 double infinity parsing
* Add additional validations when parsing various reply types
* Fix the parent type assertions in certain default reply object
creation callbacks (mostly to include PUSH as a parent).
* Additional reader test cases
* Implement RESP3 BIGNUM support
* Refactor seekNewline() to use memchr()
2021-02-25 21:53:34 -08:00
michael-grunder
410c24d2a9
Fix off-by-one error in seekNewline
2021-02-25 21:25:17 -08:00
Alex Smith
bd7488d27d
read: Validate line items prior to checking for object creation callbacks
2021-02-25 21:25:17 -08:00
Alex Smith
5f9242a1f8
read: Remove obsolete comment on nested multi bulk depth limitation
2021-02-25 21:25:17 -08:00
Alex Smith
83c1450425
read: Add support for the RESP3 bignum type
2021-02-25 21:25:17 -08:00
Alex Smith
c6646cb192
read: Ensure no invalid '\r' or '\n' in simple status/error strings
2021-02-25 21:25:17 -08:00
Alex Smith
e43061156c
read: Additional validation and test case for RESP3 double
...
This ensures that malformed RESP3 double messages that include an
invalid null byte are not parsed as valid.
2021-02-25 21:25:17 -08:00
Alex Smith
c8adea4024
redisReply: Fix parent type assertions during double, nil, bool creation
...
Per RESP3, push messages are able to contain exactly what array
messages can contain (that is, any other type).
2021-02-25 21:25:17 -08:00
Alex Smith
ff73f1f9e7
redisReply: Explicitly list nil and bool cases in freeReplyObject() switch.
2021-02-25 21:25:17 -08:00
Alex Smith
0f92518847
test: Add test case for RESP3 set
2021-02-25 21:25:17 -08:00
Alex Smith
33c06dd503
test: Add test case for RESP3 map
2021-02-25 21:25:17 -08:00
Alex Smith
397fe26301
read: Use memchr() in seekNewline() instead of looping over entire string
2021-02-25 21:25:17 -08:00
Alex Smith
81c48a9821
test: Add test cases for RESP3 bool
2021-02-25 21:25:17 -08:00
Alex Smith
51e693f4fd
read: Add additional RESP3 bool validation
...
RESP3 bools should be only one of "#t\r\n" or "#f\r\n". We also allow
capital 'T' and 'F' to be lenient.
2021-02-25 21:25:17 -08:00
Alex Smith
790b4d3b4d
test: Add test cases for RESP3 nil
2021-02-25 21:25:17 -08:00
Alex Smith
d8899fbc19
read: Add additional RESP3 nil validation
...
RESP3 nil should consist of "_\r\n" and nothing else.
2021-02-25 21:25:17 -08:00
Alex Smith
96e8ea6110
test: Add test cases for infinite and NaN doubles
2021-02-25 21:25:17 -08:00
Alex Smith
f913e9b997
read: Fix double validation and infinity parsing
...
The ',' protocol byte gets removed in processItem(), so it should not
be compared against in processLineItem().
strtod() allows multiple representations of infinity and NaN that are
not RESP3 compliant. Since we explicitly check for the two compliant
infinity cases, strtod() should only return finite values.
2021-02-25 21:25:17 -08:00
Alex Smith
8039c7d26c
test: Add test case for doubles
2021-02-25 21:25:17 -08:00
Alex Smith
49539fd1a7
redisReply: Fix - set len in double objects
2021-02-25 21:25:17 -08:00
Michael Grunder
53a8144c81
Merge pull request #924 from cheese1/master
...
http -> https
2021-02-17 10:08:35 -08:00
cheese1
9390de006d
http -> https
2021-02-17 16:15:45 +01:00