1. 19 Jun, 2020 1 commit
  2. 07 Jun, 2020 1 commit
  3. 22 May, 2020 1 commit
    • Michael Grunder's avatar
      Allow users to replace allocator and handle OOM everywhere. (#800) · 8e0264cf
      Michael Grunder authored
      * 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.
      8e0264cf
  4. 21 May, 2020 1 commit
  5. 19 May, 2020 1 commit
  6. 12 Dec, 2019 1 commit
    • michael-grunder's avatar
      Free the reply in redisGetReply when passed NULL · ac0b186a
      michael-grunder authored
      We currently perform a NULL check in redisGetReply and don't push the
      reply back to the caller, but we don't free any reply meaning that this
      will leak memory:
      
      redisGetReply(context, NULL);
      
      This change simply frees the reply if we were passed NULL.
      
      Addresses #740
      ac0b186a
  7. 16 Sep, 2019 1 commit
    • Yossi Gottlieb's avatar
      Fix: redisReconnect() should clear SSL context. · d41443bd
      Yossi Gottlieb authored
      We should not attempt to keep the context and re-establish the
      TLS connection for several reasons:
      
      1. Maintain symmetry between redisConnect() and redisReconnect(), so in
      both cases an extra step is required to initiate SSL.
      2. The caller may also wish to reconfigure the SSL session and needs a
      chance to do that.
      3. It is not a practical thing to do on an async non-blocking connection
      context.
      d41443bd
  8. 29 Aug, 2019 1 commit
  9. 04 Aug, 2019 1 commit
  10. 10 Apr, 2019 1 commit
  11. 01 Apr, 2019 3 commits
    • m's avatar
      Port network layer to Winsock · dc6d19b9
      m authored
      With this change, Hiredis builds with MinGW and runs on Windows.
      dc6d19b9
    • m's avatar
      Introduce a redisFD type · e84086cb
      m authored
      The redisFD type should be equal to the system native socket file
      desciptor type (for POSIX, this is a plain int).
      
      We also introduce the REDIS_INVALID_FD value, which maps to -1 on POSIX
      systems.
      e84086cb
    • m's avatar
      Move network I/O calls to net.c · 1788f41f
      m authored
      This makes hiredis.c free from system calls related to socket I/O. This
      is also makes the treatment of raw socket connections more similar to
      the SSL backend.
      1788f41f
  12. 21 Feb, 2019 1 commit
  13. 20 Feb, 2019 7 commits
  14. 24 Oct, 2018 1 commit
    • Stefan Hacker's avatar
      Fix redisBufferRead documentation · 169fcc70
      Stefan Hacker authored
      Referred to redisContextReadReply which I cannot find in this codebase
      nor the old redis-tools one. Presumably this meant to say
      redisGetReplyFromReader which is how redisBufferRead is used in this
      file. Could've also meant the interface function redisReaderGetReply.
      169fcc70
  15. 26 Sep, 2018 1 commit
  16. 21 May, 2018 1 commit
  17. 01 May, 2018 3 commits
  18. 05 Jan, 2018 1 commit
  19. 15 Jun, 2017 1 commit
  20. 13 May, 2016 1 commit
  21. 27 Oct, 2015 1 commit
  22. 14 Sep, 2015 1 commit
  23. 24 Aug, 2015 1 commit
  24. 30 Apr, 2015 1 commit
    • Alex Balashov's avatar
      Renamed redisContext struct member 'unix' to 'unix_sock' to avoid encountering... · d132d676
      Alex Balashov authored
      Renamed redisContext struct member 'unix' to 'unix_sock' to avoid encountering defined constant 'unix' in GNU C environment (see commit d8145d79).
      
      Not all code using hiredis can compile using '-std=c99', and/or not all users are able to easily make that change to the build process of various open-source projects, so it is more pragmatic to choose a different identifier that does not impose this requirement.
      d132d676
  25. 16 Apr, 2015 2 commits
  26. 22 Jan, 2015 1 commit
    • Matt Stancliff's avatar
      Improve digit counting for multibulk creation · 195aca34
      Matt Stancliff authored
      This replaces the old intlen() implementation with a slightly
      faster way of counting digits.
      
      Implementation taken from the same place where digits10() in
      redis/src/util.c came from.
      
      The old 'intlen' allowed negative inputs, but no usage in hiredis
      was passing negative numbers, so that ability is removed.  Also,
      the new implementation can count higher (uint64_t) instead of
      limited to just int as before.
      
      Fixes #295 by replacing implementation
      195aca34
  27. 05 Jan, 2015 3 commits
    • Matt Stancliff's avatar
      Cleanup tabs and end of line whitespace · f28872ca
      Matt Stancliff authored
      f28872ca
    • Matt Stancliff's avatar
      Fix errno error buffers to not clobber errors · cc202324
      Matt Stancliff authored
      The strerror_r API has two flavors depending on system options.
      
      The bad flavor uses a static buffer for returning results, so if
      you save the pointer from strerror_r, the string you're referencing
      becomes useless if anybody else calls strerror_r again
      
      The good flavor does what you expect: it writes the error to your buffer.
      
      This commit uses strerror_r directly if it's a good version or copies
      the static buffer into our private buffer if it's a bad version.
      
      Thanks to gemorin for explaining the problem and drafting a fix.
      
      Fixes #239
      cc202324
    • tzickel's avatar
      Refactor reading code into read.c · ba3e74c4
      tzickel authored
      Makes hiredis reading functions easier to include in external projects
      
      [fixed all merge conflicts against current version]
      
      Closes #249
      ba3e74c4