BUG OF THE MONTH | Early nullifying

V3080 CWE-476 Possible null dereference. Consider inspecting ‘m_RowRects’. TreeViewControlGUI.cs 272

public override void GetFirstAndLastRowVisible(....)
  if (rowCount != m_RowRects.Count)
    m_RowRects = null;
    throw new InvalidOperationException(string.Format("....",
              rowCount, m_RowRects.Count));

In this case, the exception throw (access by the null reference m_RowRects) will happen when generating the message string for another exception.

Please click here to see more bugs from this project.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.