Bug 132053

Summary: gpm-1.20.1-309: array subscript out of range
Product: [openSUSE] SUSE LINUX 10.0 Reporter: David Binderman <dcb314>
Component: ConsoleAppsAssignee: Michal Marek <mmarek>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: All   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2005-11-02 19:20:43 UTC
I just tried to compile package gpm-1.20.1-309 with the Intel C compiler 

It said

mice.c(2278): warning #175: subscript out of range

The source code is

	if (gunze_calib[1] == gunze_calib[4]) calibok = 0;

but

static int gunze_calib[4]; /* x0,y0 x1,y1 (measured at 1/8 and 7/8) */

so gunze_calib[4] doesn't exist. Suggest code rework.

BTW, the author email account [ nico-gpm@schottelius.org ] seems to be dead.
Comment 1 Michal Marek 2005-11-03 13:22:55 UTC
(In reply to comment #0)
> The source code is
> 
>         if (gunze_calib[1] == gunze_calib[4]) calibok = 0;

Looks like the author ment gunze_calib[3] here. Thanks for the report.


> BTW, the author email account [ nico-gpm@schottelius.org ] seems to be dead.

gpm hasn't been touched for several years...