Wykres commitów

291 Commity (15819a7d12eef1e10921b0f4b1f1d10746786bcb)

Autor SHA1 Wiadomość Data
Povilas Kanapickas 9472dce5f7 scanimage: Fix 32-bit overflow when calculating total bytes to transfer 2019-11-10 13:27:53 +02:00
Olaf Meeuwissen 5cba3bd465 saned: Fix misleading log messages caused by fall through 2019-08-11 10:37:10 +09:00
Olaf Meeuwissen e42e3bc849 scanimage: Fix misleading fall through annotation
The `scanimage_exit()` call exits the program.
2019-08-11 10:23:29 +09:00
Povilas Kanapickas e40596c2a5 Fix -Wimplicit-fallthrough warnings by adding standard annotations 2019-06-30 11:58:32 +03:00
Olaf Meeuwissen 7af0d47e29 Keep warning out of redirected image data. Fixes testsuite 2019-06-30 12:45:03 +09:00
Povilas Kanapickas 1c3e1aa184 autotools: Remove files generated by autotools from version control 2019-06-01 14:38:36 +03:00
Olaf Meeuwissen be9736020f autofoo: Sync generated files
The AX_CXX_COMPILE_STDCXX* macros that were embedded in aclocal.m4
have been replaced with the versions found in the autoconf-archive
package from Debian 9.
2019-05-21 22:14:46 +09:00
Olaf Meeuwissen 2bb5ed655a Merge branch 'genesys-enable-cxx' into 'master'
Use C++ for the genesys backend

See merge request sane-project/backends!61
2019-05-20 09:10:53 +00:00
Povilas Kanapickas 728de89d71 scanimage: Guess --format from --output-file if possible 2019-05-11 11:45:27 +03:00
Povilas Kanapickas 86e917b04b scanimage: Prevent --output-file and --batch to be used together 2019-05-11 11:45:27 +03:00
Povilas Kanapickas 7f4944f0a7 scanimage: Warn when output format is not set 2019-05-11 11:45:27 +03:00
Povilas Kanapickas 877cc29d88 scanimage: Raise an error if --format option is an unknown format 2019-05-11 11:45:27 +03:00
Povilas Kanapickas 9e3b5d6381 Update generated files 2019-05-11 00:03:26 +03:00
Povilas Kanapickas 5dbd51d1ec scanimage: Allow specification of the output path via option 2019-04-28 23:27:59 +03:00
Povilas Kanapickas 2653cbaec7 Run autoreconf and automake 2019-03-20 23:09:07 +02:00
Olaf Meeuwissen a78969384b autotools: Sync derived files
This was done by running

  libtoolize --copy
  autoreconf --force --install

on Debian GNU/Linux 9.3.
2018-03-17 10:35:57 +09:00
Olaf Meeuwissen f9a76395da saned: Fix typo in help message 2017-09-29 21:48:14 +09:00
Luiz Angelo Daros de Luca 5288dd5f61 saned: reorganize flags, remove run_mode SANED_RUN_DEBUG
Flags like -a, -d and -s have many overlap effects. This patch restricts
the effect of flags to a simple action.

New -u (user) flag replaces -a optional argument for running saned as a different user.
The code that retrieve the user info and drop privileges migrated to runas_user().
As a side effect, PID file can be created even if getting user info fails.

New -l (listen) flag sets run_mode to standalone.
New -D (daemonize) flag daemonizes saned after bind.
New -o (once) make saned exit after the first client disconnects.
Flag -s (syslog) is gone. Previous behavior can be reproduced with '-a -d level -o -f'.
New -e (stderr) flag for redirecting output to stderr, instead of syslog.

Flag -d (debug) now only sets the debug level and argument is required. Previous behavior
can be reproduced with '-a -d level -o -f -e'.

The run_mode SANED_RUN_DEBUG and SANED_RUN_ALONE shared most of its code
path. With the new flags dealing with their difference, SANED_RUN_DEBUG is gone.

Flag '-a' still works as before but it can be replaced by '-l -D -u user'.

Current uses of -d (debug) or -s (syslog) will break.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2017-09-29 20:43:36 +09:00
Farid Benamrouche 1f68d8d8c4 saned: Cancel scan if data connection appears to have gone away
The data connection timeout default to 4000ms but is configurable
in saned.conf.

See Alioth 315765
2017-09-07 22:37:31 +09:00
Luiz Angelo Daros de Luca fc57a5a6a5 saned: fix --debug help message (output is stderr)
Man page was correct.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2017-07-29 17:54:01 +09:00
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