[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 163/220: scp: fix directory name length used in mem
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 163/220: scp: fix directory name length used in memcpy |
Date: |
Thu, 12 Sep 2019 17:28:43 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 25f962193574e35fe638764c3afb9d25d8a9768b
Author: Kyle Abramowitz <address@hidden>
AuthorDate: Thu Aug 22 20:58:26 2019 +0000
scp: fix directory name length used in memcpy
Fix read off end of array due to bad pointer math in getworkingpath for
SCP home directory case.
Closes #4258
---
lib/curl_path.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/curl_path.c b/lib/curl_path.c
index 85dddcef1..f42963463 100644
--- a/lib/curl_path.c
+++ b/lib/curl_path.c
@@ -55,7 +55,7 @@ CURLcode Curl_getworkingpath(struct connectdata *conn,
}
if((working_path_len > 3) && (!memcmp(working_path, "/~/", 3)))
/* It is referenced to the home directory, so strip the leading '/~/' */
- memcpy(real_path, working_path + 3, 4 + working_path_len-3);
+ memcpy(real_path, working_path + 3, working_path_len - 2);
else
memcpy(real_path, working_path, 1 + working_path_len);
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [gnurl] 167/220: ngtcp2: add support for SSLKEYLOGFILE, (continued)
- [GNUnet-SVN] [gnurl] 167/220: ngtcp2: add support for SSLKEYLOGFILE, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 143/220: ssh: add a generic Curl_ssh_version function for SSH backends, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 139/220: TODO/ROADMAP: remove "refuse downgrade redirects" and HTTP/3, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 146/220: ngtcp2: use ngtcp2_version() to get the run-time version, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 156/220: cleanup: remove DOT_CHAR completely, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 171/220: vauth: return CURLE_AUTH_ERROR on gss_init_sec_context() failure, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 173/220: RELEASE-NOTES: synced, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 142/220: base64: check for SSH, not specific SSH backends, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 147/220: netrc: make the code try ".netrc" on Windows as well, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 148/220: curl: use .curlrc (with a dot) on Windows as well, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 163/220: scp: fix directory name length used in memcpy,
gnunet <=
- [GNUnet-SVN] [gnurl] 176/220: HTTP3: switched openssl branch to use, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 172/220: build-openssl: fix build with Visual Studio 2019, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 170/220: KNOWN_BUGS: USE_UNIX_SOCKETS on Windows, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 174/220: http2: when marked for closure and wanted to close == OK, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 182/220: ngtcp2: on h3 stream close, call expire, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 177/220: travis: enable ngtcp2 builds again, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 185/220: RELEASE-NOTES: synced, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 160/220: defines: avoid underscore-prefixed defines, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 179/220: CURLOPT_HEADERFUNCTION.3: clarify, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 181/220: ngtcp2: build latest ngtcp2 and ngtcp2_crypto_openssl, gnunet, 2019/09/12