[Libreoffice] [FIXED] Re: [PATCH] possible null-dereferencing found by cppcheck
Caolán McNamara
caolanm at redhat.com
Mon Jan 17 04:09:16 PST 2011
On Sun, 2011-01-16 at 18:55 +0900, Takeshi Abe wrote:
> Hi,
>
> cppcheck said that
> > [impress/sd/source/ui/func/fusnapln.cxx:186]: (error) Possible null pointer dereference: pPV
> which is, at a glance, worth noting.
> It would be great if someone shows the de-referenceing has no problem,
> otherwise the attached patch may provides a workaround.
The complaint is because of the route through the logic where pPV can
definitely be NULL when it hits those lines, I reckon the easiest thing
is to ensure it's always set at the start, which will silence cppcheck
and appears to be the way it works in practice.
C.
More information about the LibreOffice
mailing list