Skip to content

Commit

Permalink
Revert "in_elasticsearch: improved buffer size check"
Browse files Browse the repository at this point in the history
This reverts commit bf83631.
  • Loading branch information
leonardo-albertovich committed Sep 5, 2024
1 parent bf83631 commit b3d6d23
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/in_elasticsearch/in_elasticsearch_bulk_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,9 @@ static int in_elasticsearch_bulk_conn_event(void *data)
}

if (NULL != request_end) {
request_len = (size_t) ((uintptr_t) request_end -
(uintptr_t) conn->buf_data);
request_len = (size_t)(request_end - conn->buf_data);

if (request_len < conn->buf_len) {
if (0 < (conn->buf_len - request_len)) {
memmove(conn->buf_data, &conn->buf_data[request_len],
conn->buf_len - request_len);

Expand Down

0 comments on commit b3d6d23

Please sign in to comment.