]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
apparmor: fix cast in format string DEBUG statement
authorJohn Johansen <john.johansen@canonical.com>
Tue, 3 Feb 2026 12:47:32 +0000 (04:47 -0800)
committerJohn Johansen <john.johansen@canonical.com>
Tue, 3 Feb 2026 12:47:32 +0000 (04:47 -0800)
if debugging is enabled the DEBUG statement will fail do to a bad
fat fingered cast.

Fixes: 102ada7ca37ed ("apparmor: fix fmt string type error in process_strs_entry")
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/policy_unpack.c

index 175445c098960ca5379f6d7e83f9ec1dfd3baed9..e68adf39771fd41ed585ac9db20839c13382f98c 100644 (file)
@@ -546,7 +546,7 @@ static int unpack_strs_table(struct aa_ext *e, const char *name, bool multi,
                        if (c <= 0) {
                                AA_DEBUG(DEBUG_UNPACK, "process_strs %d i %d pos %ld",
                                         c, i,
-                                        (unsigned_long) e->pos - saved_pos);
+                                        (unsigned long)(e->pos - saved_pos));
                                goto fail;
                        }
                        if (!multi && c > 1) {