New Defects reported by Coverity Scan for LibreOffice

Arkadiy Illarionov qarkai at gmail.com
Tue Oct 16 13:14:17 UTC 2018


вт, 16 окт. 2018 г. в 15:34, <scan-admin at coverity.com>:

> ** CID 1440300:  API usage errors  (INVALIDATE_ITERATOR)
> /vcl/source/window/dlgctrl.cxx: 548 in <unnamed>::focusNextInGroup(const
> __gnu_cxx::__normal_iterator<VclPtr<RadioButton> *,
> std::vector<VclPtr<RadioButton>, std::allocator<VclPtr<RadioButton>>>> &,
> std::vector<VclPtr<RadioButton>, std::allocator<VclPtr<RadioButton>>> &)()
>
>
>
> ________________________________________________________________________________________________________
> *** CID 1440300:  API usage errors  (INVALIDATE_ITERATOR)
> /vcl/source/window/dlgctrl.cxx: 548 in <unnamed>::focusNextInGroup(const
> __gnu_cxx::__normal_iterator<VclPtr<RadioButton> *,
> std::vector<VclPtr<RadioButton>, std::allocator<VclPtr<RadioButton>>>> &,
> std::vector<VclPtr<RadioButton>, std::allocator<VclPtr<RadioButton>>> &)()
> 542             {
> 543                 aI = std::find_if(rGroup.begin(), aStart,
> isSuitableDestination);
> 544                 if (aI == aStart)
> 545                     return false;
> 546             }
> 547
> >>>     CID 1440300:  API usage errors  (INVALIDATE_ITERATOR)
> >>>     Dereferencing iterator "aI" though it is already past the end of
> its container.
> 548             vcl::Window *pWindow = *aI;
> 549
> 550             pWindow->ImplControlFocus( GetFocusFlags::CURSOR |
> GetFocusFlags::Forward );
> 551             return true;
> 552         }
> 553
>

I suppose it's FP since aI ∈ [rGroup.begin(); aStart) ∪
(aStart; rGroup.end()).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20181016/a463859e/attachment.html>


More information about the LibreOffice mailing list