Helge Deller
47d1e98231
util/interval-tree: Check root for null in interval_tree_iter_first
...
Fix a crash in qemu-user when running
cat /proc/self/maps
in a chroot, where /proc isn't mounted.
The problem was introduced by commit 3ce3dd8ca965 ("util/selfmap:
Rewrite using qemu/interval-tree.h") where in open_self_maps_1() the
function read_self_maps() is called and which returns NULL if it can't
read the hosts /proc/self/maps file. Afterwards that NULL is fed into
interval_tree_iter_first() which doesn't check if the root node is NULL.
Fix it by adding a check if root is NULL and return NULL in that case.
Signed-off-by: Helge Deller <deller@gmx.de>
Fixes: 3ce3dd8ca965 ("util/selfmap: Rewrite using qemu/interval-tree.h")
Message-Id: <ZNOsq6Z7t/eyIG/9@p100>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2023-08-09 09:26:32 -07:00
..
2023-05-30 17:37:26 +02:00
2023-05-30 17:37:26 +02:00
2023-05-10 14:15:13 +02:00
2023-05-30 17:37:26 +02:00
2023-07-10 15:34:57 +02:00
2023-05-30 17:37:26 +02:00
2022-03-07 13:16:49 +00:00
2020-11-15 17:04:40 +01:00
2022-11-21 11:58:10 +01:00
2023-03-20 12:43:50 +01:00
2020-10-23 13:42:16 +01:00
2020-10-23 13:42:16 +01:00
2020-11-15 17:04:40 +01:00
2023-05-23 16:51:13 -07:00
2023-06-13 11:28:58 +02:00
2022-05-03 15:18:14 +04:00
2022-04-06 14:31:55 +02:00
2022-05-04 15:55:23 +02:00
2023-05-18 08:53:52 +02:00
2023-07-08 07:30:17 +01:00
2023-07-08 07:30:17 +01:00
2023-07-08 07:30:17 +01:00
2023-05-23 15:20:15 +08:00
2021-01-24 20:10:54 +01:00
2023-06-02 12:29:27 -05:00
2020-01-06 18:41:32 +04:00
2020-07-13 14:36:10 +01:00
2023-03-20 12:43:50 +01:00
2023-01-11 10:44:34 +01:00
2023-04-06 12:38:42 -04:00
2022-05-03 15:17:56 +04:00
2022-04-06 14:31:55 +02:00
2023-05-30 17:37:26 +02:00
2023-05-30 17:37:26 +02:00
2023-05-30 17:37:26 +02:00
2021-02-07 20:38:20 +00:00
2020-11-15 17:04:40 +01:00
2020-11-15 17:04:40 +01:00
2020-06-26 06:45:29 -04:00
2023-06-02 12:27:19 -05:00
2023-02-17 14:34:24 +01:00
2022-04-06 14:31:43 +02:00
2022-06-20 08:38:58 -03:00
2021-03-09 21:47:45 +01:00
2023-02-04 06:19:42 -10:00
2023-08-09 09:26:32 -07:00
2023-06-05 13:11:24 +02:00
2022-09-02 10:22:39 +08:00
2022-04-21 17:03:51 +04:00
2020-09-23 16:07:44 +01:00
2023-06-13 17:42:01 +10:00
2023-05-30 17:37:26 +02:00
2022-03-07 13:16:49 +00:00
2019-09-11 08:46:17 +02:00
2023-07-08 07:30:17 +01:00
2023-04-24 11:29:00 +02:00
2022-11-06 09:48:50 +01:00
2019-09-24 12:18:47 +01:00
2020-12-10 17:16:44 +01:00
2023-01-09 13:50:47 +01:00
2023-03-13 15:23:37 +04:00
2023-08-03 13:04:35 +02:00
2019-06-24 22:19:30 +02:00
2021-06-25 14:24:24 +03:00
2022-06-29 10:56:12 +03:00
2023-02-23 13:56:14 +01:00
2023-05-30 17:37:26 +02:00
2023-06-06 09:42:14 +02:00
2023-01-19 10:18:28 +01:00
2023-04-20 11:17:35 +02:00
2021-10-15 16:11:22 +02:00
2020-10-09 07:08:19 +02:00
2022-04-06 14:31:43 +02:00
2023-06-02 12:27:19 -05:00
2018-12-20 10:29:08 +01:00
2023-03-07 12:38:40 +01:00
2023-03-07 12:38:40 +01:00
2021-01-18 10:05:06 +00:00
2022-06-21 09:24:34 -07:00
2023-02-02 11:48:20 +00:00
2023-06-01 11:05:05 -04:00
2023-03-28 15:23:10 -07:00
2019-01-30 10:51:20 +01:00
2023-05-08 11:10:49 +02:00
2023-02-04 07:56:54 +01:00
2023-08-08 13:27:17 -07:00
2023-04-27 16:39:43 +02:00
2023-05-03 14:00:08 -05:00
2022-12-14 16:19:35 +01:00
2023-08-01 10:22:33 +01:00
2021-01-08 15:13:38 +00:00
2023-06-27 17:08:56 +02:00
2020-08-21 06:18:24 -04:00
2021-11-16 09:43:44 +01:00
2018-08-24 20:26:37 +02:00
2023-02-27 09:15:39 +01:00
2023-02-11 16:51:09 +01:00
2019-06-12 13:20:20 +02:00
2023-05-24 09:21:22 +02:00
2023-05-30 17:37:26 +02:00
2021-04-01 15:27:44 +04:00