Closed
Bug 1208856
Opened 10 years ago
Closed 10 years ago
Possible bad null-check in sdnAccessible::get_computedStyle()
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1208900
| Tracking | Status | |
|---|---|---|
| firefox44 | --- | affected |
People
(Reporter: ssitter, Unassigned)
References
Details
(Whiteboard: [pvs-studio])
From "Static Analysis of Mozilla Thunderbird's Code by PVS-Studio" <http://www.viva64.com/en/b/0347/>:
PVS-Studio's diagnostic message: 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());
....
}
Find the rogue.
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.
| Reporter | ||
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•