ofz#46331 Null-dereference READ

Change-Id: Id03c7fc437d67e01d6a1ec0547b2584396066201
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132497
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara 2022-04-04 09:08:52 +01:00
parent 602eb74e50
commit 6905434f40

View file

@ -4442,7 +4442,7 @@ void HwpReader::makeHidden(Hidden * hbox)
while (para)
{
for (int n = 0; n < para->nch && para->hhstr[n]->hh;
for (int n = 0; n < para->nch && para->hhstr.count(n) && para->hhstr[n]->hh;
n += para->hhstr[n]->WSize())
{
res = hcharconv(para->hhstr[n]->hh, dest, UNICODE);