From: Russ Combs Date: Fri, 10 Jun 2016 12:26:21 +0000 (-0400) Subject: build 200 X-Git-Tag: 3.0.0-233~368 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d21cfb3ef4eca0443379bc0cec9fe6a4a45ceac;p=thirdparty%2Fsnort3.git build 200 --- diff --git a/ChangeLog b/ChangeLog index d3f4727e3..1e9f152e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +16/06/10 - build 200 + +-- continued porting of dce_rpc - smb transaction processing +-- tweaked autotools build foo +-- add / update unit tests +-- fix additional memory leaks +-- fix compiler warnings +-- fix static analysis issues +-- fix handling of bpf file failures + 16/06/03 - build 199 -- add new http_inspect alerts abusive content-length and transfer-encodings diff --git a/src/flow/ha.cc b/src/flow/ha.cc index cab520278..6714ab68c 100644 --- a/src/flow/ha.cc +++ b/src/flow/ha.cc @@ -335,7 +335,7 @@ static void write_update_msg_client( FlowHAClient* client, Flow* flow, HAMessage static void write_update_msg_content(Flow* flow, HAMessage* msg) { assert(s_client_map); - + for ( int i=0; iha_state->check_pending(1< pattern) && (*(bracket_index-1) == '\\') ) { - // Ignore escaped brackets + // Ignore escaped brackets bracket_index = strchr(bracket_index+1, '{'); continue; } @@ -145,11 +145,11 @@ bool SdOptionData::match(const uint8_t * const buf, uint16_t * const buf_index, while ( *buf_index < buflen && pattern[pattern_index] != '\0' && node_match ) { - char const * const pc = &pattern[pattern_index]; + char const * const pc = &pattern[pattern_index]; if ( pc[0] == '\\' && pc[1] != '\0' ) { -match__rescan: +match__rescan: pattern_index++; switch ( pattern[pattern_index] ) { @@ -194,7 +194,7 @@ match__rescan: // \b : match a numeric boundary case 'b': node_match = !isdigit((int)buf[*buf_index]); - if ( !node_match && *buf_index == 0 + if ( !node_match && *buf_index == 0 && pattern[pattern_index+1] != '\0' && pattern[pattern_index+2] != '\0' ) { @@ -232,12 +232,12 @@ match__rescan: { char const * const pc = &pattern[pattern_index]; - // '\b' can match EOM + // '\b' can match EOM if ( !(pc[0] == '\\' && pc[1] == 'b') ) { if( (pc[0] == '\0') ) return true; - + else return false; } diff --git a/src/main/build.h b/src/main/build.h index 40fd6712f..0a9953619 100644 --- a/src/main/build.h +++ b/src/main/build.h @@ -10,7 +10,7 @@ // // //-----------------------------------------------// -#define BUILD "199" +#define BUILD "200" #endif diff --git a/src/utils/util.cc b/src/utils/util.cc index 8221afbd4..edb1c360d 100644 --- a/src/utils/util.cc +++ b/src/utils/util.cc @@ -464,17 +464,16 @@ void CleanupProtoNames() std::string read_infile(const char* key, const char* fname) { int fd = open(fname, O_RDONLY); - struct stat buf; - + if (fstat(fd, &buf) < 0) { ParseError("can't stat %s: %s", fname, get_error(errno)); return ""; } - //check that its a regular file and not a directory or special file - if (!S_ISREG(buf.st_mode) ) + //check that its a regular file and not a directory or special file + if (!S_ISREG(buf.st_mode) ) { ParseError("not a regular file: %s", fname); return ""; @@ -482,13 +481,13 @@ std::string read_infile(const char* key, const char* fname) std::string line; std::ifstream bpf_file(fname); - + if (bpf_file.is_open()) { std::stringstream file_content; file_content << bpf_file.rdbuf(); line = file_content.str(); - + bpf_file.close(); } else @@ -497,7 +496,7 @@ std::string read_infile(const char* key, const char* fname) return ""; } - return(line); + return line; } /* Guaranteed to be '\0' terminated even if truncation occurs.