sw/source/ui/dbui/mmgreetingspage.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 99b724db3f6693e03beeec9de9dc6aa213b70ee5 Author: Mike Kaganski <[email protected]> AuthorDate: Mon Oct 6 20:52:26 2025 +0200 Commit: Christian Lohmaier <[email protected]> CommitDate: Fri Oct 24 15:15:49 2025 +0200 tdf#168723: realloc should create the _correct_ size before access ;-) This is how commit 36df0b837b398f1011cb6f9fdf978a24125eee89 (INTEGRATION: CWS os47 (1.3.190); FILE MERGED, 2005-01-28) desctibed the same change in commitPage. The leftover's time came, just after 20 years. Change-Id: Id960f84349b8885811ad750d5956965d0ccf47b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191981 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> (cherry picked from commit 014612657286b8042580245773934c5a9433503b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192699 Reviewed-by: Xisco Fauli <[email protected]> (cherry picked from commit a0fabe5b853cb34c4646ce9b025ab9f34d46f4cd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192707 Reviewed-by: Adolfo Jayme Barrientos <[email protected]> Tested-by: Christian Lohmaier <[email protected]> Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index 3e5f8d43c243..48308ea2d56a 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -403,8 +403,8 @@ IMPL_LINK_NOARG(SwMailBodyDialog, OKHdl, weld::Button&, void) const SwDBData& rDBData = m_rConfigItem.GetCurrentDBData(); Sequence< OUString> aAssignment = m_rConfigItem.GetColumnAssignment( rDBData ); sal_Int32 nPos = m_xFemaleColumnLB->get_active(); - if(aAssignment.getLength() < MM_PART_GENDER) - aAssignment.realloc(MM_PART_GENDER); + if(aAssignment.getLength() <= MM_PART_GENDER) + aAssignment.realloc(MM_PART_GENDER + 1); if( nPos > 0 ) aAssignment.getArray()[MM_PART_GENDER] = m_xFemaleColumnLB->get_active_text(); else
