[#7708] Bug in libsnmp-ruby1.8 — Hadmut Danisch <hadmut@...>

Hi,

8 messages 2006/04/11
[#7709] Re: Bug in libsnmp-ruby1.8 — Eric Hodel <drbrain@...7.net> 2006/04/11

On Apr 11, 2006, at 6:23 AM, Hadmut Danisch wrote:

[#7770] Re: possible defect in array.c — "Brown, Warren" <warrenbrown@...>

> rb_range_beg_len (in range.c) does set beg and len.

13 messages 2006/04/26
[#7771] Re: possible defect in array.c — "Pat Eyler" <rubypate@...> 2006/04/26

On 4/26/06, Brown, Warren <warrenbrown@aquire.com> wrote:

Re: possible defect in array.c

From: "Pat Eyler" <rubypate@...>
Date: 2006-04-26 15:27:43 UTC
List: ruby-core #7771
On 4/26/06, Brown, Warren <warrenbrown@aquire.com> wrote:
> > rb_range_beg_len (in range.c) does set beg and len.
> > I'm hoping the other edge cases (argc <1 or >3) are
> > covered too.
>
>     Instead of marking this as a false positive due to assumptions about
> what is happening outside of this function, why not just initialize
> "beg" to 0 and not make *any* assumptions?  Seems like a much better
> solution to me.

good idea:

*** array.c     12 Dec 2005 16:46:59 -0000      1.186
--- array.c     26 Apr 2006 15:27:05 -0000
***************
*** 2100,2105 ****
--- 2100,2106 ----
  {
      VALUE item, arg1, arg2;
      long beg, end, len;
+     beg = 0;
      VALUE *p, *pend;
      int block_p = Qfalse;




>
>     - Warren Brown
>
>
>


In This Thread