Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential crash places in the code #635

Open
GoogleCodeExporter opened this issue Jul 29, 2015 · 0 comments
Open

Potential crash places in the code #635

GoogleCodeExporter opened this issue Jul 29, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Hello,

I've just checked breakpad sources by a static code analyzer and found 
following places that could be potentially dangerous:

- linked_ptr.h: possible NULL pointer dereference (line 85)

bool depart() {
    if (next_ == this) return true;
    linked_ptr_internal const* p = next_;

    // some check for NULL is needed here, like that:
    if (p == NULL)
        return false;


    while (p->next_ != this) p = p->next_;
    p->next_ = next_;
    return false;
  }


- src\processor\postfix_evaluator-inl.h: possible NULL pointer dereference 
(line 302)

  if (token_stream >> literal && token_stream.peek() == EOF) {
    if (value) {
      *value = literal;

// this IF should go here, but not after the brace
      if (negative)
          *value = -*value;
    }

    return POP_RESULT_VALUE;

  } else {
    if (identifier) {
      *identifier = token;
    }
    return POP_RESULT_IDENTIFIER;
  }


please check these points :)

best regards,
A.Masiuk

Original issue reported on code.google.com by [email protected] on 9 Feb 2015 at 2:00

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

No branches or pull requests

1 participant