diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-06-25 18:57:02 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-06-25 19:50:43 +0200 |
commit | a013911b8661daff2cdd58f0bf233ee7116f3029 (patch) | |
tree | 9503d3fed94c8e3d1a3fce09d384fda67a685fd2 /svgio | |
parent | 4acf48b99804be712d2bd6e3e73c1f030ec637d5 (diff) |
tdf#155735: cid#1532475 Out-of-bounds access
Change-Id: Ifb3153cc492d042098398695642cd2530bc3b4b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153564
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/source/svgreader/svgtools.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/svgio/source/svgreader/svgtools.cxx b/svgio/source/svgreader/svgtools.cxx index f885086497c1..c45f4c5e9c61 100644 --- a/svgio/source/svgreader/svgtools.cxx +++ b/svgio/source/svgreader/svgtools.cxx @@ -855,9 +855,8 @@ namespace svgio::svgreader SvgNumber aVal; - // create a 3x5 matrix using the first 15 values from the list of 20 matrix values. - // FIXME: support alpha (the last 5 values) - for (sal_uInt16 nRow = 0; nRow < 3; ++nRow) + // create a 4x4 matrix from the list of 20 matrix values. + for (sal_uInt16 nRow = 0; nRow < 4; ++nRow) { for (sal_uInt16 nColumn = 0; nColumn < 5; ++nColumn) { @@ -869,7 +868,9 @@ namespace svgio::svgreader if(readNumberAndUnit(rCandidate, nPos, aVal, nLen)) { - aMatrix.set(nRow, nColumn, aVal.solve(rInfoProvider)); + // ignore the last column + if (nColumn < 4) + aMatrix.set(nRow, nColumn, aVal.solve(rInfoProvider)); skip_char(rCandidate, ' ', ',', nPos, nLen); } } |