sw/source/filter/ww8/ww8toolbar.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit e355d7d691cfe9719b06e15129d86ec22a2bd7a4 Author: Caolán McNamara <[email protected]> Date: Fri Feb 9 10:49:39 2018 +0000 ofz#6173 check index before use Change-Id: I09d15ab324af0a8b3566f11868eb3266a68c4afe Reviewed-on: https://gerrit.libreoffice.org/49500 Tested-by: Jenkins <[email protected]> Reviewed-by: Michael Stahl <[email protected]> diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx index 33a4547ae6ba..d7ca9217e812 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 [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
