From: Yu Watanabe Date: Sat, 8 Apr 2023 16:16:26 +0000 (+0900) Subject: os-util: return earlier when unsupported image class is specified X-Git-Tag: v254-rc1~760^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7421f20c7e32d55cd9b21db0b481911b2eaf8ccb;p=thirdparty%2Fsystemd.git os-util: return earlier when unsupported image class is specified --- diff --git a/src/basic/os-util.c b/src/basic/os-util.c index 619a2bae966..35c7555461d 100644 --- a/src/basic/os-util.c +++ b/src/basic/os-util.c @@ -156,6 +156,9 @@ int open_extension_release( if (!extension) return open_os_release(root, ret_path, ret_fd); + if (!IN_SET(image_class, IMAGE_SYSEXT, IMAGE_CONFEXT)) + return -EINVAL; + const char *extension_full_path; if (!image_name_is_valid(extension))