Re: bug 74702 - Issue with bool OutputDevice::IsNativeControlSupported(ControlType, ControlPart)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15.04.2019 10:33, Adrien Ollier wrote:
> Hello everybody,
> 
> working on bug #74702 
> <https://bugs.documentfoundation.org/show_bug.cgi?id=74702> led me to 
> read file core/vcl/source/outdev/nativecontrols.cxx.
> 
> I think there is an issue here:
> 
> 
> 
> If mpGraphics == nullptr and AcquireGraphics() == false, then the second 
> if does not return false and we execute the instruction of the return 
> statement but this will lead to a crash (because mpGraphics is false in 
> this scenario).

No, please check what AcquireGraphics() does. Namely, it is used here to 
acquire mpGraphics when it's not yet available. In fact, lines 166-167 
are equivalent to this: "if (!mpGraphics) AcquireGraphics(); if 
(!mpGraphics) return false;"

-- 
Best regards,
Mike Kaganski
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux