Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142675158
D37253.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1012 B
Referenced Files
None
Subscribers
None
D37253.diff
View Options
diff --git a/crypto/openssh/sftp.c b/crypto/openssh/sftp.c
--- a/crypto/openssh/sftp.c
+++ b/crypto/openssh/sftp.c
@@ -617,14 +617,14 @@
}
static char *
-make_absolute_pwd_glob(const char *p, const char *pwd)
+make_absolute_pwd_glob(char *p, const char *pwd)
{
char *ret, *escpwd;
escpwd = escape_glob(pwd);
if (p == NULL)
return escpwd;
- ret = make_absolute(xstrdup(p), escpwd);
+ ret = make_absolute(p, escpwd);
free(escpwd);
return ret;
}
@@ -637,7 +637,7 @@
glob_t g;
int i, r, err = 0;
- abs_src = make_absolute_pwd_glob(src, pwd);
+ abs_src = make_absolute_pwd_glob(xstrdup(src), pwd);
memset(&g, 0, sizeof(g));
debug3("Looking up %s", abs_src);
@@ -1997,9 +1997,7 @@
memset(&g, 0, sizeof(g));
if (remote != LOCAL) {
- tmp2 = make_absolute_pwd_glob(tmp, remote_path);
- free(tmp);
- tmp = tmp2;
+ tmp = make_absolute_pwd_glob(tmp, remote_path);
remote_glob(conn, tmp, GLOB_DOOFFS|GLOB_MARK, NULL, &g);
} else
glob(tmp, GLOB_DOOFFS|GLOB_MARK, NULL, &g);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 23, 3:17 AM (9 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27873240
Default Alt Text
D37253.diff (1012 B)
Attached To
Mode
D37253: sftp: avoid leaking path arg in calls to make_absolute_pwd_glob
Attached
Detach File
Event Timeline
Log In to Comment