diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-07-23 16:52:14 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-07-24 20:13:52 +0200 |
commit | bcdcdaa5dfc5f1d50e0239055161b71e97f5f022 (patch) | |
tree | dc95809f2fd5a5ed47b3176313ad5b051eb07454 /oox | |
parent | 1aa69422be40368c988060c82706c8262f8de737 (diff) |
throw if length of keys and values are different
See https://crashreport.libreoffice.org/stats/signature/%60anonymous%20namespace'::WriteAnimateValues
This is expected to start rejecting broken files, instead of accepting invalid data silently,
as it did before. This is not a regression, and should be indication of corrupted generator,
which is the actual cause of the bug...
Change-Id: I66dbb380e8b2d313e58cddf938d952aed4a635b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99327
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/ppt/timenode.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx index efc632ebf514..41fb39fba150 100644 --- a/oox/source/ppt/timenode.cxx +++ b/oox/source/ppt/timenode.cxx @@ -33,6 +33,7 @@ #include <com/sun/star/animations/AnimationNodeType.hpp> #include <com/sun/star/animations/Event.hpp> #include <com/sun/star/animations/EventTrigger.hpp> +#include <com/sun/star/io/WrongFormatException.hpp> #include <com/sun/star/presentation/EffectNodeType.hpp> #include <com/sun/star/uno/XComponentContext.hpp> @@ -542,6 +543,9 @@ namespace oox::ppt { } } + if (xAnimate.is() && xAnimate->getValues().getLength() != xAnimate->getKeyTimes().getLength()) + throw css::io::WrongFormatException(); + if( mnNodeType == AnimationNodeType::TRANSITIONFILTER ) { |