From 2260c0d79ac20bae2b914d9d7d9dd2a102ff050e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Filipensk=C3=BD?= Date: Fri, 3 Feb 2023 15:54:01 +0100 Subject: setcifsacl: Fix uninitialized value. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is to fix Red Hat internal static analyzer report. Signed-off-by: Pavel Filipenský --- setcifsacl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setcifsacl.c b/setcifsacl.c index d832cec..4c83476 100644 --- a/setcifsacl.c +++ b/setcifsacl.c @@ -52,6 +52,7 @@ #include "cifsacl.h" #include "idmap_plugin.h" +#include enum setcifsacl_actions { ActUnknown = -1, @@ -332,6 +333,7 @@ copy_sec_desc_with_sid(const struct cifs_ntsd *pntsd, struct cifs_ntsd *pnntsd, bufsize = size; /* set the pointers for source sids */ + assert(maction == ActSetOwner || maction == ActSetGroup); if (maction == ActSetOwner) { owner_sid_ptr = sid; group_sid_ptr = (struct cifs_sid *)((char *)pntsd + gsidoffset); -- cgit v1.2.3