|
|
|
@ -153,7 +153,7 @@ static int SSHParseServerVersion(Flow *f, void *ssh_state, AppLayerParserState *
|
|
|
|
|
SCReturnInt(-1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint64_t proto_ver_len = (uint64_t)((uint64_t)proto_end - (uint64_t)line_ptr);
|
|
|
|
|
uint64_t proto_ver_len = (uint64_t)(proto_end - line_ptr);
|
|
|
|
|
state->server_proto_version = SCMalloc(proto_ver_len + 1);
|
|
|
|
|
if (state->server_proto_version == NULL) {
|
|
|
|
|
SCLogError(SC_ERR_MEM_ALLOC, "Error allocating memory");
|
|
|
|
@ -180,7 +180,7 @@ static int SSHParseServerVersion(Flow *f, void *ssh_state, AppLayerParserState *
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint64_t sw_ver_len = (uint64_t)((uint64_t)sw_end - (uint64_t)line_ptr);
|
|
|
|
|
uint64_t sw_ver_len = (uint64_t)(sw_end - line_ptr);
|
|
|
|
|
state->server_software_version = SCMalloc(sw_ver_len + 1);
|
|
|
|
|
if (state->server_software_version == NULL) {
|
|
|
|
|
SCLogError(SC_ERR_MEM_ALLOC, "Error allocating memory");
|
|
|
|
@ -486,7 +486,7 @@ static int SSHParseClientVersion(Flow *f, void *ssh_state, AppLayerParserState *
|
|
|
|
|
SCReturnInt(-1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint64_t proto_ver_len = (uint64_t)((uint64_t)proto_end - (uint64_t)line_ptr);
|
|
|
|
|
uint64_t proto_ver_len = (uint64_t)(proto_end - line_ptr);
|
|
|
|
|
state->client_proto_version = SCMalloc(proto_ver_len + 1);
|
|
|
|
|
if (state->client_proto_version == NULL) {
|
|
|
|
|
SCLogError(SC_ERR_MEM_ALLOC, "Error allocating memory");
|
|
|
|
@ -513,7 +513,7 @@ static int SSHParseClientVersion(Flow *f, void *ssh_state, AppLayerParserState *
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint64_t sw_ver_len = (uint64_t)((uint64_t)sw_end - (uint64_t)line_ptr);
|
|
|
|
|
uint64_t sw_ver_len = (uint64_t)(sw_end - line_ptr);
|
|
|
|
|
state->client_software_version = SCMalloc(sw_ver_len + 1);
|
|
|
|
|
if (state->client_software_version == NULL) {
|
|
|
|
|
SCLogError(SC_ERR_MEM_ALLOC, "Error allocating memory");
|
|
|
|
@ -732,7 +732,7 @@ static void *SSHStateAlloc(void)
|
|
|
|
|
*/
|
|
|
|
|
static void SSHStateFree(void *state)
|
|
|
|
|
{
|
|
|
|
|
SshState *s= (SshState *)state;
|
|
|
|
|
SshState *s = (SshState *)state;
|
|
|
|
|
if (s->client_proto_version != NULL)
|
|
|
|
|
SCFree(s->client_proto_version);
|
|
|
|
|
if (s->client_software_version != NULL)
|
|
|
|
|