Commit Graph

6318 Commits

Author SHA1 Message Date
John Cupitt
ed2054dbbc revise arithmetic with const
there's a problem with out of bounds values, for example:

	vips relational_const k2.jpg x.v equal 1000

actually finds pixels == 255, since 1000 is saturated converted to 255
before the test starts.

This patch reworks arithmetic against const values to fix this.
2019-08-21 10:35:48 +01:00
John Cupitt
1de2947d51 Merge branch 'master' of github.com:libvips/libvips 2019-08-19 23:31:43 +01:00
John Cupitt
db49e82bda fix typo 2019-08-19 23:31:25 +01:00
John Cupitt
41efe3fb2d
Merge pull request #1399 from lovell/webp-verify-dimensions
WebP loader: verify upper limit on dimensions in header
2019-08-19 23:07:38 +01:00
John Cupitt
593b6f0d93 better /0 protection 2019-08-19 23:05:59 +01:00
Lovell Fuller
8d028420d5 WebP loader: verify upper limit on dimensions in header 2019-08-19 19:33:52 +01:00
John Cupitt
3614c4f4ef
Merge pull request #1398 from omira-sch/unify-fuzz-corpus
move fuzzing corpus into a single dir
2019-08-19 19:19:02 +01:00
Oscar Mira
a3466f305c move fuzzing corpus into a single dir 2019-08-19 19:54:56 +02:00
John Cupitt
c8296ecd15
Merge pull request #1397 from omira-sch/more-fuzzers
add fuzzers for vips_smartcrop and vip_mosaic
2019-08-19 18:21:58 +01:00
Oscar Mira
16a5cac2e3 add fuzzers for vips_smartcrop and vip_mosaic 2019-08-19 18:51:37 +02:00
John Cupitt
d70c431961 relax HEIC threshold
argh rounding with different lib versions
2019-08-19 16:44:32 +01:00
John Cupitt
2d0c21279a add tests 2019-08-19 16:27:44 +01:00
John Cupitt
daf578ca42 seems to work
now a switch/case pair
2019-08-18 16:35:28 +01:00
John Cupitt
1734284a9a Merge branch 'master' into add-mapimage 2019-08-17 14:55:45 +01:00
John Cupitt
fc17a79767 split into switch/case
A neater solution! In Python it should be something like:

merge = pyvips.Image.switch([tests]).case([cases])

and should be efficient
2019-08-17 14:51:55 +01:00
John Cupitt
45c847a96c more hacking 2019-08-17 12:57:01 +01:00
John Cupitt
6510e1ff30 hide a gcc warning
gcc has an "unknown pragma" warning which triggers for clang pragmas we need to hide clang compiler warnings (!!)
2019-08-16 13:24:25 +01:00
John Cupitt
282145ea61 Merge branch 'master' into add-mapimage 2019-08-15 12:22:38 +01:00
John Cupitt
6fa1b7cbf5 update README 2019-08-15 02:37:31 +01:00
John Cupitt
d80ce4bf15 fix a problem with shrinkv tail processing
Tail processing in shrinkv had an implicit assumption of round-down, but of
course we round to nearest. Thanks angelmixu.

see https://github.com/libvips/libvips/issues/1396
2019-08-13 11:21:01 +01:00
John Cupitt
32c0898b55 add oss-fuzz badge 2019-08-13 03:13:32 +01:00
John Cupitt
12371e68c2 start adding select 2019-08-13 03:04:33 +01:00
John Cupitt
d5634a918b start vips_case() 2019-08-11 19:11:17 +01:00
John Cupitt
10af2c2ddb Merge branch 'master' into add-mapimage 2019-08-11 17:30:10 +01:00
John Cupitt
e16fa657eb Revert "Revert "try disabling IM for oss-fuzz""
This reverts commit 263f69d581.
2019-08-11 12:41:38 +01:00
John Cupitt
df9986489a Revert "Revert "fix build with IM disabled""
This reverts commit 4dbf2167d0.
2019-08-11 12:32:46 +01:00
John Cupitt
263f69d581 Revert "try disabling IM for oss-fuzz"
This reverts commit faafd4eee0.
2019-08-11 12:31:58 +01:00
John Cupitt
4dbf2167d0 Revert "fix build with IM disabled"
This reverts commit 88b3aa8f2b.
2019-08-11 12:31:39 +01:00
John Cupitt
88b3aa8f2b fix build with IM disabled 2019-08-10 13:37:31 +01:00
John Cupitt
faafd4eee0 try disabling IM for oss-fuzz
libvips has to use ReadImage() when it opens an image via MagickCore,
and this can allocate very large amounts of memory, killing the fuzzer.

