Commit Graph

12 Commits

Author SHA1 Message Date
Michael Grunder 8e0264cfd6
Allow users to replace allocator and handle OOM everywhere. (#800)
* Adds an indirection to every allocation/deallocation to allow users to 
  plug in ones of their choosing (use custom functions, jemalloc, etc).

* Gracefully handle OOM everywhere in hiredis.  This should make it possible
  for users of the library to have more flexibility in how they handle such situations.

* Changes `redisReaderTask->elements` from an `int` to a `long long` to prevent
  a possible overflow when transferring the task elements into a `redisReply`.

* Adds a configurable `max elements` member to `redisReader` that defaults to
  2^32 - 1.  This can be set to "unlimited" by setting the value to zero.
2020-05-22 09:27:49 -07:00
Michael Grunder 5c9f49e212
Resp3 verbatim string support (#805)
Pull RESP3 verbatim string handling from Redis

Fixes #802
2020-05-19 12:56:02 -07:00
Michael Grunder eafb085d11
Remove nested depth limitation. (#797)
* Remove nested depth limitation.

This commit removes the nested multi-bulk depth limitation of 7.
We do this by switching to pointer to pointer indirection and
growing the stack in chunks when needed.

See: #794, #421
2020-05-04 10:36:04 -07:00
Mark Nunberg ff4fa45422
Merge pull request #697 from yossigo/resp3
Port RESP3 support from Redis.
2019-08-27 06:59:32 -04:00
Mark Nunberg f9bccfb7ba
Merge branch 'master' into createArray-size_t 2019-08-09 04:02:53 -04:00
Yossi Gottlieb 91de9c975a RESP3 support changes from Redis.
This corresponds to commits d5c54f0b..bea09a7f in the redis repository.
2019-08-04 12:13:04 +03:00
Yossi Gottlieb a7a1886b7e Initial RESP3 support [d5c54f0b]. 2019-08-04 11:55:24 +03:00
Mark Nunberg 35a0a1f369 read/write timeouts 2019-02-20 09:10:10 -05:00
Justin Brewer ef4256670f Update createArray to take size_t
This makes createArray consistent with createString, which also takes
size_t. Bounds-check and unit tests are updated to allow up to
min(SIZE_MAX,LLONG_MAX).

Changelog is updated to mention this API break.

Signed-off-by: Justin Brewer <jzb0012@auburn.edu>
2018-05-21 10:49:30 -05:00
Jan-Erik Rediger 8f5265ded3 fix: Remove backwards compatibility macro's
Closes #296

BREAKING CHANGE: This removes the redisReplyReader* functions, which are
                 already replaced by redisReader* functions.
                 It renames `redisReplyReaderSetPrivdata`,
                 `redisReplyReaderGetObject` and `redisReplyReaderGetError`
                 to `redisReaderSetPrivdata`, `redisReaderGetObject`
                 and `redisReaderGetError`.
2016-04-20 15:42:10 +02:00
charsyam e2f6ee239c fixing typos 2015-10-28 02:19:24 +09:00
tzickel ba3e74c408 Refactor reading code into read.c
Makes hiredis reading functions easier to include in external projects

[fixed all merge conflicts against current version]

Closes #249
2015-01-05 16:53:22 -05:00