From 6905434f40a1b3a58955b3b444d69f239be1b14e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 4 Apr 2022 09:08:52 +0100 Subject: [PATCH] ofz#46331 Null-dereference READ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id03c7fc437d67e01d6a1ec0547b2584396066201 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132497 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- hwpfilter/source/hwpreader.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index 8c84970867ba..7ab6689f8df3 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -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);