mirror of
https://gitlab.com/mobian1/eg25-manager.git
synced 2025-08-29 23:32:14 +02:00
gnss: open temporary file as read/write
Opening as write-only may cause undefined behavior when reading the file
This commit is contained in:
@@ -190,7 +190,7 @@ static void fetch_assistance_data(struct EG25Manager *manager)
|
|||||||
long int size;
|
long int size;
|
||||||
|
|
||||||
/* Fetch assistance data with curl */
|
/* Fetch assistance data with curl */
|
||||||
tmp_file = fdopen(manager->gnss_assistance_fd, "wb");
|
tmp_file = fdopen(manager->gnss_assistance_fd, "wb+");
|
||||||
url = g_strconcat(manager->gnss_assistance_url, "/",
|
url = g_strconcat(manager->gnss_assistance_url, "/",
|
||||||
manager->gnss_assistance_file, NULL);
|
manager->gnss_assistance_file, NULL);
|
||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
|
Reference in New Issue
Block a user