IM is already part of oss-fuzz, so we are not gaining much by
replicating that work. This patch attempts to disable IM for fuzzing tests.
2019-08-10 12:58:21 +01:00
John Cupitt
d81efda782 better blocking of large input images in the fuzzer
things like 65494x5 pixel PNGs were being allowed through and caused
timeouts
2019-08-09 16:45:08 +01:00
John Cupitt
765a416ca7 block huge tile_size in tiff load
fuzzed tiffs can give huge and mysterious values for tile_size
2019-08-09 16:32:35 +01:00
John Cupitt
ccea473b0e fix logic for page_height and n_pages getters 2019-08-09 15:46:56 +01:00
John Cupitt
8b1817ddd0 fix a couple of clang warnings 2019-08-09 15:22:56 +01:00
John Cupitt
7ef0ae826f try suppressing libexif ubsan again 2019-08-09 13:49:15 +01:00
John Cupitt
7c94d09ab6 revert ubsan supp file
nope, fails on travis
2019-08-09 13:15:54 +01:00
John Cupitt
e75320bb0d try enabling ubsan suppressions in travis 2019-08-09 13:03:14 +01:00
John Cupitt
41ecc696a7 disable asan and ubsan supp files for now
getting strange parse errors on asan
2019-08-09 12:28:15 +01:00
John Cupitt
cf94c2f71e more suppressions to a subdir
since we now have four of them
2019-08-09 11:43:13 +01:00
John Cupitt
5a3b1d7f91 break ubsan and asan suppressions out
they need to be in separate files
2019-08-09 11:40:51 +01:00
John Cupitt
6eaa0bc4c4 try to suppress libexif errors from fuzz 2019-08-09 10:47:45 +01:00
John Cupitt
d6baf157cf ignore buffer overflow in magick
for lsan testing
2019-08-09 10:22:47 +01:00
John Cupitt
cdee0feb93 Merge branch '8.8' 2019-08-09 10:12:55 +01:00
John Cupitt
aafc2c7948 add changelog note for profiles.c fix 2019-08-09 10:11:45 +01:00
John Cupitt
31f7421b11 Merge branch 'msvc-friendly-profiles' into 8.8 2019-08-09 10:10:49 +01:00
John Cupitt
988f9594f4 Merge branch '8.8' 2019-08-08 16:11:02 +01:00
John Cupitt
ff58c67e33 add locks for pdfium load
We used to lock within documents, ie. we did not allow two threads to
work on the same file.

However pdfium is not threadsafe in any way, and this is not supported,
see:

	https://groups.google.com/forum/#!msg/pdfium/kyIdh_J4csg/K1LvfPiHDwAJ

This patch adds locks around pdfium calls.

see:

	https://github.com/libvips/libvips/issues/1380
	https://github.com/libvips/libvips/issues/1275
2019-08-08 15:54:16 +01:00
John Cupitt
d6c8879f3d NOte min size for find_trim
See https://github.com/libvips/libvips/issues/1392
2019-08-08 14:55:19 +01:00
John Cupitt
d2d63f4ac4 revise profile_load
seems to work!
2019-08-08 13:23:28 +01:00
John Cupitt
9cc72ea1c1 msvc dies with string literals larger than 64kb
use arrays instead of tseing literals

generates the literals, profile_load.c needs to be adjusted still
2019-08-08 11:29:39 +01:00