Bug 121718 - array subscript out of range
Summary: array subscript out of range
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: kdeedu   
(Show other bugs)
Version: rawhide
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Ngo Than
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-04-26 19:11 UTC by d.binderman
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-15 18:07:06 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-04-26 19:11:07 UTC
Description of problem:

I just tried to compile Core2 Test2 package kdeedu-3.2.1-1

The compiler said

celestrongps.cpp(470): warning #175: subscript out of range

The source code is

           if (lastMove[NORTH] && lastMove[SOUTH])

But

[root@localhost SPECS]# find ../BUILD/kdeedu-3.2.1/ -name \*.h -print
| xargs egrep "NORTH|SOUTH|lastMove"
../BUILD/kdeedu-3.2.1/kstars/kstars/indi/celestrongps.h:  int lastMove[4];
../BUILD/kdeedu-3.2.1/kstars/kstars/indi/lx200generic.h:  int lastMove[4];
../BUILD/kdeedu-3.2.1/kstars/kstars/indi/celestronprotocol.h:#define 
  NORTH 
0../BUILD/kdeedu-3.2.1/kstars/kstars/indi/celestronprotocol.h:#define
   SOUTH 
4../BUILD/kdeedu-3.2.1/kstars/kstars/indi/celestronprotocol.h:#define
   NORTH 
4../BUILD/kdeedu-3.2.1/kstars/kstars/indi/celestronprotocol.h:#define
   SOUTH  0

Clearly broken code. Suggest re-work to avoid reading non existent data.


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


How reproducible:


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


Expected results:


Additional info:

Comment 1 Alan Cox 2004-05-02 23:20:58 UTC
It is probably best to report this upstream at bugs.kde.org and add
the bug ID here. This looks like a general bug rather than a Red Hat
specific one so other vendors (and the authors) would benefit from knowing

Thanks for the bug report


Comment 2 Marcin Garski 2004-10-15 18:07:06 UTC
I've reported this bug in KDE bugzilla:
http://bugs.kde.org/show_bug.cgi?id=91406

If you want to follow what happens to the bug, you can add yourself to
the upstream report.

Comment 3 Marcin Garski 2004-10-20 12:12:51 UTC
This bug has been fixed in KDE CVS.


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