[erlang-patches] Bug in snmp_generic

Serge Aleynikov <>
Tue Dec 2 04:44:57 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}]).

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) ->





More information about the erlang-patches mailing list