| Summary: | X11 touch initialisation does not check its file handles | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Marcus von Appen <mva> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | critical | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | FreeBSD | ||
| Attachments: | NULL pointer fix for X11_InitTouch() | ||
Fixed, thanks! http://hg.libsdl.org/SDL/rev/049721824c2e |
Created attachment 891 [details] NULL pointer fix for X11_InitTouch() On X11 a NULL pointer SIGSEGV might occur on call X11_InitTouch, if the user has only limited access to /proc or if /proc is not mounted for whatever reason: #0 0x000000080107d88b in flockfile () from /lib/libc.so.7 #1 0x0000000800fee6e3 in feof () from /lib/libc.so.7 #2 0x0000000804310a58 in X11_InitTouch (_this=0x8016d7800) at ../src/video/x11/SDL_x11touch.c:55 #3 0x00000008043114ad in X11_VideoInit (_this=0x8016d7800) at ../src/video/x11/SDL_x11video.c:371 #4 0x00000008042f9b9a in SDL_VideoInit (driver_name=0x0) It must be ensured that the return value of fopen("/proc/....") is not NULL.