[Libreoffice-commits] core.git: sw/source
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 28 12:58:17 UTC 2021
sw/source/core/doc/docdesc.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 3c6b33a3cf982c78b64a1a72bf9b2e7bd07495c3
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Mon Jun 28 01:31:03 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Mon Jun 28 14:57:43 2021 +0200
Fix uninitialised conditional jump
Since we just handle one specific case, just initialize the
variable to something different, instead of checking the
GetFirstRedoInfo result.
From valgrind:
==10566== Conditional jump or move depends on uninitialised value(s)
==10566== at 0x270E4451: SwDoc::ChgPageDesc(unsigned long, SwPageDesc const&) (docdesc.cxx:431)
==10566== by 0x272E341F: SwFEShell::ChgPageDesc(unsigned long, SwPageDesc const&) (fedesc.cxx:122)
...
Change-Id: Ib95f81297959a535a08dc399f72b68c15e621a27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118017
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 6b63e7a300c3..c51c5cde92ef 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -426,7 +426,7 @@ void SwDoc::ChgPageDesc( size_t i, const SwPageDesc &rChged )
}
else
{
- SwUndoId nBeingUndone;
+ SwUndoId nBeingUndone(SwUndoId::EMPTY);
GetIDocumentUndoRedo().GetFirstRedoInfo(nullptr, &nBeingUndone);
if (SwUndoId::HEADER_FOOTER == nBeingUndone)
{
More information about the Libreoffice-commits
mailing list