瀏覽代碼

X11: Check for invalid opcodes in SHM error handler

eafton 6 天之前
父節點
當前提交
b59d6d49c3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/video/x11/SDL_x11framebuffer.c

+ 1 - 1
src/video/x11/SDL_x11framebuffer.c

@@ -33,7 +33,7 @@ static int shm_error;
 static int (*X_handler)(Display *, XErrorEvent *) = NULL;
 static int shm_errhandler(Display *d, XErrorEvent *e)
 {
-    if (e->error_code == BadAccess) {
+    if (e->error_code == BadAccess || e->error_code == BadRequest) {
         shm_error = True;
         return 0;
     }