Stephan Bergmann
45ea6ebdf1
Avoid undefined floating -> integer conversion in TIFF import
...
...as started to happen when reading (invalid)
filter/qa/cppunit/data/tiff/fail/RC4-crash-7.tiff in
CppunitTest_filter_tiff_test after c81765629b
"coverity#1266496 Untrusted loop bound":
> /filter/source/graphicfilter/itiff/itiff.cxx:270:47: runtime error: value -nan is outside the range of representable values of type 'int'
> #0 0x2b5bae7ad928 in TIFFReader::ReadIntData() /filter/source/graphicfilter/itiff/itiff.cxx:270:47
> #1 0x2b5bae7b0017 in TIFFReader::ReadTagData(unsigned short, unsigned int) /filter/source/graphicfilter/itiff/itiff.cxx:320:27
> #2 0x2b5bae7e80f3 in TIFFReader::ReadTIFF(SvStream&, Graphic&) /filter/source/graphicfilter/itiff/itiff.cxx:1377:21
[...]
With an error-reporting concept apparently missing here, just convert such out-
of-bounds values to zero. (And make ReadDoubleData not go though the value-
limiting ReadIntData for floating types.)
Change-Id: I6e53e468e6b98fb7a7d5fd7f3336ee2168f76e30
Reviewed-on: https://gerrit.libreoffice.org/51700
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2018-03-21 14:18:44 +01:00
Caolán McNamara
4b785097f1
drop unnecessary includes
...
Change-Id: I1a817d5575bbd57ecaa874a27158b9218e4210cc
Reviewed-on: https://gerrit.libreoffice.org/51603
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-03-20 13:08:20 +01:00
Caolán McNamara
c81765629b
coverity#1266496 Untrusted loop bound
...
Change-Id: I89aaf8aab9e4f5230feb4c398fa4ebe9dc5e0add
Reviewed-on: https://gerrit.libreoffice.org/51563
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-03-19 22:07:29 +01:00
Jochen Nitschke
0fe96112be
cppcheck: useInitializationList
...
Change-Id: I7b3cce8d84176c13801a906af79e353a541135ce
Reviewed-on: https://gerrit.libreoffice.org/51240
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-03-14 07:23:10 +01:00
Julien Nabet
c775efffa7
Modernize a bit filter (part1)
...
mainly by using for-range loops
+ some algo simplifications
Change-Id: Ibbf2c4bb504b93cb9d7b2314deb6e65257c56029
Reviewed-on: https://gerrit.libreoffice.org/51243
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2018-03-14 07:02:25 +01:00
Julien Nabet
77db2da616
Typo: fSnapSapcingX->fSnapSpacingX (filter/idxf)
...
Change-Id: Iba309706677d7d108f2b3db0c925bf2304fe2f62
Reviewed-on: https://gerrit.libreoffice.org/50746
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2018-03-04 21:59:55 +01:00
Noel Grandin
3d40032191
tdf#116001 Incorrect Colors in Chart Wall Area
...
regression from
commit b10c7022f1
"use RawBitmap in BPixelRasterToBitmapEx"
we need to implement alpha support in vcl::bitmap::CreateFromData
Change-Id: I68bebbe1dd15e3bb04de312309c1631d6bb7fe2d
Reviewed-on: https://gerrit.libreoffice.org/50556
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-03-01 12:40:03 +01:00
Caolán McNamara
baf5038e6e
ofz#2977 timeout
...
Change-Id: I56caa2f0631a0a5938ba050d08b07ec6a0add204
Reviewed-on: https://gerrit.libreoffice.org/50555
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-03-01 11:48:14 +01:00
Noel Grandin
b8ececb409
drop old tools/gen methods in accessibility..formula
...
Change-Id: I075e29173945200854f2ef8e420867871659766a
Reviewed-on: https://gerrit.libreoffice.org/50446
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-03-01 07:19:10 +01:00
Noel Grandin
e2cb154195
convert COL_ constants to be of type Color
...
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48
Reviewed-on: https://gerrit.libreoffice.org/50373
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-28 07:34:27 +01:00
Noel Grandin
c98d330302
replace Color(COL_*) with COL_*
...
using
git grep -lwP "Color\s*\(\s*(COL_\w+)\s*\)"
| xargs perl -pi -e "s/Color\s*\(\s*(COL_\w+)\s*\)//g"
and then some manual fixup where the resulting expression no longer
compiled
Change-Id: I0e268d78611c3be40bba9f60ecfdc087a36c0df4
Reviewed-on: https://gerrit.libreoffice.org/50372
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-27 11:28:29 +01:00
Caolán McNamara
663702cd3e
ofz#6561 sanitize palette index
...
Change-Id: I78cc6a7eab114fdbcc438385706d56cd48a4f1fc
Reviewed-on: https://gerrit.libreoffice.org/50351
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-26 17:03:50 +01:00
Noel Grandin
08ab1f46b1
loplugin:oncevar extend to tools/gen.hxx types
...
Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2
Reviewed-on: https://gerrit.libreoffice.org/50283
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-26 07:21:04 +01:00
Caolán McNamara
d75144cf44
convert remaining InfoBox to weld::MessageDialog
...
Change-Id: I91d828e38d96264cf4a76f30940942556b8f78d8
Reviewed-on: https://gerrit.libreoffice.org/50205
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-25 20:03:26 +01:00
Aron Budea
40c33132cf
tdf#115863: fix TIFF import
...
Regression from 651e1f6cda
Change-Id: Id1604fb8eb11ea4e39846591e3912b40a7e7cc96
Reviewed-on: https://gerrit.libreoffice.org/50269
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Aron Budea <aron.budea@collabora.com >
2018-02-24 07:02:24 +01:00
Noel Grandin
ef8ed79759
loplugin:useuniqueptr in CGM
...
Change-Id: Iecd9251f68cd894a14fb6824151768d4cb663e0f
Reviewed-on: https://gerrit.libreoffice.org/49944
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-19 07:13:11 +01:00
Caolán McNamara
4c15c13344
ofz#6449 Integer-overflow
...
Change-Id: Ia144192a1374615c50fb3574f7a229926e43d7cb
Reviewed-on: https://gerrit.libreoffice.org/49951
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-19 00:28:15 +01:00
Caolán McNamara
c0cb656936
ofz#6427 use of uninitialized values
...
Change-Id: I357f1ef2ccf1c8f3f53effa6b38643523722202c
Reviewed-on: https://gerrit.libreoffice.org/49910
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-17 18:32:22 +01:00
Noel Grandin
1d180f48bc
Revert "loplugin:changetoolsgen in filter..framework" and reapply plugin
...
because I
(a) forgot to insert parentheses which changes the meaning of some expressions and
(b) I now use the AdjustFoo calls when changing unary operations, which reads much better
This reverts commit bf8a6cacd0 .
Change-Id: I4b5a9bf0c38ee1b57af91e6b7f184f1e8807f6f7
Reviewed-on: https://gerrit.libreoffice.org/49843
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-16 15:13:53 +01:00
Caolán McNamara
1cde1dd46b
ofz#6345 Integer-overflow
...
Change-Id: I537b49bac053c0f55bbbc26b0d37dfae4c62106a
Reviewed-on: https://gerrit.libreoffice.org/49817
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-15 21:51:13 +01:00
Caolán McNamara
79297e3264
ofz#6376 Floating-point-exception
...
Change-Id: Ic7dcbbd3e54796c7f5fed1dd72e9f7735079dd7d
Reviewed-on: https://gerrit.libreoffice.org/49814
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-15 17:14:40 +01:00
Caolán McNamara
65e14b6c52
ofz#6334 Out-of-memory
...
Change-Id: I714d4b3c767a2e9244e4d5a0b608e3d7fd3002a3
Reviewed-on: https://gerrit.libreoffice.org/49741
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-14 21:23:12 +01:00
Caolán McNamara
13fd5d44c1
ofz#6329 Out-of-memory
...
Change-Id: I42fef1609db1253bcf262ccf3cc86088ea6ca647
Reviewed-on: https://gerrit.libreoffice.org/49739
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-14 21:22:40 +01:00
Caolán McNamara
369018cffb
ofz#6330 Out-of-memory
...
Change-Id: Ie138705e7994915d7824d8cf1ae1a0e17e247256
Reviewed-on: https://gerrit.libreoffice.org/49740
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-14 21:22:02 +01:00
Caolán McNamara
c11c1afe58
ofz#6328 Abrt
...
Change-Id: I3bb4faa5b1b9361b4f29f55117d4317d5b1a66ec
Reviewed-on: https://gerrit.libreoffice.org/49737
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-14 21:21:12 +01:00
Caolán McNamara
7f629f51df
ofz#6324 Out-of-memory
...
Change-Id: I3dae862da134ef32ec16a230bc40befffff06ec2
Reviewed-on: https://gerrit.libreoffice.org/49734
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-14 21:20:44 +01:00
Caolán McNamara
625c53a428
ofz#6326 Null-dereference
...
Change-Id: I97a8a06acc782dc6fb0baddf46332b18d19fecc4
Reviewed-on: https://gerrit.libreoffice.org/49736
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-14 21:20:09 +01:00
Caolán McNamara
b8bb1c259d
ofz#6323 Abrt
...
Change-Id: Ia87b2430508648e6a77d291d4d86924bfc848ecc
Reviewed-on: https://gerrit.libreoffice.org/49729
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-14 21:19:45 +01:00
Caolán McNamara
4e1161c6cb
ofz#6315 Heap-buffer-overflow
...
Change-Id: Ia611f65b9fb38f125c224473e584580eeff20622
Reviewed-on: https://gerrit.libreoffice.org/49716
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-14 17:59:49 +01:00
Noel Grandin
bf8a6cacd0
loplugin:changetoolsgen in filter..framework
...
Change-Id: I622da8a0c096c74efd97326451c4576b230f0483
Reviewed-on: https://gerrit.libreoffice.org/49701
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-14 11:38:00 +01:00
Noel Grandin
6b4d3815a6
use BitmapTools in TIFFReader
...
part of making Bitmap an internal detail of vcl.
This one is a little trickier because it constructs the palette after it
reads the pixel data, so I couldn't use RawBitmap
Change-Id: I2f501260beebb541ee451e78d551e13f182a01b1
Reviewed-on: https://gerrit.libreoffice.org/49665
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-14 07:29:01 +01:00
Noel Grandin
2168d70980
use RawBitmap in PSDReader
...
part of making Bitmap an internal detail of vcl
Change-Id: Icdb7a7474b19e304950fcf75ef2b85006b7755e9
Reviewed-on: https://gerrit.libreoffice.org/49664
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-14 07:28:33 +01:00
Noel Grandin
f9e611478f
use RawBitmap in ipsGraphicImport
...
part of making Bitmap an internal detail of vcl
Change-Id: Idbc44c29292e7136e6bb09b8472a396e15e5bc68
Reviewed-on: https://gerrit.libreoffice.org/49663
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-14 07:28:12 +01:00
Noel Grandin
83330a608d
use Color, not BitmapColor in RawBitmap
...
because we don't want palette images
Change-Id: If087e51503714bf8474ae320381f80196092ceb0
Reviewed-on: https://gerrit.libreoffice.org/49662
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-14 07:28:01 +01:00
Caolán McNamara
c137652c30
ofz#6291 Out-of-memory
...
Change-Id: Ib68f1a2804a75a482cc72c68b2de4d266c8cbeb4
Reviewed-on: https://gerrit.libreoffice.org/49653
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-13 21:42:45 +01:00
Caolán McNamara
584e98267c
ofz#6287 limit palette index
...
Change-Id: I0bd71d7c471d6b7f9342118dfcaa321b78df3bc2
Reviewed-on: https://gerrit.libreoffice.org/49652
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-13 21:30:52 +01:00
Noel Grandin
2524f45289
use RawBitmap in PCXReader
...
part of making Bitmap an internal detail of vcl
Change-Id: I7965a122a0c6b6ae3146cf4be8f6141d2b0ab627
Reviewed-on: https://gerrit.libreoffice.org/49634
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-13 15:43:37 +01:00
Caolán McNamara
7cdbe677c8
ofz#6282 oom Abrt
...
Change-Id: I35a9681df5a99d51fd3c40d9a4b0a85780c090f2
Reviewed-on: https://gerrit.libreoffice.org/49641
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-13 15:38:35 +01:00
Noel Grandin
03e17dbd7f
use RawBitmap in TGAReader
...
part of making Bitmap an internal detail of vcl
Change-Id: Ic6efc036d6a31aec44b11da675e98d45c210f99c
Reviewed-on: https://gerrit.libreoffice.org/49632
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-13 14:25:49 +01:00
Noel Grandin
915fd2aa30
use BitmapEx and RawBitmap in PictReader
...
part of making Bitmap an internal detail of vcl
Change-Id: Ia0ef02ff257b71ca07dd294592641cc64a80dbfc
Reviewed-on: https://gerrit.libreoffice.org/49635
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-13 14:06:08 +01:00
Noel Grandin
dacf40ae9f
use RawBitmap in PCDReader
...
part of making Bitmap an internal detail of vcl
Change-Id: I6a5a301a30f9a58fb28bbe13dca2d21ad6525a14
Reviewed-on: https://gerrit.libreoffice.org/49633
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-13 13:49:04 +01:00
Noel Grandin
5ea3a708c7
use RawBitmap in RASReader
...
part of making Bitmap an internal detail of vcl
Change-Id: I72947ac6b59f251db93ff176d28fa840ab0f52ed
Reviewed-on: https://gerrit.libreoffice.org/49581
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-13 07:37:48 +01:00
Noel Grandin
1429337a10
use RawBitmap in PBMReader
...
part of making Bitmap an internal feature of vcl
Change-Id: Ib92ffa5de492de5ed143813a216960ac5140f23b
Reviewed-on: https://gerrit.libreoffice.org/49580
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-13 07:37:37 +01:00
Noel Grandin
3bc228a1dd
use RawBitmap and BitmapEx in DffPropertyReader
...
part of making Bitmap an internal feature of vcl
Change-Id: I2945005b9070bc13844c02f8ecaa349920d151fe
Reviewed-on: https://gerrit.libreoffice.org/49579
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-13 07:37:13 +01:00
Caolán McNamara
76c58b1cfb
for ~perfect compression link fuzzer input limit to an output limit
...
Change-Id: I30c3a0b75c818b55f6e73fdb68bf59fdac249d0e
Reviewed-on: https://gerrit.libreoffice.org/49606
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-12 21:36:14 +01:00
Caolán McNamara
ec1ef7c108
ofz#6228 sal_uInt8 makes more sense
...
Change-Id: Iae0662d923402692ad89c12b82487a67a947b496
Reviewed-on: https://gerrit.libreoffice.org/49573
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-02-12 09:53:22 +01:00
Noel Grandin
ac98ff5e86
use RawBitmap and BitmapEx in icgm filter
...
Change-Id: Icaffda666c27f733c0d490905e91a68b72073bcb
Reviewed-on: https://gerrit.libreoffice.org/49502
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Michael Meeks <michael.meeks@collabora.com >
2018-02-10 17:57:09 +01:00
Noel Grandin
e5012e53b9
use scanline when reading pixel data
...
extracts code from the innermost part of fairly hot loops
And add a GetIndexFromData method to make the call sites a little easier
to read.
Change-Id: I4ce5c5a687ecdb6982562a0aafce8513d86f9107
Reviewed-on: https://gerrit.libreoffice.org/49337
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-07 10:08:30 +01:00
Noel Grandin
3e0efdb50c
convert SetPixel->SetPixelOnData
...
by extracting out the Y scanline computation from the innermost
loop.
Inspired by commit 078d01c1b6cb9bbd80aeadc49a71cc817413164c.
Change-Id: Ic3c1827c01ed3aec629975749a551c7a68ae4a5e
Reviewed-on: https://gerrit.libreoffice.org/48926
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2018-02-06 07:39:11 +01:00
Caolán McNamara
a3251b83e3
ofz: speed up bitmap image fuzzing
...
Change-Id: I73c9ee7aef7062e3cb025c6ae0f3bb6a91485330
Reviewed-on: https://gerrit.libreoffice.org/48983
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2018-01-31 14:48:54 +01:00