Skip to content

Commit e8fc3c9

Browse files
committed
Fix cURL segfault
1 parent aa8abac commit e8fc3c9

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/functions/get_tranco.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ namespace duckdb
9191
}
9292

9393
curl_easy_setopt (curl, CURLOPT_URL, download_url.c_str ());
94+
curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, NULL); // Use default file write callback
9495
curl_easy_setopt (curl, CURLOPT_WRITEDATA, file);
9596
res = curl_easy_perform (curl);
9697
curl_easy_cleanup (curl);

test/sql/update_tranco.test_slow

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# name: test/sql/update_tranco.test_slow
2+
# description: test netquack extension update_tranco function
3+
# group: [netquack]
4+
5+
require netquack
6+
7+
query I
8+
SELECT update_tranco(true);
9+
----
10+
Tranco list updated

0 commit comments

Comments
 (0)