Bug 116154 - four obvious problems
Summary: four obvious problems
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: sane-backends (Show other bugs)
(Show other bugs)
Version: 1
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-02-18 17:18 UTC by d.binderman
Modified: 2007-11-30 22:10 UTC (History)
0 users

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


Attachments (Terms of Use)

Description d.binderman 2004-02-18 17:18:59 UTC
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 17:27:52 UTC
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.