Skip to content
Snippets Groups Projects
  1. May 08, 2019
    • Liviu's avatar
      Fix ASAN build · 12339bbf
      Liviu authored
      The ASAN build fails with
      ```
      cookie_auth.c:62:7: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
        if (cookie_header == NULL) goto clean;
            ^~~~~~~~~~~~~~~~~~~~~
      cookie_auth.c:84:10: note: uninitialized use occurs here
        return ret;
               ^~~
      cookie_auth.c:62:3: note: remove the 'if' if its condition is always false
        if (cookie_header == NULL) goto clean;
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cookie_auth.c:65:3: note: variable 'ret' is declared here
        struct session *ret = NULL;
        ^
      cookie_auth.c:62:7: error: variable 'ssid' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
        if (cookie_header == NULL) goto clean;
            ^~~~~~~~~~~~~~~~~~~~~
      cookie_auth.c:81:7: note: uninitialized use occurs here
        if (ssid != ssid_buf) {
            ^~~~
      cookie_auth.c:62:3: note: remove the 'if' if its condition is always false
        if (cookie_header == NULL) goto clean;
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cookie_auth.c:64:3: note: variable 'ssid' is declared here
        char *ssid = ssid_buf;
        ^
      2 errors generated.
      ```
      Unverified
      12339bbf
  2. Feb 08, 2018
    • Dmitry Frank's avatar
      Implement mg_http_parse_header2() · b9b20c64
      Dmitry Frank authored
      Which is a replacement of (deprecated) `mg_http_parse_header`, but,
      similarly to `asprintf`, allocates a new buffer if the client-provided
      one is not large enough.
      
      Also use it throughout mongoose code, and thus some header-related
      limitations are removed; in particular,
      https://github.com/cesanta/mongoose/issues/813 is fixed.
      
      CL: Mongoose Web Server: Deprecate `mg_http_parse_header()` and implement `mg_http_parse_header2()` instead, which allocates a new buffer if the client-provided one is not large enough (similarly to `asprintf`).
      CL: Mongoose Web Server: Fix limitations of header value lengths, e.g. when parsing authentication headers such as nonce, etc.
      
      PUBLISHED_FROM=c75b1bbbbdb294ea85075ce69b1368f115fdd1ef
      b9b20c64
  3. Feb 06, 2017
  4. Feb 03, 2017
  5. Sep 30, 2016
  6. Sep 05, 2016
  7. Aug 08, 2016
Loading