[Bro-Dev] [JIRA] (BIT-24) inconsistent behavior with respect to out-of-range vector references
Jon Siwek (JIRA)
jira at bro-tracker.atlassian.net
Fri Mar 13 14:50:00 PDT 2015
[ https://bro-tracker.atlassian.net/browse/BIT-24?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jon Siwek updated BIT-24:
-------------------------
Resolution: Fixed
Fix Version/s: 2.2
Status: Closed (was: Open)
> inconsistent behavior with respect to out-of-range vector references
> --------------------------------------------------------------------
>
> Key: BIT-24
> URL: https://bro-tracker.atlassian.net/browse/BIT-24
> Project: Bro Issue Tracker
> Issue Type: Problem
> Components: Bro
> Reporter: Vern Paxson
> Fix For: 2.2
>
>
> [Matthias & Christian|from]
> This:
> {noformat}
> global foo: vector of count = { 42 };
> print foo[0];
> print foo[1];
> print foo[2];
> {noformat}
> just prints 42 (index 1), with no warning that 0 and 2 don't exist. But this:
> {noformat}
> global foo: vector of count = { 42 };
> global f0: count;
> global f1: count;
> global f2: count;
> f0 = foo[0]; f1 = foo[1]; f2 = foo[2];
> print f0; print f1; print f2;
> {noformat}
> yields
> {noformat}
> ... run-time error, value used but not set
> 42
> ... run-time error, value used but not set
> {noformat}
> whereas this:
> {noformat}
> global foo: vector of count;
> foo[0] = 42;
> {noformat}
> yields:
> {noformat}
> ... (foo[0]): error, index (0) must be positive
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4-OD-15-055#64014)
More information about the bro-dev
mailing list