[gnome-remote-desktop] rdp-fuse-clipboard: Only allow directories to be parents of other files



commit 128c03c2d0c9006a6dd8b21b0e31f2b0ad4cec72
Author: Pascal Nowack <Pascal Nowack gmx de>
Date:   Wed Aug 10 07:35:40 2022 +0200

    rdp-fuse-clipboard: Only allow directories to be parents of other files
    
    Don't assume that the client sent a proper file list. Always sanitize
    the data.

 src/grd-rdp-fuse-clipboard.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/grd-rdp-fuse-clipboard.c b/src/grd-rdp-fuse-clipboard.c
index 7dd55b5f..5393d790 100644
--- a/src/grd-rdp-fuse-clipboard.c
+++ b/src/grd-rdp-fuse-clipboard.c
@@ -580,6 +580,9 @@ is_fuse_file_parent (gpointer key,
   FuseFile *fuse_file = value;
   const char *parent_path = user_data;
 
+  if (!fuse_file->is_directory)
+    return FALSE;
+
   if (strcmp (parent_path, fuse_file->filename_with_root) == 0)
     return TRUE;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]