mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 02:39:48 +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
@@ -1430,8 +1430,8 @@ error:
|
||||
static void ssh_packet_socket_controlflow_callback(int code, void *userdata)
|
||||
{
|
||||
ssh_session session = userdata;
|
||||
struct ssh_iterator *it;
|
||||
ssh_channel channel;
|
||||
struct ssh_iterator *it = NULL;
|
||||
ssh_channel channel = NULL;
|
||||
|
||||
if (code == SSH_SOCKET_FLOW_WRITEWONTBLOCK) {
|
||||
SSH_LOG(SSH_LOG_TRACE, "sending channel_write_wontblock callback");
|
||||
@@ -1892,7 +1892,7 @@ int ssh_packet_send(ssh_session session)
|
||||
|
||||
/* We finished the key exchange so we can try to send our queue now */
|
||||
if (rc == SSH_OK && type == SSH2_MSG_NEWKEYS) {
|
||||
struct ssh_iterator *it;
|
||||
struct ssh_iterator *it = NULL;
|
||||
|
||||
if (session->flags & SSH_SESSION_FLAG_KEX_STRICT) {
|
||||
/* reset packet sequence number when running in strict kex mode */
|
||||
|
||||
Reference in New Issue
Block a user