"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/threading/formatters/Ascii.cc" between
zeek-3.2.2.tar.gz and zeek-3.2.4.tar.gz

About: Zeek (formerly Bro) is a flexible network analysis framework focusing on network security monitoring. Feature release.

Ascii.cc  (zeek-3.2.2):Ascii.cc  (zeek-3.2.4)
skipping to change at line 226 skipping to change at line 226
char* end = nullptr; char* end = nullptr;
errno = 0; errno = 0;
size_t pos; size_t pos;
switch ( type ) { switch ( type ) {
case zeek::TYPE_ENUM: case zeek::TYPE_ENUM:
case zeek::TYPE_STRING: case zeek::TYPE_STRING:
{ {
string unescaped = get_unescaped_string(s); string unescaped = get_unescaped_string(s);
val->val.string_val.length = unescaped.size(); val->val.string_val.length = unescaped.size();
val->val.string_val.data = copy_string(unescaped.c_str()); val->val.string_val.data = new char[val->val.string_val.length];
// we do not need a zero-byte at the end - the input manager adds
that explicitly
memcpy(val->val.string_val.data, unescaped.data(), unescaped.size
());
break; break;
} }
case zeek::TYPE_BOOL: case zeek::TYPE_BOOL:
{ {
auto stripped = strstrip(s); auto stripped = strstrip(s);
if ( stripped == "T" || stripped == "1" ) if ( stripped == "T" || stripped == "1" )
val->val.int_val = 1; val->val.int_val = 1;
else if ( stripped == "F" || stripped == "0" ) else if ( stripped == "F" || stripped == "0" )
val->val.int_val = 0; val->val.int_val = 0;
 End of changes. 1 change blocks. 
1 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)