Skip to content
Snippets Groups Projects
Commit 8a757283 authored by Martin Nilsson's avatar Martin Nilsson
Browse files

Give less data to the alert_callback to avoid adding new data to buffered data.

parent 6705ef8d
Branches
Tags
No related merge requests found
...@@ -763,9 +763,6 @@ string(8bit)|int got_data(string(8bit) data) ...@@ -763,9 +763,6 @@ string(8bit)|int got_data(string(8bit) data)
// That enables the caller to check for a clean close, and // That enables the caller to check for a clean close, and
// to get the leftovers after the SSL connection. // to get the leftovers after the SSL connection.
/* If alert_callback is called, this data is passed as an argument */
string(8bit) alert_context = (left_over || "") + data;
string(8bit) res = ""; string(8bit) res = "";
Packet packet; Packet packet;
while (packet = recv_packet(data)) while (packet = recv_packet(data))
...@@ -776,7 +773,7 @@ string(8bit)|int got_data(string(8bit) data) ...@@ -776,7 +773,7 @@ string(8bit)|int got_data(string(8bit) data)
{ /* Reply alert */ { /* Reply alert */
SSL3_DEBUG_MSG("SSL.Connection: Bad received packet\n"); SSL3_DEBUG_MSG("SSL.Connection: Bad received packet\n");
if (alert_callback) if (alert_callback)
alert_callback(packet, current_read_state->seq_num, alert_context); alert_callback(packet, current_read_state->seq_num, left_over);
if (this && packet) if (this && packet)
send_packet(packet); send_packet(packet);
if ((!packet) || (!this) || (packet->level == ALERT_fatal)) if ((!packet) || (!this) || (packet->level == ALERT_fatal))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment