mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Fix more Coverity-reported issues (introduced by internal error audit).
Mem leaks and a null pointer deref (not actually expected to occur unless already in one of the the odd states that warrants an internal warning/error). Also dead code.
This commit is contained in:
parent
1d23f055ba
commit
cf6d7ba5ae
4 changed files with 10 additions and 15 deletions
|
@ -290,8 +290,11 @@ void FragReassembler::BlockInserted(DataBlock* /* start_block */)
|
|||
}
|
||||
|
||||
else
|
||||
{
|
||||
reporter->InternalWarning("bad IP version in fragment reassembly: %d",
|
||||
version);
|
||||
delete [] pkt_start;
|
||||
}
|
||||
}
|
||||
|
||||
void FragReassembler::Expire(double t)
|
||||
|
|
|
@ -215,6 +215,7 @@ void TelnetAuthenticateOption::RecvSubOption(u_char* data, int len)
|
|||
{
|
||||
reporter->AnalyzerError(endp,
|
||||
"option peer missing in TelnetAuthenticateOption::RecvSubOption");
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! peer->DidRequestAuthentication() )
|
||||
|
|
|
@ -211,6 +211,7 @@ void POP3_Analyzer::ProcessRequest(int length, const char* line)
|
|||
default:
|
||||
reporter->AnalyzerError(this,
|
||||
"unexpected POP3 authorization state");
|
||||
delete decoded;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -743,23 +743,13 @@ int SMB_Session::ParseTransaction(int is_orig, int cmd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int ret;
|
||||
if ( is_orig )
|
||||
{
|
||||
if ( ! is_orig )
|
||||
return ParseTransactionResponse(cmd, hdr, body);
|
||||
|
||||
if ( cmd == SMB_COM_TRANSACTION || cmd == SMB_COM_TRANSACTION2 )
|
||||
ret = ParseTransactionRequest(cmd, hdr, body);
|
||||
return ParseTransactionRequest(cmd, hdr, body);
|
||||
|
||||
else if ( cmd == SMB_COM_TRANSACTION_SECONDARY ||
|
||||
cmd == SMB_COM_TRANSACTION2_SECONDARY )
|
||||
ret = ParseTransactionSecondaryRequest(cmd, hdr, body);
|
||||
|
||||
else
|
||||
ret = 0;
|
||||
}
|
||||
else
|
||||
ret = ParseTransactionResponse(cmd, hdr, body);
|
||||
|
||||
return ret;
|
||||
return ParseTransactionSecondaryRequest(cmd, hdr, body);
|
||||
}
|
||||
|
||||
int SMB_Session::ParseTransactionRequest(int cmd,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue