Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToJSON() leaks if used with default RE_Matcher argument #599

Open
jsiwek opened this issue Sep 25, 2019 · 0 comments

Comments

@jsiwek
Copy link
Member

commented Sep 25, 2019

Not a big deal since we don't ever call these with the default RE_Matcher parameter:

zeek/src/Val.h

Line 351 in 1253a61

StringVal* ToJSON(bool only_loggable=false, RE_Matcher* re=new RE_Matcher("^_"));

zeek/src/Val.cc

Line 459 in 1253a61

static ZeekJson BuildJSON(Val* val, bool only_loggable=false, RE_Matcher* re=new RE_Matcher("^_"))

But still seems like that's not ever going to be a safe way to call it. Suggest either making the default be nullptr or just require calls to give that argument.

@jsiwek jsiwek added this to the 3.1.0 milestone Sep 25, 2019
@jsiwek jsiwek added this to Unassigned / Todo in Release 3.1.0 via automation Sep 25, 2019
@timwoj timwoj self-assigned this Sep 25, 2019
@jsiwek jsiwek moved this from Unassigned / Todo to Assigned / In Progress in Release 3.1.0 Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Release 3.1.0
  
Assigned / In Progress
2 participants
You can’t perform that action at this time.