Package: libsane Version: 1.0.20-7 Severity: normal Hi,
it seems like there's a missing error check in genesys.c when SANE_DEBUG_LOG_RAW_DATA is enabled. The attached patch fixes it for me. -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (500, 'testing'), (50, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores) Locale: LANG=nb_NO.UTF-8, LC_CTYPE=nb_NO.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages libsane depends on: ii adduser 3.110 add and remove users and groups ii libavahi-client3 0.6.25-1 Avahi client library ii libavahi-common3 0.6.25-1 Avahi common library ii libc6 2.9-25 GNU C Library: Shared libraries ii libexif12 0.6.17-1 library to parse EXIF files ii libgphoto2-2 2.4.6-1 gphoto2 digital camera library ii libgphoto2-port0 2.4.6-1 gphoto2 digital camera port librar ii libieee1284-3 0.2.11-5 cross-platform library for paralle ii libjpeg62 6b-15 The Independent JPEG Group's JPEG ii libsane-extras 1.0.20.2 API library for scanners -- extra ii libtiff4 3.9.1-1 Tag Image File Format (TIFF) libra ii libusb-0.1-4 2:0.1.12-13 userspace USB programming library ii libv4l-0 0.6.1-1 Collection of video4linux support ii makedev 2.3.1-89 creates device files in /dev ii udev 141-1.2 rule-based device node and kernel Versions of packages libsane recommends: ii sane-utils 1.0.20-7 API library for scanners -- utilit Versions of packages libsane suggests: ii avahi-daemon 0.6.25-1 Avahi mDNS/DNS-SD daemon ii hplip 3.9.4b-1 HP Linux Printing and Imaging Syst pn hpoj <none> (no description available) -- no debconf information -- Tollef Fog Heen UNIX is user friendly, it's just picky about who its friends are
--- sane-backends-1.0.20.orig/backend/genesys.c +++ sane-backends-1.0.20/backend/genesys.c @@ -4246,8 +4246,11 @@ "genesys_read_ordered_data: nothing more to scan: EOF\n"); *len = 0; #ifdef SANE_DEBUG_LOG_RAW_DATA - fclose (rawfile); - rawfile = NULL; + if (rawfile != NULL) + { + fclose (rawfile); + rawfile = NULL; + } #endif return SANE_STATUS_EOF; }