[erlang-bugs] [erlang-patches] Bug in snmp_generic

Serge Aleynikov saleyn@REDACTED
Tue Dec 2 13:23:00 CET 2008


The following patch addresses an initialization error in snmp_generic
that can be reproduced by calling:

snmp_generic:is_any_noinit( {noinit,2,noinit}, [{1,dummy},{3,dummy}]).

	Expected: false
	Result:   true

Serge

--- lib/snmp/src/agent/snmp_generic.erl.orig	2008-10-13
09:57:02.000000000 -0500
+++ lib/snmp/src/agent/snmp_generic.erl	2008-12-01 16:30:33.000000000 -0600
@@ -447,7 +447,7 @@
   is_any_noinit(Row, Cols) ->
       is_any_noinit(tuple_to_list(Row), Cols, 1).
   is_any_noinit([noinit | Vals], [{N, _Value} | Cols], N) ->
-    is_any_noinit(Vals, Cols, N);
+    is_any_noinit(Vals, Cols, N+1);
   is_any_noinit([noinit | _Vals], _Cols, _N) ->
       true;
   is_any_noinit([_ | Vals], [{N, _Value} | Cols], N) ->


_______________________________________________
erlang-patches mailing list
erlang-patches@REDACTED
http://www.erlang.org/mailman/listinfo/erlang-patches




More information about the erlang-bugs mailing list