1. 26 Feb, 2021 9 commits
  2. 21 Jul, 2020 1 commit
    • michael-grunder's avatar
      Fix a static analysis false positive · 3bb98531
      michael-grunder authored
      Static analyzer's can't tell that hi_calloc is calloc-like, and report a
      potential null pointer dereference.  This isn't possible but it's
      probably smarter to make the test anyway in the event code changes.
      3bb98531
  3. 07 Jun, 2020 1 commit
  4. 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
  5. 21 May, 2020 1 commit
  6. 19 May, 2020 1 commit
  7. 04 May, 2020 1 commit
    • Michael Grunder's avatar
      Remove nested depth limitation. (#797) · eafb085d
      Michael Grunder authored
      * 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
      eafb085d
  8. 01 Jan, 2020 1 commit
  9. 28 Aug, 2019 1 commit
  10. 04 Aug, 2019 2 commits
  11. 30 May, 2019 1 commit
  12. 24 Sep, 2018 1 commit
  13. 21 May, 2018 1 commit
  14. 20 May, 2018 2 commits
    • michael-grunder's avatar
      Use string2ll from Redis · 7bef042c
      michael-grunder authored
      This commit pulls string2ll from Redis (with permission from Antirez)
      as strtoll is 2-3x slower and even worse vs the original version in
      hiredis that didn't check for overflow at all.
      
      By using string2ll there is almost no measurable performance impact
      of overflow detection even in integer parsing heavy workloads (e.g.
      INCRBY commands).
      7bef042c
    • Justin Brewer's avatar
      Fix bulk and multi-bulk length truncation · 10919758
      Justin Brewer authored
      
      
      processMultiBulkItem truncates the value read from readLongLong,
      resulting in a corrupted state when the next item is read.
      createArray takes an int, so bound to INT_MAX.
      
      Inspection showed that processBulkItem had the same truncation issue.
      createString takes size_t, so bound to SIZE_MAX. This only has an
      effect on 32-bit platforms.
      
      A strict lower bound is also added, since negative lengths other
      than -1 are invalid according to RESP.
      Signed-off-by: default avatarJustin Brewer <jzb0012@auburn.edu>
      10919758
  15. 19 May, 2018 1 commit
  16. 01 May, 2018 2 commits
  17. 05 Jan, 2018 1 commit
  18. 11 Apr, 2016 1 commit
    • DongwenHuang's avatar
      Update read.c · 6bfc580a
      DongwenHuang authored
      static char *seekNewline(char *s, size_t len)  : 
      this function can not parse the string,such as "hello world\r". the case that  the last char is '\r'.
      6bfc580a
  19. 13 Mar, 2015 1 commit
  20. 05 Jan, 2015 1 commit
    • 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