Bug 145804

Summary: openct-0.6.6-2:2 * array subscript out of range
Product: [openSUSE] SUSE LINUX 10.0 Reporter: David Binderman <dcb314>
Component: BasesystemAssignee: Marian Jancar <mjancar>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P5 - None    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: SUSE Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2006-01-26 12:13:07 UTC
I just tried to compile package openct-0.6.6-2 with the Intel C compiler.

It said

1.

ifd-pertosmart1030.c(800): warning #175: subscript out of range

The source code is

    ct_debug("ps_receive_from_ifd: protocol_bytes[PS_RESPONSE_LENGTH2_IDX]: %i",
             protocol_bytes[PS_RESPONSE_LENGTH2_IDX]);

but

	  unsigned char           protocol_bytes[5];

and

#define PS_RESPONSE_LENGTH2_IDX 5

Suggest make local array one bigger.

2.

ifd-pertosmart1030.c(803): warning #175: subscript out of range

The source code is

    data_length |= protocol_bytes[PS_RESPONSE_LENGTH2_IDX];

Duplicate.
Comment 1 Marian Jancar 2006-02-06 19:36:46 UTC
fixed
Comment 2 Marian Jancar 2006-02-06 20:23:05 UTC
fixed