Files
xserver/os
Mikhail Dmitrichenko f83807647e os: avoid closing null fd at Fopen
In `Fopen` function variable `iop` may store NULL as a result of `fopen`
call. In this case, if later privileges couldn't be restored (`seteuid`
call fails), further `fclose(iop)` call will cause runtime error.

This commit adds check `iop` for NULL before calling `fclose` to prevent
potential NULL pointer dereference.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2115>
2025-12-19 03:32:35 +00:00
..
2025-02-18 10:53:44 +00:00
2024-04-15 19:54:34 +00:00
2024-10-10 13:38:31 +00:00
2024-10-10 13:38:31 +00:00
2024-05-08 09:37:35 +02:00
2024-03-09 17:34:51 +00:00
2025-02-18 11:17:40 +00:00
2024-10-10 13:38:31 +00:00
2024-10-10 13:38:31 +00:00
2025-07-20 12:41:06 -07:00
2024-10-10 13:38:31 +00:00
2016-07-21 15:04:47 -04:00
2024-10-10 13:38:31 +00:00
2024-10-10 13:38:31 +00:00
2024-10-10 13:38:31 +00:00
2024-10-10 13:38:31 +00:00
2024-10-10 13:38:31 +00:00
2024-10-10 13:38:31 +00:00
2025-12-19 03:32:35 +00:00
2024-10-10 13:38:31 +00:00
2024-02-25 11:55:56 +01:00
2024-10-10 13:38:31 +00:00
2024-10-10 13:38:31 +00:00
2024-03-03 23:11:05 +00:00
2024-10-10 13:38:31 +00:00