diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-06-13 20:21:20 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-06-13 22:17:46 +0200 |
commit | 547c8a8a8935204bed319b959dd040d6413bdf74 (patch) | |
tree | f0d9390b58548f5afe9530fc2bd36e0dc1b83c14 /fpicker | |
parent | f4e0cc1ff145287f80738f070a8c46a64b2f76d1 (diff) |
Avoid -fsanitize=float-cast-overflow
...as happens when loading xhtml/kde143045-4.xhtml as obtained via
bin/get-bugzilla-attachments-by-mimetype (i.e., the attachment at
<https://bugs.kde.org/show_bug.cgi?id=143045#c4>):
> sw/source/filter/html/svxcss1.cxx:1424:60: runtime error: -5000 is outside the range of representable values of type 'unsigned long'
> #0 in ParseCSS1_background(CSS1Expression const*, SfxItemSet&, SvxCSS1PropertyInfo&, SvxCSS1Parser const&) at sw/source/filter/html/svxcss1.cxx:1424:60
> #1 in SvxCSS1Parser::DeclarationParsed(rtl::OUString const&, std::unique_ptr<CSS1Expression, std::default_delete<CSS1Expression> >) at sw/source/filter/html/svxcss1.cxx:3156:9
> #2 in CSS1Parser::ParseRule() at sw/source/filter/html/parcss1.cxx:774:5
> #3 in CSS1Parser::ParseStyleSheet() at sw/source/filter/html/parcss1.cxx:719:13
Conversion to integral type (which truncates) was always there at least since
7b0b5cdfeed656b279bc32cd929630d5fc25878b "initial import". It is unclear to me
whether that's really relevant or wanted, but lets keep that behavior with an
explicit std::trunc.
Change-Id: Ib3b99a89e460850a992b403982e2797d24eee65b
Reviewed-on: https://gerrit.libreoffice.org/73980
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'fpicker')
0 files changed, 0 insertions, 0 deletions