libXmu: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 21 18:49:48 UTC 2023
src/RdBitF.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit 017d1deaf923887df74b068c33d080008b0c25cf
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Mon Mar 27 16:23:55 2023 -0700
XmuReadBitmapDataFromFile: set close-on-exec when opening files
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
diff --git a/src/RdBitF.c b/src/RdBitF.c
index df379c5..eb60844 100644
--- a/src/RdBitF.c
+++ b/src/RdBitF.c
@@ -59,6 +59,12 @@ in this Software without prior written authorization from The Open Group.
#include <direct.h> /* for _getdrives() */
#endif
+#ifdef O_CLOEXEC
+#define FOPEN_CLOEXEC "e"
+#else
+#define FOPEN_CLOEXEC ""
+#endif
+
#define MAX_SIZE 255
/*
@@ -384,7 +390,7 @@ XmuReadBitmapDataFromFile(_Xconst char *filename, unsigned int *width,
FILE *fstream;
int status;
- if ((fstream = fopen_file (filename, "r")) == NULL) {
+ if ((fstream = fopen_file (filename, "r" FOPEN_CLOEXEC)) == NULL) {
return BitmapOpenFailed;
}
status = XmuReadBitmapData(fstream, width, height, datap, x_hot, y_hot);
More information about the xorg-commit
mailing list