[haiku-bugs] Re: [Haiku] #11748: CID 20155: Negative array index read

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Tue, 13 Jan 2015 07:40:19 -0000

#11748: CID 20155: Negative array index read
-------------------------+----------------------------
   Reporter:  sli908     |      Owner:  nobody
       Type:  bug        |     Status:  new
   Priority:  normal     |  Milestone:  R1
  Component:  - General  |    Version:  R1/Development
 Resolution:             |   Keywords:  gci2014
 Blocked By:             |   Blocking:
Has a Patch:  1          |   Platform:  All
-------------------------+----------------------------

Comment (by pulkomandy):

 This fix is wrong. cnt can't be negative (it is initialized to 0 and then
 incremented only). Apparently the useless condition in the return
 statement confuses coverity, and this statement should be fixed.

 Since this code is actually from gawk/libintl, it would be easier to look
 at a current version of that and see if the code was already fixed there.

--
Ticket URL: <https://dev.haiku-os.org/ticket/11748#comment:2>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: