[sane-devel] Possible Fujitsu Driver Bug

Chris Chesney cchesney at go-integral.com
Wed Oct 15 21:52:03 BST 2003


Hello,

 

First off, I am new to this list (I just subscribed today), but have
done a few searches without finding anything related to my problem.

I have a Fujitsu 3091 scanner attached via SCSI to a RedHat 9 Compaq
Laptop.  I'm running version 1.0.12 of sane-backends.  We're creating a
custom application in Java using the japi wrapper code provided with
Sane.  The problem is that I was getting "5/38/0: Invalid field in parm
list" because of garbage in the fujitsu structure.  I tracked it down to
a problem in backend/fujitsu.c where the structure wasn't being
initialized after being allocated.  In the attachScanner function, I
added the 2 memset lines after these two sections of code.  This seemed
to fix the problem.  Let me know if you need more information.

 

  if (NULL == (dev = malloc (sizeof (*dev))))

    return SANE_STATUS_NO_MEM;

  memset(dev,'\0',sizeof(*dev));

 

**

  if ((dev->buffer = malloc (dev->scsi_buf_size)) == NULL)

    return SANE_STATUS_NO_MEM;

  memset(dev->buffer,'\0',sizeof(dev->scsi_buf_size));

 

 

As a side note, I've modified the japi wrapper code to be part of a
package so it can be used by other java packages and would be willing to
contribute that as well if you are interested.

 

Best regards,

 

Chris

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20031015/a25fc3de/attachment.htm>


More information about the sane-devel mailing list