[PATCH v2 0/1] MR3058: kerberos: Avoid potentially uninitialized variable (clang-scan)
When there are no caches, this variable would be uninitialized. Reported by clang-scan. Not sure if that can ever happen, but IMHO initializing doesn't do harm. -- v2: kerberos: Avoid potentially uninitialized variable (clang-scan) https://gitlab.winehq.org/wine/wine/-/merge_requests/3058
From: Fabian Maurer <dark.shadow4(a)web.de> Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> --- dlls/kerberos/unixlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kerberos/unixlib.c b/dlls/kerberos/unixlib.c index 45cf494aa70..8d9b59b58d4 100644 --- a/dlls/kerberos/unixlib.c +++ b/dlls/kerberos/unixlib.c @@ -305,7 +305,7 @@ static NTSTATUS copy_tickets_to_client( struct ticket_list *list, KERB_QUERY_TKT static NTSTATUS kerberos_fill_ticket_list( struct ticket_list *list ) { - NTSTATUS status; + NTSTATUS status = STATUS_SUCCESS; krb5_error_code err; krb5_context ctx; krb5_cccol_cursor cursor = NULL; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3058
On Thu Jul 6 18:32:44 2023 +0000, Hans Leidekker wrote:
The patch introduces a test failure. Thanks, I just assumed this was unrelated... Turns out, the tests rely on the fact that the uninitialized variable is 0. I thought I was just fixing an unlikely potential issue, didn't expect this to be actually affecting tests. Pushed an update.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3058#note_38166
participants (2)
-
Fabian Maurer -
Fabian Maurer (@DarkShadow44)