Wykres commitów

271 Commity (08e1ba12866eb5592e27f879479a878fa9d21c70)

Autor SHA1 Wiadomość Data
Olaf Meeuwissen fc4b250a09 .editorconfig: use utf-8 charset throughout 2017-05-29 21:14:30 +09:00
Olaf Meeuwissen f0f187f995 .editorconfig: trim trailing blank lines 2017-05-29 21:14:30 +09:00
Olaf Meeuwissen 23891a2646 .editorconfig: trim trailing whitespace 2017-05-29 21:14:29 +09:00
Olaf Meeuwissen 479ccaeddd autotools: Sync derived files
This was done by running

  autoreconf --force --install

on Debian GNU/Linux 8.8 and reverting the removal of SANE specific
tweaks to ltmain.sh.
2017-05-14 19:48:41 +09:00
Olaf Meeuwissen 9230e0c251 saned: Link against Avahi library 2017-05-13 13:12:06 +09:00
Aaron Muir Hamilton 801558f959 Write density (resolution) JFIF header information with JPEG files. 2017-05-04 18:35:05 +09:00
Olaf Meeuwissen b219bc2c73 Merge branch 'icc-profiles' 2017-05-04 18:26:55 +09:00
Olaf Meeuwissen 92e59791d2 Fix [-Werror=implicit-function-declaration] compiler error
The fileno() is only available if its feature test macro passes.  The
various symbols are defined appropriately in ../include/sane/config.h
during configuration of the build.
2017-04-30 20:05:12 +09:00
Olaf Meeuwissen adebd37b5c Fix [-Wpointer-arith] compiler warnings 2017-04-30 20:00:28 +09:00
Aaron Muir Hamilton c3903cc476 Avoid attaching grayscale ICC profiles to rgb images, or vice-versa.
If the ICC profile added does not match the colour format of the
  image, libpng will abort. This can leave the scanner motors in an
  incorrect state and possibly cause permanent damage.
2017-04-30 18:54:39 +09:00
Aaron Muir Hamilton a907b61bd5 Add ICC profile embedding for PNG output. 2017-04-30 18:54:28 +09:00
Aaron Muir Hamilton 2c653a926a Separate ICC profile loading into a separate file.
This cuts out some duplicate code, and enables us to reuse this
  logic for PNG, JPEG, and any other future output format.
  sanei_load_icc_profile also allows us to know that an ICC profile
  file is not long enough before we start to write it to the output;
  this should prevent poorly-written software from overflowing into
  image data when they read the bad profile based on its length.
2017-04-30 18:54:18 +09:00
Aaron Muir Hamilton a0321d2a92 Include physical resolution (pHYs section) in PNG output. 2017-04-27 21:39:29 +09:00
Olaf Meeuwissen 469dc738aa Only swap 16-bit PNG bytes on machines that are not big-endian
The SANE API specifies that image bytes are in machine native order.
2017-04-27 21:17:34 +09:00
Aaron Muir Hamilton 28eb09eec4 Swap bytes in 16-bit PNGs, because PNG is big-endian. 2017-04-27 20:50:18 +09:00
Olaf Meeuwissen 4289693982 Address memory corruption and information leakage.
Addresses CVE-2017-6318, Alioth#315576 and Debian's BTS#854804.
2017-03-20 20:54:08 +09:00
Olaf Meeuwissen 23f052113b saned: fix [-Wunused-parameter] compiler warning
The `__sane_unused__` attribute has been moved from sanei_backend.h to
sanei.h to make it generally useful instead of limited to backends.
2016-09-04 12:50:19 +09:00
Olaf Meeuwissen bfd1626c4b Sync autofoo 2016-07-13 23:44:26 +09:00
Olaf Meeuwissen 2481e1e98b Sync autofoo 2016-07-10 21:54:24 +09:00
Ruslan Nabioullin be7af68357 Fixed scanning status messages. Fixes 313411 2016-07-06 20:39:09 +09:00
Olaf Meeuwissen c962368626 Sync autofoo 2016-07-01 23:45:43 +09:00
Olaf Meeuwissen 418fbb987d Sync autofoo, once again ... 2016-06-30 21:50:33 +09:00
Olaf Meeuwissen 828cd013e9 Compile getopt replacement functions only if needed
This ought to get rid of the last empty compilation unit warnings.  This
merges libfelib.la with liblib.la.  The former was always used together
with the latter.  The latter was only ever used without the former when
linking backends and tools.

Tools might want to use the getopt functions, backends might just want
to use MD5.
2016-06-30 21:38:04 +09:00
Olaf Meeuwissen f03f1f66d4 Sync autofoo files 2016-06-29 22:15:06 +09:00
Olaf Meeuwissen 81f9557966 Clean up .gitignore file content
Removes empty lines and duplicates (note that .gitignore patterns are
recursive unless anchored with a leading /).
2016-06-27 22:40:20 +09:00
Olaf Meeuwissen cb4924f210 Stop distclean from removing files willy-nilly
The distclean target should only remove files that make creates.  If
there are any that need taking care of, they should be added in on a
per file basis in the Makefile.am that creates it.
2016-06-26 10:24:30 +09:00
Olaf Meeuwissen 8274a52eec Sort .gitignore files 2016-06-26 10:24:30 +09:00
Olaf Meeuwissen bdade6bb07 Sync derived files with previous changes 2016-06-26 10:24:29 +09:00
Yurii Kolesnykov 00984cd111 Fix compilation of saned.c under OS X 2016-06-25 10:53:15 +09:00
Olaf Meeuwissen d853463ef1 Sync derived files
This was done with

  AUTOMAKE="automake --add-missing --copy" autoreconf --force

