diff --git a/ChangeLog b/ChangeLog index 3f393d959..27f83a7e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-09-01 Julien Blache + * frontend/saned.c: auth_callback(): arrays are passed as + pointers, declaring parameters as arrays of fixed size is + useless. memset() the correct length, not sizeof(pointer). + Caught while testing splint on the SANE sources. + 2004-08-30 Gerhard Jaeger * doc/descriptions/unsupported.desc: Added Canon LiDE35. diff --git a/frontend/saned.c b/frontend/saned.c index d65bb145d..3659b3fec 100644 --- a/frontend/saned.c +++ b/frontend/saned.c @@ -262,15 +262,15 @@ reset_watchdog (void) static void auth_callback (SANE_String_Const res, - SANE_Char username[SANE_MAX_USERNAME_LEN], - SANE_Char password[SANE_MAX_PASSWORD_LEN]) + SANE_Char *username, + SANE_Char *password) { SANE_Net_Procedure_Number procnum; SANE_Authorization_Req req; SANE_Word word, ack = 0; - memset (username, 0, sizeof (username)); - memset (password, 0, sizeof (password)); + memset (username, 0, SANE_MAX_USERNAME_LEN); + memset (password, 0, SANE_MAX_PASSWORD_LEN); if (!can_authorize) {