Commit Graph

16 Commits

Author SHA1 Message Date
John Cupitt 834acad825 fix << on signed int warnings
<< on a negative number is undefined behaviour in C, and will trigger
fuzzer warnings.
2019-08-02 05:35:18 +01:00
John Cupitt af0dc5265f use glib's b64 encode/decode, if available
see https://github.com/libvips/libvips/issues/1263
2019-03-20 13:51:41 +00:00
John Cupitt d7f9ad8b41 improve base64 encode
- better data source too large check
- could write up to three bytes too far in worst case
- remove dead base64.h
- add an assert for overflow

see https://github.com/libvips/libvips/issues/1263
2019-03-20 12:50:44 +00:00
John Cupitt 7b64246af2 fix a couple of issues with huge profiles
The base64 encode limit was 1MB, but some huge profiles can get over
that, so it's now 10MB.

transform_save_string_blob() was incorrectly setting a refstring not a
blob as an error fallback, potentially leaving a dangling pointer.

Thanks Jaume!

See https://github.com/jcupitt/libvips/issues/666
2017-05-26 09:04:15 +01:00
John Cupitt 881f340610 increase size limit for b64 encoded-data
we had 1 mb limit, but some large cmyk profiles can bust through that,
up it to 10mb
2016-09-04 06:12:35 +01:00
John Cupitt 89509337d1 fix segv for length 0 blob print
"vipsheader -f icc-profile-data" could segv for zero-length blob
2016-09-04 06:01:11 +01:00
John Cupitt dac05244f8 fix crash with empty blob metadata
a blob metadata item with length 0 triggered a segv
2016-09-04 05:39:44 +01:00
John Cupitt 01025328da fix some cppcheck warnings
try:

$ cppcheck -f --enable=warning,performance,portability -j4 . 2> err.txt

there are still some left, see:

see https://github.com/jcupitt/libvips/issues/331
2015-09-28 22:01:15 +01:00
John Cupitt baf78fc04a oops, fix base64 encode/decode padding
we were adding up to two bytes of null to the end of base64-encoded
binary data due to a signed/unsigned mixup

add a test for this, plus a test for vips file format
2015-05-31 18:17:26 +01:00
John Cupitt 8956ba536b fix some cppcheck warnings 2013-05-01 18:46:15 +01:00
Benjamin Gilbert 162d71de08 Update Free Software Foundation address in one more file 2013-03-17 16:08:24 -04:00
John Cupitt 9599b5dc92 remove RCS tag
thanks testn
2013-01-15 22:14:24 +00:00
John Cupitt ae8faf6597 remove dmalloc support
we never used it and valgrind etc. is better anyway
2011-09-23 17:12:47 +01:00
John Cupitt 842d2e1b16 more more stuff to vips_
window, memory, buffer, b64 all moved to the vips_ namespace
2011-03-25 14:01:12 +00:00
John Cupitt 17c5ab4383 remove im_binfile
im_binfile is now folded into image.c
2011-02-28 18:00:03 +00:00
John Cupitt 4e76695e19 merge gtkdoc branch 2009-08-16 15:00:08 +00:00