From b95d698f3350212adbe8b764b33cb50f186273ad Mon Sep 17 00:00:00 2001 From: Nicolas Martin Date: Sat, 3 Jul 2010 21:27:44 +0200 Subject: [PATCH] pixma: fix end of line crop buffer size for better efficiency. modified: ChangeLog modified: backend/pixma.c --- ChangeLog | 5 +++++ backend/pixma.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ca5b1ffa4..41e7f7242 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-07-03 Nicolas Martin + * doc/descriptions/pixma.desc, backend/pixma.c + pixma: fix ImageClass MF6550 description. + fix end of line crop buffer size. + 2010-07-02 Nicolas Martin * doc/descriptions/pixma.desc, doc/sane-pixma.man: pixma: update doc to include ImageClass MF6550 support. diff --git a/backend/pixma.c b/backend/pixma.c index f07d4d45f..f3b993df8 100644 --- a/backend/pixma.c +++ b/backend/pixma.c @@ -1301,7 +1301,10 @@ sane_read (SANE_Handle h, SANE_Byte * buf, SANE_Int maxlen, SANE_Int * len) { DECL_CTX; int sum, n; - SANE_Byte temp[60]; + /* Due to 32 pixels alignment, sizeof(temp) is to be greater than: + * max(nchannels) * max (sp.line_size - output_line_size) + * so currently: 3 * 32 = 96 for better end line cropping efficiency */ + SANE_Byte temp[100]; SANE_Status status; if (len)