[gnome-remote-desktop/gnome-42] rdp-fuse-clipboard: Only allow directories to be parents of other files
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-remote-desktop/gnome-42] rdp-fuse-clipboard: Only allow directories to be parents of other files
- Date: Thu, 1 Sep 2022 15:16:11 +0000 (UTC)
commit 0c375ea74ea3b955ab65d9be84482b9302b4b362
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 c295096f..232bd71b 100644
--- a/src/grd-rdp-fuse-clipboard.c
+++ b/src/grd-rdp-fuse-clipboard.c
@@ -579,6 +579,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]