mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Review usage of Reporter::InternalError, addresses BIT-1045.
Replaced some with InternalWarning or InternalAnalyzerError, the later being a new method which signals the analyzer to not process further input. Some usages I just removed if they didn't make sense or clearly couldn't happen. Also did some minor refactors of related code while reviewing/exploring ways to get rid of InternalError usages. Also, for TCP content file write failures there's a new event: "contents_file_write_failure".
This commit is contained in:
parent
6734260136
commit
b828a6ddc7
51 changed files with 532 additions and 267 deletions
|
@ -102,9 +102,6 @@ void ContentLine_Analyzer::DeliverStream(int len, const u_char* data,
|
|||
|
||||
delete [] buf;
|
||||
buf = tmp;
|
||||
|
||||
if ( ! buf )
|
||||
reporter->InternalError("out of memory delivering endpoint line");
|
||||
}
|
||||
|
||||
DoDeliver(len, data);
|
||||
|
@ -126,7 +123,11 @@ void ContentLine_Analyzer::EndpointEOF(bool is_orig)
|
|||
void ContentLine_Analyzer::SetPlainDelivery(int64_t length)
|
||||
{
|
||||
if ( length < 0 )
|
||||
reporter->InternalError("negative length for plain delivery");
|
||||
{
|
||||
reporter->InternalAnalyzerError(this,
|
||||
"negative length for plain delivery");
|
||||
return;
|
||||
}
|
||||
|
||||
plain_delivery_length = length;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue