diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-08-03 10:29:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-08-03 11:49:24 +0200 |
commit | 39d364958447cd33a6e30dc9d2904ad94fd40aba (patch) | |
tree | 996713b64c793ec72ad140aded021096eef1e0e9 /vcl/workben | |
parent | 9c7e8b416d5555718f9d12fb89668a1fe7234c01 (diff) |
Avoid unsigned integer subtraction causing wrap-around
...to a too-large positive value, causing `instdir/program/soffice --headless
--convert-to epub` of cloudon/File_1149.docx from the crash-testing corpus to
fail under UBSan with
> writerfilter/source/dmapper/GraphicImport.cxx:562:27: runtime error: 7.73093e+11 is outside the range of representable values of type 'int'
> #0 in writerfilter::dmapper::GraphicImport::lcl_correctWord2007EffectExtent(int) at writerfilter/source/dmapper/GraphicImport.cxx:562:27
[...]
(where sal_uInt32 m_pImpl->getXSize() was 3731 and sal_uInt32
m_pImpl->getYSize() was 10583)
Change-Id: Id0ae9d6e46c977753d11cc2496ba5d240d3102bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119926
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/workben')
0 files changed, 0 insertions, 0 deletions