Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:GA
curl.34221
curl-CVE-2023-27534-tilde-back.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File curl-CVE-2023-27534-tilde-back.patch of Package curl.34221
Index: curl-7.37.0/lib/ssh.c =================================================================== --- curl-7.37.0.orig/lib/ssh.c +++ curl-7.37.0/lib/ssh.c @@ -433,25 +433,28 @@ static CURLcode ssh_getworkingpath(struc } } else if((data->easy_conn->handler->protocol & CURLPROTO_SFTP) && - (working_path_len > 2) && !memcmp(working_path, "/~/", 3)) { - size_t len; - const char *p; - int copyfrom = 3; + (!strcmp("/~", working_path) || + ((working_path_len > 2) && !memcmp(working_path, "/~/", 3)))) { if(Curl_dyn_add(&npath, homedir)) { free(working_path); return CURLE_OUT_OF_MEMORY; } - /* Copy a separating '/' if homedir does not end with one */ - len = Curl_dyn_len(&npath); - p = Curl_dyn_ptr(&npath); - if(len && (p[len-1] != '/')) - copyfrom = 2; + if(working_path_len > 2) { + size_t len; + const char *p; + int copyfrom = 3; + /* Copy a separating '/' if homedir does not end with one */ + len = Curl_dyn_len(&npath); + p = Curl_dyn_ptr(&npath); + if(len && (p[len-1] != '/')) + copyfrom = 2; - if(Curl_dyn_addn(&npath, - &working_path[copyfrom], - working_path_len - copyfrom)) { - free(working_path); - return CURLE_OUT_OF_MEMORY; + if(Curl_dyn_addn(&npath, + &working_path[copyfrom], + working_path_len - copyfrom)) { + free(working_path); + return CURLE_OUT_OF_MEMORY; + } } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor