1. 20 Jun, 2016 3 commits
  2. 14 May, 2016 2 commits
  3. 13 May, 2016 1 commit
  4. 12 May, 2016 1 commit
    • not-a-robot's avatar
      Auto merge of #378 - thomaslee:tom_fix_kfreebsd, r=badboy · e93c05a7
      not-a-robot authored
      Fix strerror_r on some esoteric platforms
      
      Defining _XOPEN_SOURCE=1 causes strange behavior on Debian kfreebsd archs -- i.e. the GNU userspace with FreeBSD kernel -- when _GNU_SOURCE is not defined (the default).
      
      Not sure I fully understand the bizarre semantics, but it seems to use the XSI-compliant interface (int strerror_r(int, char*, size_t)) but the GNU implementation (char *strerror_r(int, char*, size_t)) such that strerror_r returns 32-bits of a 64-bit char * on x86_64 kfreebsd. We would expect strerror_r to return zero when using the XSI-compliant strerror_r implementation or a 64-bit char* when using the GNU version. Instead, we get something in between!
      
      Unless I'm missing something, being more explicit about what version of _XOPEN_SOURCE we want seems to be the prudent thing to do here -- and if folks want the GNU implementation of strerror_r for some reason they can always -D_GNU_SOURCE explicitly.
      e93c05a7
  5. 20 Apr, 2016 27 commits
  6. 17 Apr, 2016 2 commits
  7. 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
  8. 26 Mar, 2016 1 commit
  9. 18 Nov, 2015 2 commits
    • Jan-Erik Rediger's avatar
      Prevent buffer overflow when formatting the error · 0335cb3e
      Jan-Erik Rediger authored
      strncat might copy n+1 bytes (n bytes from the source plus a terminating nul byte).
      Also strncat appends after the first found nul byte. But all we pass is
      a buffer we might not have zeroed out already.
      
      Closes #380
      0335cb3e
    • Tom Lee's avatar
      Fix potential race in 'invalid timeout' tests · d4b715f0
      Tom Lee authored
      It's possible for the call to connect() to succeed on the very first
      try, in which case the logic for checking for invalid timeout fields is
      never executed. When this happens, the tests fail because they expect a
      REDIS_ERR_IO but no such failure has occurred.
      
      Tests aside, this is a potential source of irritating and hard-to-find
      intermittent bugs.
      
      This patch forces the validation to occur early so that we get
      predictable behavior whenever an invalid timeout is specified.
      d4b715f0