mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-14 19:03:20 +00:00
Merge pull request #1020 from nliviu/patch-2
Fix ASAN build for examples/cookie_auth
This commit is contained in:
1 file changed
+2
-2
@@ -58,11 +58,11 @@ static int check_pass(const char *user, const char *pass) {
|
|||||||
* or NULL if not found.
|
* or NULL if not found.
|
||||||
*/
|
*/
|
||||||
static struct session *get_session(struct http_message *hm) {
|
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_buf[21];
|
||||||
char *ssid = ssid_buf;
|
char *ssid = ssid_buf;
|
||||||
struct session *ret = NULL;
|
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,
|
if (!mg_http_parse_header2(cookie_header, SESSION_COOKIE_NAME, &ssid,
|
||||||
sizeof(ssid_buf))) {
|
sizeof(ssid_buf))) {
|
||||||
goto clean;
|
goto clean;
|
||||||
|
|||||||
Reference in new issue
Block a user