aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/firejail/x11.c')
-rw-r--r--src/firejail/x11.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/firejail/x11.c b/src/firejail/x11.c
index 807f2d5f0..e67260490 100644
--- a/src/firejail/x11.c
+++ b/src/firejail/x11.c
@@ -252,7 +252,7 @@ void x11_start_xephyr(int argc, char **argv) {
252 } 252 }
253 253
254 for (i = 0; i < (int) strlen(xephyr_extra_params)-1; i++) { 254 for (i = 0; i < (int) strlen(xephyr_extra_params)-1; i++) {
255 if (pos >= (sizeof(server_argv)/sizeof(*server_argv))) { 255 if (pos >= (sizeof(server_argv)/sizeof(*server_argv)) - 2) {
256 fprintf(stderr, "Error: arg count limit exceeded while parsing xephyr_extra_params\n"); 256 fprintf(stderr, "Error: arg count limit exceeded while parsing xephyr_extra_params\n");
257 exit(1); 257 exit(1);
258 } 258 }
@@ -716,6 +716,7 @@ void x11_xorg(void) {
716 } 716 }
717 if (set_perms(RUN_XAUTHORITY_SEC_FILE, getuid(), getgid(), 0600)) 717 if (set_perms(RUN_XAUTHORITY_SEC_FILE, getuid(), getgid(), 0600))
718 errExit("set_perms"); 718 errExit("set_perms");
719 /* coverity[toctou] */
719 unlink(tmpfname); 720 unlink(tmpfname);
720 721
721 // mount 722 // mount