"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/utils/js_tokenizer.h" between
snort3-3.1.36.0.tar.gz and snort3-3.1.38.0.tar.gz

About: Snort 3 is a network intrusion prevention and detection system (IDS/IPS) combining the benefits of signature, protocol and anomaly-based inspection.

js_tokenizer.h  (snort3-3.1.36.0):js_tokenizer.h  (snort3-3.1.38.0)
skipping to change at line 154 skipping to change at line 154
template <class T> template <class T>
using VStack = std::stack<T, std::vector<T>>; using VStack = std::stack<T, std::vector<T>>;
public: public:
enum JSRet enum JSRet
{ {
EOS = 0, EOS = 0,
SCRIPT_ENDED, SCRIPT_ENDED,
SCRIPT_CONTINUE, SCRIPT_CONTINUE,
OPENING_TAG,
CLOSING_TAG, CLOSING_TAG,
BAD_TOKEN, BAD_TOKEN,
IDENTIFIER_OVERFLOW, IDENTIFIER_OVERFLOW,
TEMPLATE_NESTING_OVERFLOW, TEMPLATE_NESTING_OVERFLOW,
BRACKET_NESTING_OVERFLOW, BRACKET_NESTING_OVERFLOW,
SCOPE_NESTING_OVERFLOW, SCOPE_NESTING_OVERFLOW,
WRONG_CLOSING_SYMBOL, WRONG_CLOSING_SYMBOL,
ENDED_IN_INNER_SCOPE, ENDED_IN_INNER_SCOPE,
MAX MAX
}; };
skipping to change at line 179 skipping to change at line 178
int cap_size = JSTOKENIZER_BUF_MAX_SIZE); int cap_size = JSTOKENIZER_BUF_MAX_SIZE);
~JSTokenizer() override; ~JSTokenizer() override;
JSRet process(size_t& bytes_in, bool external_script = false); JSRet process(size_t& bytes_in, bool external_script = false);
void reset_output() void reset_output()
{ ignored_id_pos = -1; } { ignored_id_pos = -1; }
bool is_unescape_nesting_seen() const; bool is_unescape_nesting_seen() const;
bool is_mixed_encoding_seen() const; bool is_mixed_encoding_seen() const;
bool is_opening_tag_seen() const;
protected: protected:
[[noreturn]] void LexerError(const char* msg) override [[noreturn]] void LexerError(const char* msg) override
{ snort::FatalError("%s", msg); } { snort::FatalError("%s", msg); }
private: private:
int yylex() override; int yylex() override;
void switch_to_initial(); void switch_to_initial();
void switch_to_temporal(const std::string& data); void switch_to_temporal(const std::string& data);
JSRet eval_eof(); JSRet eval_eof();
skipping to change at line 309 skipping to change at line 309
JSRet general_operator(); JSRet general_operator();
JSRet general_literal(); JSRet general_literal();
JSRet general_identifier(); JSRet general_identifier();
void general_unicode(); void general_unicode();
void escaped_unicode_latin_1(); void escaped_unicode_latin_1();
void escaped_unicode_utf_8(); void escaped_unicode_utf_8();
void escaped_code_point(); void escaped_code_point();
void escaped_url_sequence_latin_1(); void escaped_url_sequence_latin_1();
void lit_int_code_point(int base); void lit_int_code_point(int base);
void char_code_no_match(); void char_code_no_match();
void explicit_otag();
static const char* p_scope_codes[]; static const char* p_scope_codes[];
void* cur_buffer; void* cur_buffer;
void* tmp_buffer = nullptr; void* tmp_buffer = nullptr;
std::stringstream tmp; std::stringstream tmp;
std::stringstream aliased; std::stringstream aliased;
std::string alias; std::string alias;
std::string last_dealiased; std::string last_dealiased;
AliasState alias_state = ALIAS_NONE; AliasState alias_state = ALIAS_NONE;
bool prefix_increment = false; bool prefix_increment = false;
bool dealias_stored = false; bool dealias_stored = false;
bool unescape_nest_seen = false; bool unescape_nest_seen = false;
bool mixed_encoding_seen = false; bool mixed_encoding_seen = false;
bool opening_tag_seen = false;
uint8_t max_template_nesting; uint8_t max_template_nesting;
VStack<uint16_t> brace_depth; VStack<uint16_t> brace_depth;
JSToken token = UNDEFINED; JSToken token = UNDEFINED;
ASIGroup previous_group = ASI_OTHER; ASIGroup previous_group = ASI_OTHER;
JSIdentifierCtxBase& ident_ctx; JSIdentifierCtxBase& ident_ctx;
size_t bytes_read; size_t bytes_read;
size_t tmp_bytes_read; size_t tmp_bytes_read;
bool ext_script; bool ext_script;
VStack<char> regex_stack; VStack<char> regex_stack;
 End of changes. 4 change blocks. 
1 lines changed or deleted 3 lines changed or added

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