[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 157/411: ftp: avoid risk of reading uninitialized integers
From: |
gnunet |
Subject: |
[gnurl] 157/411: ftp: avoid risk of reading uninitialized integers |
Date: |
Wed, 13 Jan 2021 01:19:32 +0100 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit 3d8731c8f52cf1ed40bbabd319a3b732cdbcd3d2
Author: Daniel Stenberg <daniel@haxx.se>
AuthorDate: Thu Sep 17 16:16:38 2020 +0200
ftp: avoid risk of reading uninitialized integers
If the received PASV response doesn't match the expected pattern, we
could end up reading uninitialized integers for IP address and port
number.
Issue pointed out by muse.dev
Closes #5972
---
lib/ftp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/ftp.c b/lib/ftp.c
index 868a97a53..434401390 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1860,8 +1860,8 @@ static CURLcode ftp_state_pasv_resp(struct connectdata
*conn,
else if((ftpc->count1 == 1) &&
(ftpcode == 227)) {
/* positive PASV response */
- unsigned int ip[4];
- unsigned int port[2];
+ unsigned int ip[4] = {0, 0, 0, 0};
+ unsigned int port[2] = {0, 0};
/*
* Scan for a sequence of six comma-separated numbers and use them as
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnurl] 104/411: altsvc: clone setting in curl_easy_duphandle, (continued)
- [gnurl] 104/411: altsvc: clone setting in curl_easy_duphandle, gnunet, 2021/01/12
- [gnurl] 112/411: travis: add a build using libressl (from git master), gnunet, 2021/01/12
- [gnurl] 131/411: imap: set cselect_bits to CURL_CSELECT_IN initially, gnunet, 2021/01/12
- [gnurl] 128/411: runtests: allow creating files without newlines, gnunet, 2021/01/12
- [gnurl] 147/411: TODO: add PR reference for native IDN support on macOS, gnunet, 2021/01/12
- [gnurl] 155/411: ftp: get rid of the PPSENDF macro, gnunet, 2021/01/12
- [gnurl] 167/411: parsedate: tune the date to epoch conversion, gnunet, 2021/01/12
- [gnurl] 146/411: tool_help.h: update copyright year range, gnunet, 2021/01/12
- [gnurl] 164/411: docs/MQTT: not experimental anymore, gnunet, 2021/01/12
- [gnurl] 178/411: dynbuf: make *addf() not require extra mallocs, gnunet, 2021/01/12
- [gnurl] 157/411: ftp: avoid risk of reading uninitialized integers,
gnunet <=
- [gnurl] 170/411: setopt: return CURLE_BAD_FUNCTION_ARGUMENT on bad argument, gnunet, 2021/01/12
- [gnurl] 185/411: strerror: honor Unicode API choice on Windows, gnunet, 2021/01/12
- [gnurl] 176/411: pingpong: remove a malloc per Curl_pp_vsendf call, gnunet, 2021/01/12
- [gnurl] 125/411: dynbuf: make sure Curl_dyn_tail() zero terminates, gnunet, 2021/01/12
- [gnurl] 144/411: tool_writeout: protect fputs() from NULL, gnunet, 2021/01/12
- [gnurl] 160/411: --help: strdup the category, gnunet, 2021/01/12
- [gnurl] 165/411: docs/MQTT: remove outdated paaragraphs, gnunet, 2021/01/12
- [gnurl] 175/411: symbian: drop support, gnunet, 2021/01/12
- [gnurl] 152/411: github: use new issue template feature, gnunet, 2021/01/12
- [gnurl] 171/411: http_proxy: do not count proxy headers in the header bytecount, gnunet, 2021/01/12