Work around compiler signed <-> unsigned casting issues.

This commit is contained in:
Sebastian Lackner 2014-06-02 01:38:40 +02:00
parent b4d53a7344
commit 772dfd9f5a
3 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
From 145c8755725667b5dc0b434236831090cea984a8 Mon Sep 17 00:00:00 2001
From f3596dd4a6dd481e67ff2c0e72aa5c4c74b1be72 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 1 Jun 2014 23:46:09 +0200
Subject: server: Add additional checks in get_xattr_sd to prevent crashes
@ -9,7 +9,7 @@ Subject: server: Add additional checks in get_xattr_sd to prevent crashes
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/server/file.c b/server/file.c
index 08231a7..bf5b796 100644
index 08231a7..d5d5ad4 100644
--- a/server/file.c
+++ b/server/file.c
@@ -738,10 +738,16 @@ struct security_descriptor *get_xattr_sd( int fd )
@ -17,7 +17,7 @@ index 08231a7..bf5b796 100644
n = fgetxattr( fd, "user.wine.sd", buffer, sizeof(buffer) );
- if (n == -1) return NULL;
+ if (n < 2 + sizeof(struct security_descriptor)) return NULL;
+ if (n == -1 || n < 2 + sizeof(struct security_descriptor)) return NULL;
+
/* validate that we can handle the descriptor */
if (buffer[0] != SECURITY_DESCRIPTOR_REVISION || buffer[1] != 0) return NULL;

View File

@ -1,11 +1,11 @@
From bfdf96dbe94a6b38aee3b5e2bf89b482612a6b2c Mon Sep 17 00:00:00 2001
From 682e63875f4ae2f58da1677ff44cf1adea35e7d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 1 Jun 2014 22:06:35 +0200
Subject: server: Add support for ACLs/xattr on FreeBSD
---
configure.ac | 2 +-
server/file.c | 16 ++++++++++++++--
configure.ac | 2 +-
server/file.c | 16 ++++++++++++++--
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
@ -22,7 +22,7 @@ index 0663893..c1ea0c9 100644
if test "x$with_xattr" == "xyes"
then
diff --git a/server/file.c b/server/file.c
index bf5b796..9bdf25c 100644
index d5d5ad4..5a4d2f4 100644
--- a/server/file.c
+++ b/server/file.c
@@ -43,6 +43,10 @@
@ -72,9 +72,9 @@ index bf5b796..9bdf25c 100644
+#else
+ n = extattr_get_fd( fd, EXTATTR_NAMESPACE_USER, "wine.sd", buffer, sizeof(buffer) );
+#endif
if (n < 2 + sizeof(struct security_descriptor)) return NULL;
if (n == -1 || n < 2 + sizeof(struct security_descriptor)) return NULL;
/* validate that we can handle the descriptor */
--
1.9.3
1.7.9.5

View File

@ -18,7 +18,7 @@ index a273502..5fa0cd5 100644
+ { "1b7ac850-5040-4d9e-8fde-9c483c3baf33:1", "Sebastian Lackner", "Add commandline option --patches to show the patch list." },
+ { "9e9a58e1-b226-4d4d-943b-be9a4c1dc525:1", "Michael Müller", "Add commandline option --check-libs to test if shared libraries are installed." },
+ { "8a366b6d-8ad6-4581-8aa9-66a03590a57b:2", "Erich E. Hoover", "Implement SIO_ADDRESS_LIST_CHANGE." },
+ { "92938b89-506b-430a-ba50-32de8b286e56:5", "Erich E. Hoover", "Store and return security attributes with extended file attributes." },
+ { "92938b89-506b-430a-ba50-32de8b286e56:6", "Erich E. Hoover", "Store and return security attributes with extended file attributes." },
+ { "5d6bb7b5-ec88-4ed3-907d-9ad2173a2f88:1", "Sebastian Lackner", "Enable/disable windows when they are (un)mapped by foreign applications." },
+ { "94186fff-6dbf-44d0-8eb1-2463d1608a0f:1", "Sebastian Lackner", "Update gl_drawable for embedded windows." },
+ { "1d0160c7-42a4-491c-9676-fa3b1859aaab:1", "Michael Müller", "Fix return value of WaitNamedPipe if pipe does not exist." },