sanei_read_config has already cleaned string, fix bug #310597

merge-requests/1/head
m. allan noah 2008-02-14 16:37:45 +00:00
rodzic 91644b76b9
commit db29ded1d1
4 zmienionych plików z 25 dodań i 32 usunięć

Wyświetl plik

@ -1,3 +1,7 @@
2008-02-14 m. allan noah <kitno455 a t gmail d o t com>
* backend/cardscan.c, backend/epjitsu.c, backend/fujitsu.c:
sanei_read_config has already cleaned string, fix bug #310597
2008-02-13 Pierre Willenbrock <pierre@pirsoft.dnsalias.org>
Patch by Stefan Lucke <stefan@lucke.in-berlin.de>
* backend/genesys_gl841.c: Fixes 3 possibilities for infinite
@ -12,7 +16,7 @@
2008-02-10 m. allan noah <kitno455 a t gmail d o t com>
* configure configure.in: Changed version to 1.0.19-cvs. Enabled
* configure, configure.in: Changed version to 1.0.19-cvs. Enabled
compilation warnings.
* Makefile.in: Added ChangeLog-1.0.19 to DISTFILES.

Wyświetl plik

@ -53,8 +53,10 @@
Section 6 - misc functions
Changes:
V 1.0.0, 2007-05-09, MAN
V 1.0.0, 2007-05-09, MAN (SANE v1.0.19)
- initial release
V 1.0.1, 2008-02-14, MAN
- sanei_config_read has already cleaned string (#310597)
##################################################
DATA FROM TRACE OF WINDOWS DRIVER:
@ -320,7 +322,6 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
struct scanner *dev;
char line[PATH_MAX];
const char *lp;
size_t len;
FILE *fp;
int num_devices=0;
int i=0;
@ -337,17 +338,12 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
while (sanei_config_read (line, PATH_MAX, fp)) {
lp = line;
/* ignore comments */
if (line[0] == '#')
if (*lp == '#')
continue;
/* delete newline characters at end */
len = strlen (line);
if (line[len - 1] == '\n')
line[--len] = '\0';
lp = sanei_config_skip_whitespace (line);
/* skip empty lines */
if (*lp == 0)
continue;

Wyświetl plik

@ -90,8 +90,11 @@
- fi-60F 300 & 600 dpi support (150 is non-square?)
- fi-60F gray & binary support
- fi-60F improved calibration
V 1.0.10, 2007-12-19, MAN
V 1.0.10, 2007-12-19, MAN (SANE v1.0.19)
- fix missing function (and memory leak)
V 1.0.11 2008-02-14, MAN
- sanei_config_read has already cleaned string (#310597)
SANE FLOW DIAGRAM
@ -151,7 +154,7 @@
#include "epjitsu-cmd.h"
#define DEBUG 1
#define BUILD 10
#define BUILD 11
unsigned char global_firmware_filename[PATH_MAX];
@ -210,7 +213,6 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
struct scanner *dev;
char line[PATH_MAX];
const char *lp;
size_t len;
authorize = authorize; /* get rid of compiler warning */
@ -233,17 +235,12 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
while (sanei_config_read (line, PATH_MAX, fp)) {
lp = line;
/* ignore comments */
if (line[0] == '#')
if (*lp == '#')
continue;
/* delete newline characters at end */
len = strlen (line);
if (line[len - 1] == '\n')
line[--len] = '\0';
lp = sanei_config_skip_whitespace (line);
/* skip empty lines */
if (*lp == 0)
continue;

Wyświetl plik

@ -274,6 +274,8 @@
- disable SANE_FRAME_JPEG support until SANE 1.1.0
V 1.0.55 2007-12-29, MAN (SANE v1.0.19)
- add S500M usb id
V 1.0.56 2008-02-14, MAN
- sanei_config_read has already cleaned string (#310597)
SANE FLOW DIAGRAM
@ -334,7 +336,7 @@
#include "fujitsu.h"
#define DEBUG 1
#define BUILD 55
#define BUILD 56
/* values for SANE_DEBUG_FUJITSU env var:
- errors 5
@ -480,7 +482,6 @@ find_scanners ()
struct fujitsu *dev;
char line[PATH_MAX];
const char *lp;
size_t len;
FILE *fp;
int num_devices=0;
int i=0;
@ -498,17 +499,12 @@ find_scanners ()
while (sanei_config_read (line, PATH_MAX, fp)) {
lp = line;
/* ignore comments */
if (line[0] == '#')
if (*lp == '#')
continue;
/* delete newline characters at end */
len = strlen (line);
if (line[len - 1] == '\n')
line[--len] = '\0';
lp = sanei_config_skip_whitespace (line);
/* skip empty lines */
if (*lp == 0)
continue;