Limit to len the number of UTF-16 code units being read

Change-Id: I62bcf2919cb97d16811e9a59a63f1155437b6740
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176718
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
This commit is contained in:
Stephan Bergmann 2024-11-18 15:24:02 +01:00
parent f41701a71b
commit 14f5d64771

View file

@ -62,7 +62,7 @@ sal_uInt32 readString(const sal_uInt8* buffer, sal_Unicode* v, sal_uInt32 maxSiz
len = maxSize / 2;
}
for (i = 0; i <= len; i++)
for (i = 0; i < len; i++)
{
sal_uInt16 aChar;