Wykres commitów

18 Commity (b31b82c8bd99e890835b0ab8f42cbf118481784e)

Autor SHA1 Wiadomość Data
David Ward 1a933bba7e Cast pointer arguments if needed when using "%p" format specifier
Pointer arguments must have type (void *) when printed with the format
specifier "%p".
2022-03-08 19:00:00 -05:00
Olaf Meeuwissen fff83e7eac epson2: Rewrite network I/O
This addresses GHSL-2020-075 as well as all other problematic code
uncovered as a result of investigating that.  This includes:

- buffer overflows due to use of unchecked lengths
- integer overflows due to type conversions
- potential memory leaks
- checking for memory allocation failures

Re #279.
2020-04-30 21:21:30 +09:00
Olaf Meeuwissen 23891a2646 .editorconfig: trim trailing whitespace 2017-05-29 21:14:29 +09:00
Volker Diels-Grabsch baec5e0395 Use consistently __func__ instead of __FUNCTION__
Some parts of SANE used __FUNCTION__ while other parts used __func__.
Now, __func__ is used consistently throughout the SANE sources.  This
fixes all occurrences of the following GCC warning:

warning: ISO C does not support '__FUNCTION__' predefined identifier
2015-12-20 15:27:45 +09:00
Alessandro Zummo 5c713413a0 epson2: added a missing include 2015-10-01 01:26:38 +02:00
Alessandro Zummo b768bb07b6 epson2: fixed another timeout/crash 2014-03-25 14:51:42 +01:00
Alessandro Zummo db31fdd1e3 epson2: fixed timeout and scanner crash on WP-4540 series (and others) 2014-03-13 22:57:17 +01:00
Julien BLACHE 37418beaab epson2: fix signed/unsigned type mismatch 2010-06-23 18:21:35 +02:00
Alessandro Zummo 2d89885211 epson2: fixed network issue 2009-06-18 02:00:30 +02:00
Alessandro Zummo ebb98839d1 epson2: improved error detection in networking code, fixed buffer size
Error checking has been added when receiving the network
header and welcome message. Timeout has been added too and
a wrong buffer size has been corrected.
2009-06-16 17:27:27 +02:00
Alessandro Zummo e73177a177 epson2: allow get_devices to be called multiple times
The probing code has been streamlined and is now more maintenable.
The backend will probe when required and the get_devices hook can
be called multiple times. Transfer buffers are now selected based
on the connection type.
2009-06-10 21:09:05 +02:00
chris@cnpbagwell.com 581b94fb88 Fix sanei_tcp_read(). Revert some getopt logic.
* sanei/sanie_tcp.c, backend/epson2_net.c: Update
sanei_tcp_read() to better simulate old behavior of MSG_WAITALL.
recv() tends to return MTU sized chunks of data without that option.  And at
least cygwin doesn't support MSG_WAITALL.  Re-enable epson2 using that
function for big recieves.
* libgetopt.c, libgetopt1.c:
Revert some logic meant to be used only when we were always compiling
interal getopt() functions.  Fix header filename.
2009-06-09 19:12:43 -05:00
Alessandro Zummo 728e032a5a epson2 reorganization
Some subroutines have been moved from epson2.c to epson2-ops.c and
there's also a temporary fix for the networking code.
This is work in progress but should work.
2009-06-02 01:03:33 +02:00
chris@cnpbagwell.com 4d9e8138af standardize including local sane/ include files.
Source code was inconsistent on how they were referencing
include files in include/sane.  In certain cases, sane/sane.h
and sane/saneopts.h was really including external copies (with
some preprocessor implementations anyways).
2009-05-07 22:06:20 -05:00
Chris Bagwell 8b5df29714 Submit Makefile.in from Makefile.am submitted previously.
Updated backends with EXTRA_* files to allow Makefile's
to always pass in BACKEND_NAME to be fixed to backend name
instead of filename; while still making sure that
SANE_DEBUG_${BACKEND}* exist as documented in man pages.
Add references to epson and epson2 man pages about
SANE_DEBUG_EPSONx_SCSI and _NET options.
Created an epson2 man page; based mostly on epson page.
2009-01-23 03:50:22 +00:00
Mattias Ellert af663bc5e7 Fix format warnings 2008-02-03 10:34:20 +00:00
Alessandro Zummo bf5a1290f7 * epson2: restructured code once more, splitted
in multiple files, added networking
support, added FS G extended handshaking mode,
make proper use of extended commands when possible
* sanei/sanei_tcp.c: read now wait until all
the requested data is available.
2006-12-18 00:13:09 +00:00
Alessandro Zummo 735130b0ff Added missing bits for epson2 driver. 2006-12-02 14:47:21 +00:00