Fixes CVE-2017-6318 Patches where refreshed and the following removed: - 020-fix_pieusb.patch: fixed upstream - 030-musl.patch: accepted upstream PS: there was no sane-backends 1.0.26 Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>lilik-openwrt-22.03
@ -1,16 +0,0 @@ | |||||
--- a/backend/pieusb_buffer.c | |||||
+++ b/backend/pieusb_buffer.c | |||||
@@ -104,11 +104,13 @@ | |||||
/* When creating the release backend, make complains about unresolved external | |||||
* le16toh, although it finds the include <endian.h> */ | |||||
+#ifndef le16toh | |||||
#if __BYTE_ORDER == __LITTLE_ENDIAN | |||||
#define le16toh(x) (x) | |||||
#else | |||||
#define le16toh(x) __bswap_16 (x) | |||||
#endif | |||||
+#endif | |||||
static void buffer_update_read_index(struct Pieusb_Read_Buffer* buffer, int increment); | |||||
@ -1,73 +0,0 @@ | |||||
--- a/include/sane/sanei_udp.h | |||||
+++ b/include/sane/sanei_udp.h | |||||
@@ -27,6 +27,9 @@ | |||||
#include <netinet/in.h> | |||||
#include <netdb.h> | |||||
#endif | |||||
+#ifdef HAVE_SYS_TYPES_H | |||||
+#include <sys/types.h> | |||||
+#endif | |||||
extern SANE_Status sanei_udp_open(const char *host, int port, int *fdp); | |||||
extern SANE_Status sanei_udp_open_broadcast(int *fdp); | |||||
--- a/backend/kvs20xx_cmd.h | |||||
+++ b/backend/kvs20xx_cmd.h | |||||
@@ -9,6 +9,10 @@ | |||||
Panasonic KV-S20xx USB-SCSI scanners. | |||||
*/ | |||||
+#ifdef HAVE_SYS_TYPES_H | |||||
+#include <sys/types.h> | |||||
+#endif | |||||
+ | |||||
#define COMMAND_BLOCK 1 | |||||
#define DATA_BLOCK 2 | |||||
#define RESPONSE_BLOCK 3 | |||||
--- a/backend/kvs40xx.h | |||||
+++ b/backend/kvs40xx.h | |||||
@@ -10,6 +10,9 @@ | |||||
#include "../include/sane/config.h" | |||||
#include <semaphore.h> | |||||
+#ifdef HAVE_SYS_TYPES_H | |||||
+#include <sys/types.h> | |||||
+#endif | |||||
#undef BACKEND_NAME | |||||
#define BACKEND_NAME kvs40xx | |||||
--- a/backend/hp5400.c | |||||
+++ b/backend/hp5400.c | |||||
@@ -67,6 +67,9 @@ | |||||
#include <stdlib.h> /* malloc, free */ | |||||
#include <string.h> /* memcpy */ | |||||
#include <stdio.h> | |||||
+#ifdef HAVE_SYS_TYPES_H | |||||
+#include <sys/types.h> | |||||
+#endif | |||||
#define HP5400_CONFIG_FILE "hp5400.conf" | |||||
--- a/backend/hp5590.c | |||||
+++ b/backend/hp5590.c | |||||
@@ -48,6 +48,9 @@ | |||||
#include <stdio.h> | |||||
#include <string.h> | |||||
#include <unistd.h> | |||||
+#ifdef HAVE_SYS_TYPES_H | |||||
+#include <sys/types.h> | |||||
+#endif | |||||
#include "../include/sane/sane.h" | |||||
#define BACKEND_NAME hp5590 | |||||
--- a/backend/epsonds-io.c | |||||
+++ b/backend/epsonds-io.c | |||||
@@ -16,6 +16,9 @@ | |||||
#include "sane/config.h" | |||||
#include <ctype.h> | |||||
#include <unistd.h> /* sleep */ | |||||
+#ifdef HAVE_SYS_TYPES_H | |||||
+#include <sys/types.h> | |||||
+#endif | |||||
#include "epsonds.h" | |||||
#include "epsonds-io.h" |
@ -1,11 +1,22 @@ | |||||
--- a/backend/Makefile.am | --- a/backend/Makefile.am | ||||
+++ b/backend/Makefile.am | +++ b/backend/Makefile.am | ||||
@@ -1142,7 +1142,7 @@ EXTRA_DIST += dll.aliases | |||||
@@ -1122,7 +1122,7 @@ EXTRA_DIST += dll.aliases | |||||
nodist_libsane_la_SOURCES = dll-s.c | nodist_libsane_la_SOURCES = dll-s.c | ||||
libsane_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=dll | libsane_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=dll | ||||
libsane_la_LDFLAGS = $(DIST_LIBS_LDFLAGS) | libsane_la_LDFLAGS = $(DIST_LIBS_LDFLAGS) | ||||
-libsane_la_LIBADD = $(COMMON_LIBS) @PRELOADABLE_BACKENDS_ENABLED@ libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(DL_LIBS) $(LIBV4L_LIBS) $(MATH_LIB) $(IEEE1284_LIBS) $(TIFF_LIBS) $(JPEG_LIBS) $(GPHOTO2_LIBS) $(SOCKET_LIBS) $(USB_LIBS) $(AVAHI_LIBS) $(SCSI_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS) | |||||
+libsane_la_LIBADD = $(COMMON_LIBS) @PRELOADABLE_BACKENDS_ENABLED@ libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(DL_LIBS) $(MATH_LIB) $(IEEE1284_LIBS) $(SOCKET_LIBS) $(USB_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS) | |||||
-libsane_la_LIBADD = $(COMMON_LIBS) $(PRELOADABLE_BACKENDS_ENABLED) libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(DL_LIBS) $(LIBV4L_LIBS) $(MATH_LIB) $(IEEE1284_LIBS) $(TIFF_LIBS) $(JPEG_LIBS) $(GPHOTO2_LIBS) $(SOCKET_LIBS) $(USB_LIBS) $(AVAHI_LIBS) $(SCSI_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS) | |||||
+libsane_la_LIBADD = $(COMMON_LIBS) $(PRELOADABLE_BACKENDS_ENABLED) libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(DL_LIBS) $(MATH_LIB) $(IEEE1284_LIBS) $(SOCKET_LIBS) $(USB_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS) | |||||
# WARNING: Automake is getting this wrong so have to do it ourselves. | # WARNING: Automake is getting this wrong so have to do it ourselves. | ||||
libsane_la_DEPENDENCIES = $(COMMON_LIBS) @PRELOADABLE_BACKENDS_ENABLED@ libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo @SANEI_SANEI_JPEG_LO@ | |||||
libsane_la_DEPENDENCIES = $(COMMON_LIBS) $(PRELOADABLE_BACKENDS_ENABLED) libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(SANEI_SANEI_JPEG_LO) | |||||
--- a/backend/Makefile.in | |||||
+++ b/backend/Makefile.in | |||||
@@ -2757,7 +2757,7 @@ libsane_dll_la_LIBADD = $(COMMON_LIBS) l | |||||
nodist_libsane_la_SOURCES = dll-s.c | |||||
libsane_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=dll | |||||
libsane_la_LDFLAGS = $(DIST_LIBS_LDFLAGS) | |||||
-libsane_la_LIBADD = $(COMMON_LIBS) $(PRELOADABLE_BACKENDS_ENABLED) libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(DL_LIBS) $(LIBV4L_LIBS) $(MATH_LIB) $(IEEE1284_LIBS) $(TIFF_LIBS) $(JPEG_LIBS) $(GPHOTO2_LIBS) $(SOCKET_LIBS) $(USB_LIBS) $(AVAHI_LIBS) $(SCSI_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS) | |||||
+libsane_la_LIBADD = $(COMMON_LIBS) $(PRELOADABLE_BACKENDS_ENABLED) libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(DL_LIBS) $(MATH_LIB) $(IEEE1284_LIBS) $(SOCKET_LIBS) $(USB_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS) | |||||
# WARNING: Automake is getting this wrong so have to do it ourselves. | |||||
libsane_la_DEPENDENCIES = $(COMMON_LIBS) $(PRELOADABLE_BACKENDS_ENABLED) libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(SANEI_SANEI_JPEG_LO) |