diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-08-30 21:24:40 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-09-02 16:44:29 +0200 |
commit | 94531db026dc915292cbf954d7da91d92af96ab2 (patch) | |
tree | f841915849fc82f94e9672e4cc294dfd886878b7 /sw | |
parent | dc41ee96197b6b3901f1db51bed0bc2f694ca98a (diff) |
ofz: MemorySanitizer: use-of-uninitialized-value
surely a lookup of i equal to rTable.size() is bogus
==75288== Conditional jump or move depends on uninitialised value(s)
==75288== at 0x1EC68C45: DelFlyInRange(SwNodeIndex const&, SwNodeIndex const&, SwIndex const*, SwIndex const*) (docedt.cxx:246)
==75288== by 0x1EDE68D4: sw::DocumentContentOperationsManager::DeleteSection(SwNode*) (DocumentContentOperationsManager.cxx:2096)
==75288== by 0x1FC27F2C: SwHTMLParser::DeleteSection(SwStartNode*) (htmltab.cxx:4945)
==75288== by 0x1FC231EF: SwHTMLParser::BuildTable(SvxAdjust, bool, bool, bool) (htmltab.cxx:5219)
==75288== by 0x1FC24B7B: SwHTMLParser::BuildTableCaption(HTMLTable*) (htmltab.cxx:4589)
==75288== by 0x1FC23E34: SwHTMLParser::BuildTableRow(HTMLTable*, bool, SvxAdjust, short) (htmltab.cxx:4020)
==75288== by 0x1FC25B38: SwHTMLParser::BuildTableSection(HTMLTable*, bool, bool) (htmltab.cxx:4189)
==75288== by 0x1FC2237F: SwHTMLParser::BuildTable(SvxAdjust, bool, bool, bool) (htmltab.cxx:5055)
==75288== by 0x1FC24B7B: SwHTMLParser::BuildTableCaption(HTMLTable*) (htmltab.cxx:4589)
==75288== by 0x1FC23E34: SwHTMLParser::BuildTableRow(HTMLTable*, bool, SvxAdjust, short) (htmltab.cxx:4020)
==75288== by 0x1FC25B38: SwHTMLParser::BuildTableSection(HTMLTable*, bool, bool) (htmltab.cxx:4189)
==75288== by 0x1FC2237F: SwHTMLParser::BuildTable(SvxAdjust, bool, bool, bool) (htmltab.cxx:5055)
==75288== by 0x1FC24B7B: SwHTMLParser::BuildTableCaption(HTMLTable*) (htmltab.cxx:4589)
==75288== by 0x1FC23E34: SwHTMLParser::BuildTableRow(HTMLTable*, bool, SvxAdjust, short) (htmltab.cxx:4020)
==75288== by 0x1FC25B38: SwHTMLParser::BuildTableSection(HTMLTable*, bool, bool) (htmltab.cxx:4189)
==75288== by 0x1FC2237F: SwHTMLParser::BuildTable(SvxAdjust, bool, bool, bool) (htmltab.cxx:5055)
==75288== by 0x1FC24B7B: SwHTMLParser::BuildTableCaption(HTMLTable*) (htmltab.cxx:4589)
==75288== by 0x1FC23E34: SwHTMLParser::BuildTableRow(HTMLTable*, bool, SvxAdjust, short) (htmltab.cxx:4020)
==75288== by 0x1FC25BC5: SwHTMLParser::BuildTableSection(HTMLTable*, bool, bool) (htmltab.cxx:4194)
==75288== by 0x1FC2237F: SwHTMLParser::BuildTable(SvxAdjust, bool, bool, bool) (htmltab.cxx:5055)
==75288== by 0x1FC79B2C: SwHTMLParser::NextToken(HtmlTokenId) (swhtml.cxx:1787)
==75288== by 0x22060E6A: HTMLParser::Continue(HtmlTokenId) (parhtml.cxx:295)
==75288== by 0x1FC745AC: SwHTMLParser::Continue(HtmlTokenId) (swhtml.cxx:683)
==75288== by 0x22060CF5: HTMLParser::CallParser() (parhtml.cxx:279)
==75288== by 0x1FC73F7F: SwHTMLParser::CallParser() (swhtml.cxx:607)
==75288== by 0x1FC6FF90: HTMLReader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) (swhtml.cxx:238)
Change-Id: I9583e5be41fe76f19c699394961ed2717a990cc3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121351
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 6b851810d43e4a9ea8119d97436f658593ff8f1b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121416
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/core/data/html/pass/ofz-msan-1.html | bin | 0 -> 14354 bytes | |||
-rw-r--r-- | sw/source/core/doc/docedt.cxx | 2 |
2 files changed, 1 insertions, 1 deletions
diff --git a/sw/qa/core/data/html/pass/ofz-msan-1.html b/sw/qa/core/data/html/pass/ofz-msan-1.html Binary files differnew file mode 100644 index 000000000000..5237a3d1dda2 --- /dev/null +++ b/sw/qa/core/data/html/pass/ofz-msan-1.html diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 9efeb5c1ec75..7d6dc4091937 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -243,7 +243,7 @@ void DelFlyInRange( const SwNodeIndex& rMkNdIdx, // Position could have been moved! if (i > rTable.size()) i = rTable.size(); - else if (pFormat != rTable[i]) + else if (i == rTable.size() || pFormat != rTable[i]) i = std::distance(rTable.begin(), rTable.find( pFormat )); } |