diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-05-15 11:00:49 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-05-15 11:49:08 +0000 |
commit | b159b766eb7974419c2f16a01a8d15221c352dbf (patch) | |
tree | 597a7fc46f63b9861d30ea50648029908a284f60 /tools | |
parent | 925b18d0cbb444d5a05fbc5689463f2b0ec11927 (diff) |
Fix SVG shape path parsing to not crash when read-only strings
The SVG parser code copied from qsvg.cpp used to operate on QStringRef
which had no zero termination guarantee. However it did operate on
mutable underlying data, so a temporary insertion of a termination
during path parsing was "fine".
The copied parser here operates on a QString and with upcoming changes
in QtQml, those strings may now be located in read-only memory. However
QStrings are null terminated (unless carelessly constructed), so we
don't need the hack here.
Change-Id: If26b4a5168e4abc2e14bb37dcd631672f2a65e4b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions