2b729ee missed sprintf destination for user agent version suffix?
---
>From 6d36d756c76770e38a35b0f1c81dbd5c9bef9f37 Mon Sep 17 00:00:00 2001
From: Denys Nykula <[email protected]>
Date: Tue, 11 Feb 2020 14:35:50 +0200
Subject: [PATCH] Fix wget version concat segfault.
---
toys/pending/wget.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/toys/pending/wget.c b/toys/pending/wget.c
index 16672a2..21d4446 100644
--- a/toys/pending/wget.c
+++ b/toys/pending/wget.c
@@ -144,8 +144,7 @@ void wget_main(void)
if(!toys.optargs[0]) help_exit("no URL");
get_info(toys.optargs[0], hostname, port, path);
-
- sprintf("/%s", TOYBOX_VERSION);
+ sprintf(ua+11, "/%s", TOYBOX_VERSION);
for (;; redirects--) {
sock = conn_svr(hostname, port);
// compose HTTP request
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net