diff options
| -rw-r--r-- | ext/session/session.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/session/session.c b/ext/session/session.c index 51edab86d8..b87dfb9233 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -76,7 +76,7 @@ PHP_INI_BEGIN() PHP_INI_ENTRY("session.serialize_handler", "php", PHP_INI_ALL, NULL) PHP_INI_ENTRY("session.extern_referer_check", "", PHP_INI_ALL, NULL) PHP_INI_ENTRY("session.entropy_file", "", PHP_INI_ALL, NULL) - PHP_INI_ENTRY("session.entropy_length", "", PHP_INI_ALL, NULL) + PHP_INI_ENTRY("session.entropy_length", "0", PHP_INI_ALL, NULL) PHP_INI_END() PS_SERIALIZER_FUNCS(php); @@ -374,10 +374,11 @@ static void _php_session_send_cookie(PSLS_D) } cookie = ecalloc(len + 1, 1); - snprintf(cookie, len, COOKIE_FMT, PS(session_name), PS(id)); + len = snprintf(cookie, len, COOKIE_FMT, PS(session_name), PS(id)); if (PS(lifetime) > 0) { strcat(cookie, COOKIE_EXPIRES); strcat(cookie, date_fmt); + len += strlen(COOKIE_EXPIRES) + strlen(date_fmt); efree(date_fmt); } |
