From be58bf620905c06cbeeb2a1fb601349add1d1bf9 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Sat, 13 Apr 2024 01:32:11 +0800 Subject: [PATCH] ui/setup: use the mode "wb" instead of "w". (#32181) old-commit-hash: 1c491513b6a2dafd470a90186e7bb327ada503aa --- selfdrive/ui/qt/setup/setup.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/ui/qt/setup/setup.cc b/selfdrive/ui/qt/setup/setup.cc index 08f4a0f9c0..58a6392217 100644 --- a/selfdrive/ui/qt/setup/setup.cc +++ b/selfdrive/ui/qt/setup/setup.cc @@ -51,7 +51,7 @@ void Setup::download(QString url) { list = curl_slist_append(list, ("X-openpilot-serial: " + Hardware::get_serial()).c_str()); char tmpfile[] = "/tmp/installer_XXXXXX"; - FILE *fp = fdopen(mkstemp(tmpfile), "w"); + FILE *fp = fdopen(mkstemp(tmpfile), "wb"); curl_easy_setopt(curl, CURLOPT_URL, url.toStdString().c_str()); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, NULL);