Bug 116154 - four obvious problems
four obvious problems
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: sane-backends (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-02-18 12:18 EST by d.binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-18 12:27:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2004-02-18 12:18:59 EST
Description of problem:

I just tried to compile package sane-backends-1.0.12-4 from Fedora.

The compiler said

1.

canon-sane.c:1922: warning: operation on `p' may be undefined

The source code is

          *p++ = *(p + 1);

Clearly broken code. Suggest

          *p = *(p + 1);
          ++p;

2.

avision.c(1851): warning #175: subscript out of range
avision.c(1852): warning #175: subscript out of range

The source code is

  DBG (3, "get_accessories_info: [2] Bitfield1:%s%s\n",
       BIT(result[39],0)?" Origami ADF":"",
       BIT(result[39],1)?" Oodles ADF":"");

but

  u_int8_t result[8];

I'm not sure what the fix is for this.

3.

canon-sane.c(2082): remark #592: variable "nread" is used before its
value is set

The source code is

  DBG (21, "   read_fb1200: nread=%d, bytes_to_read=%d\n", nread,
       s->bytes_to_read);

Suggest init nread before first use.

4.

teco2.c(1256): remark #592: variable "size" is used before its value
is set

The source code is

  size_t size;


  MKSCSI_REQUEST_SENSE (cdb, size);

Suggest init size before first use.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Tim Waugh 2004-02-18 12:27:52 EST
Since several issues like this have already been addressed, please try
the current package from Fedora development.

Note You need to log in before you can comment on or make changes to this bug.