@cryptotaxi247 / netdata-1 / commits / 2b2648c89

fix heap use after free (#19532)

Costa Tsaousis committed Jan 30, 2025 at 10:59 UTC 2b2648c899af27cdf2a50cf524175096d9acf6e1
1 file changed +6 -11
src/streaming/stream-sender-execute.c
+6 -11
@@ -74,17 +74,12 @@ static void execute_commands_function(struct sender_state *s, const char *comman
74 tmp->transaction = string_strdupz(transaction);
75 BUFFER *wb = buffer_create(1024, &netdata_buffers_statistics.buffers_functions);
76
77 - int code = rrd_function_run(s->host, wb, timeout,
78 - http_access_from_hex_mapping_old_roles(access), function, false, transaction,
79 - stream_execute_function_callback, tmp,
80 - stream_has_capability(s, STREAM_CAP_PROGRESS) ? stream_execute_function_progress_callback : NULL,
81 - stream_has_capability(s, STREAM_CAP_PROGRESS) ? tmp : NULL,
82 - NULL, NULL, payload, source, true);
83 -
84 - if(code != HTTP_RESP_OK) {
85 - if (!buffer_strlen(wb))
86 - rrd_call_function_error(wb, "Failed to route this request to the plugin that offered it.", code);
87 - }
77 + rrd_function_run(s->host, wb, timeout,
78 + http_access_from_hex_mapping_old_roles(access), function, false, transaction,
79 + stream_execute_function_callback, tmp,
80 + stream_has_capability(s, STREAM_CAP_PROGRESS) ? stream_execute_function_progress_callback : NULL,
81 + stream_has_capability(s, STREAM_CAP_PROGRESS) ? tmp : NULL,
82 + NULL, NULL, payload, source, true);
83 }
84 }
85