From 38087da06a1aac013c4134ef8132e43afcf27705 Mon Sep 17 00:00:00 2001 From: Henning Geinitz Date: Thu, 6 Oct 2005 19:11:09 +0000 Subject: [PATCH] Use correct size for fgets. Patch from Antoine Jacoutot . --- ChangeLog | 6 ++++++ frontend/scanimage.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index eb4a9f289..43a917994 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-10-06 Henning Meier-Geinitz + + * doc/descriptions/unsupported.desc: Added HP ScanJet 3800c. + * frontend/scanimage.c: Use correct size for fgets. Patch from + Antoine Jacoutot . + 2005-10-05 Mattias Ellert * backend/microtek2.c: Off-by-one error diff --git a/frontend/scanimage.c b/frontend/scanimage.c index a22667bb0..6eb7a908f 100644 --- a/frontend/scanimage.c +++ b/frontend/scanimage.c @@ -178,7 +178,7 @@ auth_callback (SANE_String_Const resource, else len = strlen (resource); - while (fgets (tmp, 512, pass_file)) + while (fgets (tmp, sizeof(tmp), pass_file)) { if ((strlen (tmp) > 0) && (tmp[strlen (tmp) - 1] == '\n'))