Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@ya1gaurav
Copy link

E.g:
xpath_processor::xpath_processor (
const TiXmlNode * XNp_source_tree, ///< Source XML tree
const char * cp_xpath_expr) ///< XPath expression
: xpath_stream (cp_xpath_expr)

While calling xpath_stream if cp_xpath_expr is NULL, then it will call byte_stream constructor which will crash in below line:
u_length = strlen (cp_in) + 1; // strlen(NULL) crashes the code.
So, Null handling done in byte_Stream.

E.g:
xpath_processor::xpath_processor (
   const TiXmlNode * XNp_source_tree,  ///< Source XML tree
   const char * cp_xpath_expr)         ///< XPath expression
      : xpath_stream (cp_xpath_expr)

While calling xpath_stream if cp_xpath_expr is NULL, then it will call byte_stream constructor which will crash in below line:
u_length = strlen (cp_in) + 1;  // strlen(NULL) crashes the code.
So, Null handling done in byte_Stream.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.