From: Yu Watanabe Date: Thu, 11 Oct 2018 19:24:27 +0000 (+0900) Subject: core: fix member access within null pointer X-Git-Tag: v240~574 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=958b8c7bd7a3cf1e710faf8c19a528cc94c214fe;p=thirdparty%2Fsystemd.git core: fix member access within null pointer config_parse_tasks_max() is also used for parsing system.conf or user.conf. In that case, userdata is NULL. Fixes #10362. --- diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 9f24b47b0b6..f96775ee719 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -3093,7 +3093,7 @@ int config_parse_tasks_max( int r; if (isempty(rvalue)) { - *tasks_max = u->manager->default_tasks_max; + *tasks_max = u ? u->manager->default_tasks_max : UINT64_MAX; return 0; }