[Toybox] [PATCH 2/2] Replaced sizeof by strlen in wget POST

Moritz C. Weber mo.c.weber at gmail.com
Tue Mar 29 02:35:53 PDT 2022


---
 toys/pending/wget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toys/pending/wget.c b/toys/pending/wget.c
index 0bf6e5b8..9dd6560f 100644
--- a/toys/pending/wget.c
+++ b/toys/pending/wget.c
@@ -286,7 +286,7 @@ void wget_main(void)
                       "User-Agent: %s\r\nConnection: close\r\n"
                       "Content-Length: %ld\r\n\r\n"
                       "%s",
-                      path, host, agent, sizeof(TT.postdata), TT.postdata);
+                      path, host, agent, strlen(TT.postdata), TT.postdata);
     }
     if (FLAG(d)) printf("--- Request\n%s", toybuf);
 
-- 
2.20.1



More information about the Toybox mailing list