mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
Fix missing format string that caused some segfaults.
Binpac exceptions caught in Analyzer.cc are passed to Reporter::Weird and from there to Reporter::WeirdHelper. WeirdHelper has var args, to support passing them on to DoLog, but there were no forced format strings. Since the binpac exception can contain network data which can contain %-characters, that caused segfaults.
This commit is contained in:
parent
5b6cc7fe0f
commit
b6923dc55a
1 changed files with 3 additions and 3 deletions
|
@ -160,17 +160,17 @@ void Reporter::Weird(const char* name)
|
|||
|
||||
void Reporter::Weird(Connection* conn, const char* name, const char* addl)
|
||||
{
|
||||
WeirdHelper(conn_weird, conn->BuildConnVal(), name, addl);
|
||||
WeirdHelper(conn_weird, conn->BuildConnVal(), name, "%s", addl);
|
||||
}
|
||||
|
||||
void Reporter::Weird(Val* conn_val, const char* name, const char* addl)
|
||||
{
|
||||
WeirdHelper(conn_weird, conn_val, name, addl);
|
||||
WeirdHelper(conn_weird, conn_val, name, "%s", addl);
|
||||
}
|
||||
|
||||
void Reporter::Weird(const uint32* orig, const uint32* resp, const char* name)
|
||||
{
|
||||
WeirdFlowHelper(orig, resp, name);
|
||||
WeirdFlowHelper(orig, resp, "%s", name);
|
||||
}
|
||||
|
||||
void Reporter::DoLog(const char* prefix, EventHandlerPtr event, FILE* out, Connection* conn, val_list* addl, bool location, bool time, const char* fmt, va_list ap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue