mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 10:26:47 +09:00
messages: Fix a possible null pointer dereference.
This commit is contained in:
@@ -1268,6 +1268,9 @@ SSH_PACKET_CALLBACK(ssh_packet_global_request){
|
|||||||
ssh_log(session,SSH_LOG_PROTOCOL,"Received SSH_MSG_GLOBAL_REQUEST packet");
|
ssh_log(session,SSH_LOG_PROTOCOL,"Received SSH_MSG_GLOBAL_REQUEST packet");
|
||||||
|
|
||||||
msg = ssh_message_new(session);
|
msg = ssh_message_new(session);
|
||||||
|
if (msg == NULL) {
|
||||||
|
return SSH_PACKET_NOT_USED;
|
||||||
|
}
|
||||||
msg->type = SSH_REQUEST_GLOBAL;
|
msg->type = SSH_REQUEST_GLOBAL;
|
||||||
|
|
||||||
if (request && strcmp(request, "tcpip-forward") == 0) {
|
if (request && strcmp(request, "tcpip-forward") == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user