Mozilla Thunderbird



V522 Dereferencing of the null pointer ‘aStyleValues’ might take place. sdnaccessible.cpp 252

STDMETHODIMP sdnAccessible::get_computedStyle(
                   BSTR __RPC_FAR* aStyleProperties,
                   BSTR __RPC_FAR* aStyleValues,
                   unsigned short __RPC_FAR* aNumStyleProperties)
  if (!aStyleProperties || aStyleValues || !aNumStyleProperties) 
    return E_INVALIDARG;
  aStyleValues[realIndex] = ::SysAllocString(value.get());

The analyzer has detected a null pointer dereferencing issue. When implementing the check, the programmer forgot to add ! before aStyleValues. The subsequent code gets control only when this pointer equals zero, and dereferences it.

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: Logo

You are commenting using your 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.