Skip to content

Commit

Permalink
Merge pull request #1020 from nliviu/patch-2
Browse files Browse the repository at this point in the history
Fix ASAN build for examples/cookie_auth
  • Loading branch information
cpq authored Sep 30, 2019
2 parents 900c052 + 12339bb commit c41a221
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/cookie_auth/cookie_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ static int check_pass(const char *user, const char *pass) {
* or NULL if not found.
*/
static struct session *get_session(struct http_message *hm) {
struct mg_str *cookie_header = mg_get_http_header(hm, "cookie");
if (cookie_header == NULL) goto clean;
char ssid_buf[21];
char *ssid = ssid_buf;
struct session *ret = NULL;
struct mg_str *cookie_header = mg_get_http_header(hm, "cookie");
if (cookie_header == NULL) goto clean;
if (!mg_http_parse_header2(cookie_header, SESSION_COOKIE_NAME, &ssid,
sizeof(ssid_buf))) {
goto clean;
Expand Down

0 comments on commit c41a221

Please sign in to comment.