Jon Siwek created BIT-1350:
------------------------------

             Summary: Anonymous inner record insufficient type checking
                 Key: BIT-1350
                 URL: https://bro-tracker.atlassian.net/browse/BIT-1350
             Project: Bro Issue Tracker
          Issue Type: Problem
          Components: Bro
            Reporter: Jon Siwek
             Fix For: 2.5


This mistake should be caught at parse-time:

{code}
global crash = "80/tcp";

type myrec: record {
    cid: conn_id;
};

event bro_init()
    {
    local mr: myrec;    mr = [$cid = 
[$orig_h=1.2.3.4,$orig_p=0/tcp,$resp_h=0.0.0.0,$resp_p=crash]];
    get_port_transport_proto(mr$cid$resp_p);
    }
{code}

instead it errors out at runtime: fatal error in ././test.bro, line 1: 
Val::CONVERTER (string/port) (80/tcp)



--
This message was sent by Atlassian JIRA
(v6.4-OD-15-055#64014)
_______________________________________________
bro-dev mailing list
[email protected]
http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev

Reply via email to