summaryrefslogtreecommitdiff
path: root/src/svg/qsvgstyle_p.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-02-20 12:37:21 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-02-26 13:03:51 +0100
commit45530ad4c5c6d3e90fe6d5a63f3bb551f37ad917 (patch)
tree54bd645720e8aa9ae3fc53ce76bbed8079e156a0 /src/svg/qsvgstyle_p.h
parentd072a505d7ff39d509b9c9e2de8722cd3549b4df (diff)
downloadqtsvg-45530ad4c5c6d3e90fe6d5a63f3bb551f37ad917.tar.gz
Restrict nested use nodes processed
To avoid exponential blow up, limit the number of use nodes processed under a certain depth. This should still allow the common use of many shallow uses, but limit anything dangerous. Change-Id: I3af6dacb61c68350876fb03f056f02a287ea4e33 Fixes: QTBUG-82153 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/svg/qsvgstyle_p.h')
-rw-r--r--src/svg/qsvgstyle_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/svg/qsvgstyle_p.h b/src/svg/qsvgstyle_p.h
index 39aa690..9d616d4 100644
--- a/src/svg/qsvgstyle_p.h
+++ b/src/svg/qsvgstyle_p.h
@@ -145,6 +145,8 @@ struct Q_SVG_PRIVATE_EXPORT QSvgExtraStates
int fontWeight;
Qt::FillRule fillRule;
qreal strokeDashOffset;
+ int nestedUseLevel = 0;
+ int nestedUseCount = 0;
bool vectorEffect; // true if pen is cosmetic
};