mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
Fix free of an uninitialised pointer.
CHAN_AGENT channels need c->u.a.message to be either NULL or valid dynamically allocated memory, because it'll be freed by ssh_channel_destroy. This bug triggers if an agent forwarding channel is opened and closed without having sent any queries. [originally from svn r10032]
This commit is contained in:
parent
597cbddbb9
commit
7e515c4111
1
ssh.c
1
ssh.c
@ -7488,6 +7488,7 @@ static void ssh2_msg_channel_open(Ssh ssh, struct Packet *pktin)
|
|||||||
else {
|
else {
|
||||||
c->type = CHAN_AGENT; /* identify channel type */
|
c->type = CHAN_AGENT; /* identify channel type */
|
||||||
c->u.a.lensofar = 0;
|
c->u.a.lensofar = 0;
|
||||||
|
c->u.a.message = NULL;
|
||||||
c->u.a.outstanding_requests = 0;
|
c->u.a.outstanding_requests = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user