[Bug 3623] New: potentially uninitialized local pointers in fill_default_options() in readconf.c

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Wed Oct 11 03:28:36 AEDT 2023


https://bugzilla.mindrot.org/show_bug.cgi?id=3623

            Bug ID: 3623
           Summary: potentially uninitialized local pointers in
                    fill_default_options() in readconf.c
           Product: Portable OpenSSH
           Version: 9.5p1
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P5
         Component: ssh
          Assignee: unassigned-bugs at mindrot.org
          Reporter: tessgauthier at microsoft.com

Overview:

*def_cipher, *def_mac, *def_kex, *def_key, *def_sig are uninitialized
pointers.

int
fill_default_options(Options * options)
{
        char *all_cipher, *all_mac, *all_kex, *all_key, *all_sig;
        char *def_cipher, *def_mac, *def_kex, *def_key, *def_sig;
        int ret = 0, r;

...
}

Expected:
char *def_cipher = NULL, *def_mac = NULL, *def_kex = NULL, *def_key =
NULL, *def_sig = NULL;

Additional Information:
Corresponding compiler warning -
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4703?view=msvc-170&f1url=%3FappId%3DDev16IDEF1%26l%3DEN-US%26k%3Dk(C4703)%26rd%3Dtrue

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list