Skip to content
  1. Apr 26, 2017
  2. Apr 25, 2017
  3. Apr 24, 2017
  4. Apr 23, 2017
  5. Apr 22, 2017
    • Alan Jenkins's avatar
      multi: clarify condition in curl_multi_wait · be299a4d
      Alan Jenkins authored
      `if(nfds || extra_nfds) {` is followed by `malloc(nfds * ...)`.
      
      If `extra_fs` could be non-zero when `nfds` was zero, then we have
      `malloc(0)` which is allowed to return `NULL`. But, malloc returning
      NULL can be confusing. In this code, the next line would treat the NULL
      as an allocation failure.
      
      It turns out, if `nfds` is zero then `extra_nfds` must also be zero.
      The final value of `nfds` includes `extra_nfds`.  So the test for
      `extra_nfds` is redundant.  It can only confuse the reader.
      
      Closes #1439
      be299a4d
    • Marcel Raad's avatar
      lib: fix maybe-uninitialized warnings · 4a8cf6c4
      Marcel Raad authored
      With -Og, GCC complains:
      
      easy.c:628:7: error: ‘mcode’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      ../lib/strcase.h:35:29: error: ‘tok_buf’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
      vauth/digest.c:208:9: note: ‘tok_buf’ was declared here
      
      ../lib/strcase.h:35:29: error: ‘tok_buf’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
      vauth/digest.c:566:15: note: ‘tok_buf’ was declared here
      
      Fix this by initializing the variables.
      4a8cf6c4
    • Dan Fandrich's avatar
      gnutls: removed some code when --disable-verbose is configured · f761da76
      Dan Fandrich authored
      This reduces the binary size and fixes a compile warning.
      f761da76
    • Daniel Stenberg's avatar
      llist: no longer uses malloc · cbae73e1
      Daniel Stenberg authored
      The 'list element' struct now has to be within the data that is being
      added to the list. Removes 16.6% (tiny) mallocs from a simple HTTP
      transfer. (96 => 80)
      
      Also removed return codes since the llist functions can't fail now.
      
      Test 1300 updated accordingly.
      
      Closes #1435
      cbae73e1
  6. Apr 21, 2017
  7. Apr 20, 2017
  8. Apr 19, 2017
  9. Apr 18, 2017
  10. Apr 17, 2017
    • David Benjamin's avatar
      openssl: don't try to print nonexistant peer private keys · 997504ea
      David Benjamin authored
      X.509 certificates carry public keys, not private keys. Fields
      corresponding to the private half of the key will always be NULL.
      
      Closes #1425
      997504ea
    • David Benjamin's avatar
      openssl: fix thread-safety bugs in error-handling · 1c92b5b6
      David Benjamin authored
      ERR_error_string with NULL parameter is not thread-safe. The library
      writes the string into some static buffer. Two threads doing this at
      once may clobber each other and run into problems. Switch to
      ERR_error_string_n which avoids this problem and is explicitly
      bounds-checked.
      
      Also clean up some remnants of OpenSSL 0.9.5 around here. A number of
      comments (fixed buffer size, explaining that ERR_error_string_n was
      added in a particular version) date to when ossl_strerror tried to
      support pre-ERR_error_string_n OpenSSLs.
      
      Closes #1424
      1c92b5b6
    • David Benjamin's avatar
      openssl: make SSL_ERROR_to_str more future-proof · 47b2f89d
      David Benjamin authored
      Rather than making assumptions about the values, use a switch-case.
      
      Closes #1424
      47b2f89d
    • Daniel Gustafsson's avatar
      code: fix typos and style in comments · aaa7e05c
      Daniel Gustafsson authored
      A few random typos, and minor whitespace cleanups, found in comments
      while reading code.
      
      Closes #1423
      aaa7e05c