Bug 149817 - array subscript out of range
Summary: array subscript out of range
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: kile
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-27 19:52 UTC by David Binderman
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-06-22 16:51:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Binderman 2005-02-27 19:52:54 UTC
Description of problem:

I just tried to compile package kile-1.7.1-3 from 
Redhat Fedora Extras development tree.

The compiler said

kilestructurewidget.cpp(83): warning #175: subscript out of range

The source code is

               
m_current=m_child=m_lastChild=m_parent[0]=m_parent[1]=m_parent[2]=m_parent[3]=m_parent[4]=m_parent[5]=m_parent[7]=m_root;

but

../BUILD/kile-1.7.1/kile/kilestructurewidget.h:        
KileListViewItem       *m_parent[7], *m_current, *m_root, *m_child,
*m_lastChild;

So m_parent[7] is the array index in error.  Suggest avoid indexing one
beyond the end of the array.

I'm not sure what the fix is for this. Maybe increasing the size of the
array would help.


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


How reproducible:


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


Expected results:


Additional info:

Comment 1 Rex Dieter 2005-06-22 16:51:45 UTC
Hopefully kile-1.8.1 will help here.

Comment 2 David Binderman 2005-06-23 09:24:23 UTC
>Hopefully 

It might be a wise idea to promote a hope into reality,
and check that the latest version has this bug fixed.


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