1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-24 19:37:48 +03:00

messages: Fix a possible null pointer dereference.

This commit is contained in:
Andreas Schneider
2012-10-05 10:42:28 +02:00
parent 61d032fc03
commit 8567fc8d8c

View File

@@ -1268,6 +1268,9 @@ SSH_PACKET_CALLBACK(ssh_packet_global_request){
ssh_log(session,SSH_LOG_PROTOCOL,"Received SSH_MSG_GLOBAL_REQUEST packet");
msg = ssh_message_new(session);
if (msg == NULL) {
return SSH_PACKET_NOT_USED;
}
msg->type = SSH_REQUEST_GLOBAL;
if (request && strcmp(request, "tcpip-forward") == 0) {