Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion ssl/ssl_sess.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -111,7 +111,15 @@ SSL_SESSION *ssl_session_dup(const SSL_SESSION *src, int ticket)
if (dest == NULL) {
goto err;
}
memcpy(dest, src, sizeof(*dest));

/*
* Copy until prev ptr, because it's a part of sessons cache which can be modified
* concurrently. Other fields filled in the code bellow.
*/
memcpy(dest, src, offsetof(SSL_SESSION, prev));
dest->ext = src->ext;
dest->ticket_appdata_len = src->ticket_appdata_len;
dest->flags = src->flags;

/*
* Set the various pointers to NULL so that we can call SSL_SESSION_free in
Expand Down