mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-12 19:20:27 +09:00
CVE-2025-4878 Initialize pointers where possible
This is mostly mechanical change initializing all the pointers I was able to
find with some grep and manual review of sources and examples.
Used the following greps (which yield some false positives though):
git grep " \w* *\* *\w*;$"
git grep " ssh_session \w*;"
git grep " ssh_channel \w*;"
git grep " struct ssh_iterator \*\w*;"
git grep " ssh_bind \w*;"
git grep " ssh_key \w*;"
git grep " ssh_string \w*;"
git grep " ssh_buffer \w*;"
git grep " HMACCTX \w*;"
git grep " SHACTX \w*;"
grep -rinP '^(?!.*=)\s*(?:\w+\s+)*\w+\s*\*\s*\w+\s*;'
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
5d27f69494
commit
2eb2af4426
@@ -341,7 +341,7 @@ static int cmp_first_kex_algo(const char *client_str,
|
||||
size_t client_kex_len;
|
||||
size_t server_kex_len;
|
||||
|
||||
char *colon;
|
||||
char *colon = NULL;
|
||||
|
||||
int is_wrong = 1;
|
||||
|
||||
@@ -779,7 +779,7 @@ char *ssh_client_select_hostkeys(ssh_session session)
|
||||
int ssh_set_client_kex(ssh_session session)
|
||||
{
|
||||
struct ssh_kex_struct *client = &session->next_crypto->client_kex;
|
||||
const char *wanted;
|
||||
const char *wanted = NULL;
|
||||
int ok;
|
||||
int i;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user