[Libreoffice] [FIXED] About a probable bug in core/lotuswordpro/source/filter/xfilter/xfcell.cxx
caolanm at redhat.com
Fri Sep 23 09:17:44 PDT 2011
On Sat, 2011-09-17 at 18:09 +0200, CaStarCo wrote:
> Hello :) ,
> reading the list of http://libreoffice.boldandbusted.com/ i've found a
> potential bug in core/lotuswordpro/source/filter/xfilter/xfcell.cxx .
> The member m_pOwnerRow of the XFCell is not initialized in any
> constructor (and in many methodts it's setted to null)
Yeah, its initialized in the copy ctor and assignment operator, but not
initialized in the default ctor. I fixed this up now.
> In the line 177 the variable pRow is setted to m_pOwnerRow (wich is or
> null or a random value), in the next line the code tries to acces to a
> member of pRow... but pRow is probably 0 because the value of
> m_pOwnerRow, and the code will crash at this point.
> I don't know the exact purpose of this piece of code.
Well, from if( !pRow || !pTable ) we can be sure the intent is to exit
early if pRow (which is assigned from m_pOwnerRow) was NULL. Someone
just got a little muddled and extracted pTable from pRow before checking
that pRow was NULL.
i.e., I reckon
http://cgit.freedesktop.org/libreoffice/core/commit/?id=eddbdb1938b981b64c923030bc6658ab281971b7 is a sufficient fix.
More information about the LibreOffice