svl/source/numbers/zforfind.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 366b5878015b8cd75ceb7f2db00d286dafa365bd Author: Eike Rathke <er...@redhat.com> AuthorDate: Mon Sep 13 12:02:41 2021 +0200 Commit: Eike Rathke <er...@redhat.com> CommitDate: Mon Sep 13 16:25:22 2021 +0200 Check string bounds Doesn't occur in practice because all date acceptance patterns start with a YMD character, enforced by the dialog, but just in case.. Change-Id: I8ed43a272e9501c6977888b1f587ed14c85024ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122025 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Jenkins diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index 9d3c3baec899..330921242a01 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -1476,7 +1476,7 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt ) { ++nPos; c = rPat[--nPatCheck]; - } while (c != 'Y' && c != 'M' && c != 'D'); + } while (c != 'Y' && c != 'M' && c != 'D' && nPatCheck > 0); } } }