1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

examples: Initialize char arrays

"Error: UNINIT (CWE-457):
samba-4.20.0rc2/examples/libsmbclient/testacl3.c:15: var_decl: Declaring variable ""value"" without initializer.
samba-4.20.0rc2/examples/libsmbclient/testacl3.c:55: uninit_use_in_call: Using uninitialized value ""*value"" as argument to ""%s"" when calling ""printf"". [Note: The source code implementation of the function has been overridden by a builtin model.]
   53|   		}
   54|
   55|-> 		printf(""Attributes for [%s] are:\n%s\n"", path, value);
   56|   	}
   57|"

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
This commit is contained in:
Andreas Schneider 2024-06-24 15:17:13 +02:00 committed by Andreas Schneider
parent c814681c6b
commit 909506c91c

View File

@ -12,8 +12,8 @@ int main(int argc, char * argv[])
{
int ret;
int debug = 0;
char value[2048];
char path[2048];
char value[2048] = {};
char path[2048] = {};
char * the_acl;
char * p;
SMBCCTX * context;