Skip to content

Commit

Permalink
patch: fix use after free in rdhttp.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Sidorov authored and filonenko-mikhail committed Feb 15, 2023
1 parent b892514 commit 7b20672
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ if(STATIC_BUILD)
COMMAND patch -d <SOURCE_DIR> -p1 -i "${PATCHES_DIR}/librdkafka-tarantool-security-52.patch"
COMMAND patch -d <SOURCE_DIR> -p1 -i "${PATCHES_DIR}/librdkafka-tarantool-security-55.patch"
COMMAND patch -d <SOURCE_DIR> -p1 -i "${PATCHES_DIR}/librdkafka-tarantool-security-70.patch"
COMMAND patch -d <SOURCE_DIR> -p1 -i "${PATCHES_DIR}/librdkafka-tarantool-security-36.patch"
)

add_library(librdkafka_static INTERFACE)
Expand Down
12 changes: 12 additions & 0 deletions patches/librdkafka-tarantool-security-36.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/src/rdhttp.c b/src/rdhttp.c
index dca6c6f8..5a290c5b 100644
--- a/src/rdhttp.c
+++ b/src/rdhttp.c
@@ -345,6 +345,7 @@ rd_http_error_t *rd_http_post_expect_json(rd_kafka_t *rk,

/* Retry */
rd_http_error_destroy(herr);
+ herr = 0;
rd_usleep(retry_ms * 1000 * (i + 1), &rk->rk_terminate);
}

0 comments on commit 7b20672

Please sign in to comment.