From 7e09dd714fc62c08c5b0319ed7b9702594faf49b Mon Sep 17 00:00:00 2001
From: Yann Ylavic <ylavic@apache.org>
Date: Mon, 1 Mar 2021 20:13:54 +0000
Subject: [PATCH] mod_session: account for the '&' in identity_concat().

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1887052 13f79535-47bb-0310-9956-ffa450edef68
---
 changes-entries/session_parsing.txt | 2 ++
 modules/session/mod_session.c       | 3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)
 create mode 100644 changes-entries/session_parsing.txt

#diff --git a/changes-entries/session_parsing.txt b/changes-entries/session_parsing.txt
#new file mode 100644
#index 00000000000..a996e821063
#--- /dev/null
#+++ b/changes-entries/session_parsing.txt
#@@ -0,0 +1,2 @@
#+  *) mod_session: Improve session parsing.  [Yann Yalvic]
#+
--- a/modules/session/mod_session.c
+++ b/modules/session/mod_session.c
@@ -305,7 +305,7 @@ static apr_status_t ap_session_set(reque
 static int identity_count(void *v, const char *key, const char *val)
 {
     int *count = v;
-    *count += strlen(key) * 3 + strlen(val) * 3 + 1;
+    *count += strlen(key) * 3 + strlen(val) * 3 + 2;
     return 1;
 }
 
@@ -341,7 +341,6 @@ static int identity_concat(void *v, cons
  */
 static apr_status_t session_identity_encode(request_rec * r, session_rec * z)
 {
-
     char *buffer = NULL;
     int length = 0;
     if (z->expiry) {
