sw/source/filter/ww8/ww8toolbar.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 017fcc2fcd00af17a97bd5463d89662404f57667 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Feb 9 10:49:39 2018 +0000 ofz#6173 check index before use Change-Id: I09d15ab324af0a8b3566f11868eb3266a68c4afe Reviewed-on: https://gerrit.libreoffice.org/49486 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx index fbaf35979faf..b7dc69dc92bf 100644 --- a/sw/source/filter/ww8/ww8toolbar.cxx +++ b/sw/source/filter/ww8/ww8toolbar.cxx @@ -164,7 +164,9 @@ bool SwCTBWrapper::Read( SvStream& rS ) std::vector< sal_Int16 >::iterator it_end = dropDownMenuIndices.end(); for ( std::vector< sal_Int16 >::iterator it = dropDownMenuIndices.begin(); it != it_end; ++it ) { - rCustomizations[ *it ].bIsDroppedMenuTB = true; + if (*it < 0 || static_cast<size_t>(*it) >= rCustomizations.size()) + continue; + rCustomizations[*it].bIsDroppedMenuTB = true; } return rS.good(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits