[Bro-Dev] #366: Crash with optional table and record ctors

Bro Tracker bro at tracker.icir.org
Wed Jan 26 15:52:54 PST 2011

#366: Crash with optional table and record ctors
  Reporter:  robin    |      Owner:
      Type:  Problem  |     Status:  new
  Priority:  Normal   |  Milestone:
 Component:  Bro      |    Version:  git/master
Resolution:           |   Keywords:

Comment (by vern):

 Seth, I think it's actually different.  The semantics of {{{ x:
 table[string] of string &optional &default="-" }}} is that x is an
 optional field, and it's type is {{{table[string] of string}}}.  In
 addition, if you look up a string in that table and the value isn't
 present, then what's returned is the string {{{"-"}}}.  I.e.,
 {{{&default}}} associates with the value of missing table elements, not
 with the value of the entire record field missing (which IIRC isn't
 controllable).  At least, I'm pretty sure I have that right ...

Ticket URL: <http://tracker.icir.org/bro/ticket/366#comment:1>
Bro Tracker <http://tracker.icir.org/bro>
Bro Issue Tracker

More information about the bro-dev mailing list