summaryrefslogtreecommitdiffstats
path: root/sesman
diff options
context:
space:
mode:
authorPavel Roskin <plroskin@gmail.com>2016-11-15 21:24:49 -0800
committerPavel Roskin <plroskin@gmail.com>2016-11-26 09:17:51 -0800
commit662172012b3b1575409052cd6941251e15546b8d (patch)
tree2dfda8e3321d5051e3d999944a554ac5e2277009 /sesman
parenta4e3952d6570a8db7436fbe5bb50a526a858ab09 (diff)
downloadxrdp-proprietary-662172012b3b1575409052cd6941251e15546b8d.tar.gz
xrdp-proprietary-662172012b3b1575409052cd6941251e15546b8d.zip
Call devredir_cvt_slash() on the path copy, it changes the argument
Diffstat (limited to 'sesman')
-rw-r--r--sesman/chansrv/devredir.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sesman/chansrv/devredir.c b/sesman/chansrv/devredir.c
index 2ce30286..4a41b983 100644
--- a/sesman/chansrv/devredir.c
+++ b/sesman/chansrv/devredir.c
@@ -1010,26 +1010,27 @@ dev_redir_get_dir_listing(void *fusep, tui32 device_id, char *path)
if ((irp = devredir_irp_new()) == NULL)
return -1;
- /* cvt / to windows compatible \ */
- devredir_cvt_slash(path);
+ strncpy(irp->pathname, path, 255);
+
+ /* convert / to windows compatible \ */
+ devredir_cvt_slash(irp->pathname);
irp->CompletionId = g_completion_id++;
irp->completion_type = CID_CREATE_DIR_REQ;
irp->DeviceId = device_id;
- strncpy(irp->pathname, path, 255);
devredir_fuse_data_enqueue(irp, fusep);
DesiredAccess = DA_FILE_READ_DATA | DA_SYNCHRONIZE;
CreateOptions = CO_FILE_DIRECTORY_FILE | CO_FILE_SYNCHRONOUS_IO_NONALERT;
CreateDisposition = CD_FILE_OPEN;
- rval = dev_redir_send_drive_create_request(device_id, path,
+ rval = dev_redir_send_drive_create_request(device_id, irp->pathname,
DesiredAccess, CreateOptions,
CreateDisposition,
irp->CompletionId);
- log_debug("looking for device_id=%d path=%s", device_id, path);
+ log_debug("looking for device_id=%d path=%s", device_id, irp->pathname);
/* when we get a response to dev_redir_send_drive_create_request(), we */
/* call dev_redir_send_drive_dir_request(), which needs the following */