Bug 149777 - array subscript out of range
Summary: array subscript out of range
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: hunt
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Enrico Scholz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-26 14:51 UTC by David Binderman
Modified: 2007-11-30 22:11 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2005-03-03 13:50:21 UTC


Attachments (Terms of Use)

Description David Binderman 2005-02-26 14:51:52 UTC
Description of problem:

I just tried to compile package hunt-1.5-2 from 
Redhat Fedora Extras development tree.

The compiler said

c/hash.c(29): warning #175: subscript out of range

The source code is

            return ht_size[sizeof(ht_size) / sizeof(ht_size[0])];

Suggest avoid reading one beyond the end of the array.  Maybe the
programmer meant

            return ht_size[ (sizeof(ht_size) / sizeof(ht_size[0])) - 1];


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


How reproducible:


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


Expected results:


Additional info:

Comment 1 Enrico Scholz 2005-03-03 13:50:21 UTC
thx, fixed in CVS and will be in next release


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