From: Karel Zak Date: Wed, 12 Mar 2025 14:05:47 +0000 (+0100) Subject: unshare: make strings more robust X-Git-Tag: v2.41~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae39afa104bdfb9d7cc8f6df5ff2310626e98d11;p=thirdparty%2Futil-linux.git unshare: make strings more robust Signed-off-by: Karel Zak (cherry picked from commit ad591f1a8e5917cd41d91de18626494e072414f8) --- diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c index d5ce369c2..0490c1532 100644 --- a/sys-utils/unshare.c +++ b/sys-utils/unshare.c @@ -737,7 +737,7 @@ static int is_fixed(const char *interp) flags = strrchr(interp, ':'); - return strchr(flags, 'F') != NULL; + return flags && strchr(flags, 'F') != NULL; } static void load_interp(const char *binfmt_mnt, const char *interp)