Bug 239491

Summary: rasmol-2.7.3.1-39: array subscript is above array bounds
Product: [openSUSE] openSUSE 10.3 Reporter: David Binderman <dcb314>
Component: OtherAssignee: Ladislav Michnovic <lmichnovic>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
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 2007-01-26 21:10:41 UTC
I just tried to compile package rasmol-2.7.3.1-39
with the new GNU compiler version 4.3 snapshot 20070119

The compiler said

transfor.c:1599: warning: array subscript is above array bounds

The source code is

    {   ScaleRef[i].r = 0;

But i has the value LastShade and

linux:/usr/src/packages/SPECS # find ../BUILD/RasMol_2.7.3/ -name \*.h -print | xargs fgrep ScaleRef../BUILD/RasMol_2.7.3/src/transfor.h:ShadeRef ScaleRef[LastShade];
../BUILD/RasMol_2.7.3/src/transfor.h:extern ShadeRef ScaleRef[LastShade];
linux:/usr/src/packages/SPECS #


Suggest code rework.
Comment 1 Ladislav Michnovic 2007-01-29 09:06:44 UTC
I'll take a look. Thank you for reporting.
Comment 2 Stefan Dirsch 2007-01-31 22:40:47 UTC
Feel free to close as duplicate of Bug #240922.
Comment 3 Ladislav Michnovic 2007-02-01 10:02:45 UTC
The problem in rasmol is fixed for stable and reported to upstream. 
Closing as duplicate.

*** This bug has been marked as a duplicate of bug 240922 ***