on Debian GNU/Linux 8.5.
2016-06-14 06:30:48 +09:00
Olaf Meeuwissen 87e12bbf2e Sync derived files with autoreconf --force
For the record, this was done on Debian GNU/Linux 8.5.
2016-06-13 22:24:21 +09:00
Olaf Meeuwissen d3d5dc3da0 Update to autoconf-2.69
This gets rid of a number of obsoleted macros and replaces RETSIGTYPE
with a void literal which can be assumed for C89 and later.

This changeset was prepared using autoupdate and modified to get rid of
whitespace and doubled [] changes.  Changes to acinclude.m4 were added
by hand.
2016-06-13 22:05:34 +09:00
Olaf Meeuwissen 2d6fad58b4 Respect GNU Standards user variables
Several variables are considered "user variables" by the GNU Standards.
This means that the user can pass these to their ./configure and make
invocations as they see fit.  These variables include CPPFLAGS, CFLAGS
and LDFLAGS.

This changeset pushes our use of these variables to the automake shadow
variables, AM_CPPFLAGS, AM_CFLAGS and AM_LDFLAGS, so that user variables
will no longer clobber flags required in order to build.
2016-06-13 22:03:14 +09:00
Olaf Meeuwissen 7a2b112d20 Prefer make variables over literal substitutions
The AC_SUBST and PKG_CHECK_MODULE invocations in configure.ac as well as
acinclude.m4 are sufficient to trigger automake to insert initialization
logic for the variables these introduce.  There is no need to do this by
hand.  Wherever these values are needed, it is better to use a variable.
This allows for one-off overrides on the make command-line (without the
need to run ./configure) for one thing.
2016-06-13 21:50:36 +09:00
Olaf Meeuwissen f3471c2ca6 saned: Use system header IPv6 test macros if available
This should fix [-Wstrict-aliasing] compiler warnings on those systems
where the IN6_IS_ADDR_LOOPBACK and IN6_IS_ADDR_V4MAPPED macros exist.
POSIX.1-2001 states that they shall be defined in netinit/in.h so most
systems will probably have them.
2016-01-02 17:50:34 +09:00
Olaf Meeuwissen cadb4b0fff saned: fix [-Wmaybe-uninitialized] compiler warning 2015-12-27 18:41:55 +09:00
Olaf Meeuwissen 18e4c4a086 Revert "Prevent use of uninitialized variable"
This change introduces a variable that shadows the file scope one.

This reverts commit 45e66aee95.
2015-10-13 23:32:40 +09:00
Olaf Meeuwissen 36876a8366 saned: minor improvement of help message wording 2015-10-12 20:55:19 +09:00
Olaf Meeuwissen 32986192bd fix: declaration-after-statement warning 2015-10-12 20:49:55 +09:00
Olaf Meeuwissen 42aa01e4e5 fix: missing-field-initializers warning 2015-10-12 20:49:55 +09:00
Olaf Meeuwissen fa001c2193 Follow getopt_long usage in scanimage.c
This is on the off chance that getopt_long is not in the system's
standard library.
2015-10-12 20:49:07 +09:00
Olaf Meeuwissen 45e66aee95 Prevent use of uninitialized variable 2015-10-12 20:47:43 +09:00
Matteo Croce eab8fd457d saned: add '-b' option to bind to a specific address 2015-10-12 20:25:15 +09:00
Matteo Croce fed2a2cf60 saned: use getopt_long() for option parsing
The help message has been adjusted to match getopt_long conventions.
2015-10-12 20:24:59 +09:00
Matteo Croce 418d1ecea7 saned: move help message to usage() function 2015-10-12 17:11:49 +09:00
Matteo Croce a79cd0abe7 saned: parse inetd args in main()
move argument parsing logic from run_inetd() to main()
2015-10-12 16:52:01 +09:00
Matteo Croce 2c3cb206ce saned: parse standalone args in main()
move argument parsing logic from run_standalone() to main()
2015-10-12 16:52:01 +09:00
m. allan noah 2ecf18f6fb autoheader and automake
After recent PNG and SNMP changes, need to run autoheader and automake
2015-10-02 21:53:14 -04:00
m. allan noah 87bfd53512 Run autofoo for recent changes 2015-09-19 13:39:38 -04:00
Olaf Meeuwissen 4b825b7d87 Fix scanimage pixel bit depth reporting
The bytes_per_line value may include padding bytes which leads to
incorrect results for small values of pixels_per_line.
2015-09-19 13:39:37 -04:00