Merge branch 'master' of git.bro.org:bro

This commit is contained in:
Robin Sommer 2015-04-16 08:13:58 -07:00
commit a7b7397f02
5 changed files with 17 additions and 3 deletions

View file

@ -1,11 +1,16 @@
2.3-700 | 2015-04-16 07:54:12 -0700 2.3-702 | 2015-04-16 08:13:58 -0700
* Update Mozilla CA list. (Johanna Amann) * Update Mozilla CA list. (Johanna Amann)
* Update tests to have them keep using older certificates where * Update tests to have them keep using older certificates where
appropiate. (Johanna Amann) appropiate. (Johanna Amann)
2.3-699 | 2015-04-16 09:51:58 -0500
* Fix the to_count function to use strtoull versus strtoll.
(Jon Siwek)
2.3-697 | 2015-04-15 09:51:15 -0700 2.3-697 | 2015-04-15 09:51:15 -0700
* Removing error check verifying that an ASCII writer has been * Removing error check verifying that an ASCII writer has been

View file

@ -1 +1 @@
2.3-700 2.3-702

View file

@ -2247,7 +2247,7 @@ function to_count%(str: string%): count
const char* s = str->CheckString(); const char* s = str->CheckString();
char* end_s; char* end_s;
uint64 u = (uint64) strtoll(s, &end_s, 10); uint64 u = (uint64) strtoull(s, &end_s, 10);
if ( s[0] == '\0' || end_s[0] != '\0' ) if ( s[0] == '\0' || end_s[0] != '\0' )
{ {

View file

@ -7,3 +7,4 @@
18446744073709551611 18446744073709551611
0 0
123 123
9223372036854775808 and 9223372036854775808 are the same

View file

@ -24,4 +24,12 @@ event bro_init()
local e: port = 123/tcp; local e: port = 123/tcp;
print port_to_count(e); print port_to_count(e);
local origString = "9223372036854775808";
local directCount: count = 9223372036854775808;
local fromStringCount: count = to_count(origString);
if ( directCount == fromStringCount )
print fmt("%s and %s are the same", directCount, fromStringCount);
else
print fmt("%s and %s are not the same", directCount, fromStringCount);
} }