Mozilla Thunderbird

mozilla-thunderbird-logo-banner

A typo

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:

WordPress.com Logo

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

Google+ photo

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

Connecting to %s