diff options
| author | ProsperousPotato <ProsperousPotato@users.noreply.github.com> | 2025-07-28 19:42:57 +0100 |
|---|---|---|
| committer | ProsperousPotato <ProsperousPotato@users.noreply.github.com> | 2025-07-28 19:42:57 +0100 |
| commit | 54d1c95b31af912939d711821c56c70ae82fa214 (patch) | |
| tree | 2508aba7877e99cd34850b929f3199d22606c38d /xwinwrap.c | |
| parent | 6cb4c5c8451196aedb84ebd240a1c6a150bee35a (diff) | |
added support for OpenBSD pledge()
Diffstat (limited to 'xwinwrap.c')
| -rw-r--r-- | xwinwrap.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -331,6 +331,9 @@ int main(int argc, char **argv) { bool skip_pager = false; bool daemonize = false; + if (pledge("stdio unix proc exec inet rpath", NULL) == -1) + fprintf(stderr, "pledge\n"); + win_shape shape = SHAPE_RECT; Pixmap mask; GC mask_gc; @@ -744,7 +747,7 @@ int main(int argc, char **argv) { XSync(display, window.window); - sprintf(widArg, "0x%x", (int)window.window); + snprintf(widArg, sizeof(widArg), "0x%x", (int)window.window); pid = fork(); |
