From 8a7572836d757ccdc9b48bb29f85c681fcabbf85 Mon Sep 17 00:00:00 2001 From: Martin Nilsson <nilsson@opera.com> Date: Tue, 31 Mar 2015 05:54:13 +0200 Subject: [PATCH] Give less data to the alert_callback to avoid adding new data to buffered data. --- lib/modules/SSL.pmod/Connection.pike | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/modules/SSL.pmod/Connection.pike b/lib/modules/SSL.pmod/Connection.pike index e04146c2a3..8b6fcfe3cc 100644 --- a/lib/modules/SSL.pmod/Connection.pike +++ b/lib/modules/SSL.pmod/Connection.pike @@ -763,9 +763,6 @@ string(8bit)|int got_data(string(8bit) data) // That enables the caller to check for a clean close, and // 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 = ""; Packet packet; while (packet = recv_packet(data)) @@ -776,7 +773,7 @@ string(8bit)|int got_data(string(8bit) data) { /* Reply alert */ SSL3_DEBUG_MSG("SSL.Connection: Bad received packet\n"); 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) send_packet(packet); if ((!packet) || (!this) || (packet->level == ALERT_fatal)) -- GitLab