apparmor/kernel-patches/for-mainline/audit-unterminated-string.diff

14 lines
358 B
Diff
Raw Normal View History

Index: b/kernel/auditsc.c
===================================================================
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -751,7 +751,7 @@ void audit_log_task_context(struct audit
if (len < 0 )
goto error_path;
- audit_log_format(ab, " subj=%s", ctx);
+ audit_log_format(ab, " subj=%.*s", (int)len, ctx);
return;
error_path: