diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-10-17 01:14:08 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-10-17 01:24:16 +0300 |
commit | 22a5fb5239fa471c97e81f93e5058e7fb7143eaa (patch) | |
tree | 9f8074917dad1e9c20728b5a0f0944cc9b05c2ac /src/microhttpd/internal.h | |
parent | 5b2a9f1cbdb0cfc12cc56d3c345be440c5657be0 (diff) | |
download | libmicrohttpd-22a5fb5239fa471c97e81f93e5058e7fb7143eaa.tar.gz libmicrohttpd-22a5fb5239fa471c97e81f93e5058e7fb7143eaa.zip |
upgrade: fixed double-free, fixed use-after-free
Diffstat (limited to 'src/microhttpd/internal.h')
-rw-r--r-- | src/microhttpd/internal.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h index be751c2e..9c5ac903 100644 --- a/src/microhttpd/internal.h +++ b/src/microhttpd/internal.h | |||
@@ -1059,14 +1059,13 @@ struct MHD_UpgradeResponseHandle | |||
1059 | */ | 1059 | */ |
1060 | char e_buf[RESERVE_EBUF_SIZE]; | 1060 | char e_buf[RESERVE_EBUF_SIZE]; |
1061 | 1061 | ||
1062 | #endif /* HTTPS_SUPPORT */ | ||
1063 | |||
1062 | /** | 1064 | /** |
1063 | * Set to #MHD_YES after the application closed the socket | 1065 | * Set to #MHD_YES after the application finished with the socket |
1064 | * via #MHD_UPGRADE_ACTION_CLOSE. | 1066 | * by #MHD_UPGRADE_ACTION_CLOSE. |
1065 | */ | 1067 | */ |
1066 | int was_closed; | 1068 | int was_closed; |
1067 | |||
1068 | #endif | ||
1069 | |||
1070 | }; | 1069 | }; |
1071 | 1070 | ||
1072 | 1071 | ||
@@ -1724,4 +1723,13 @@ MHD_parse_arguments_ (struct MHD_Connection *connection, | |||
1724 | unsigned int *num_headers); | 1723 | unsigned int *num_headers); |
1725 | 1724 | ||
1726 | 1725 | ||
1726 | /** | ||
1727 | * Finally cleanup upgrade-related resources. It should | ||
1728 | * be called when TLS buffers have been drained and | ||
1729 | * application signaled MHD by #MHD_UPGRADE_ACTION_CLOSE. | ||
1730 | * @param connection handle to the upgraded connection to clean | ||
1731 | */ | ||
1732 | void | ||
1733 | cleanup_upgraded_connection (struct MHD_Connection *connection); | ||
1734 | |||
1727 | #endif | 1735 | #endif |