[SNMP4J] Non-secure constructor in VariableBinding

Fabian Nart fabian.nart at ergon.ch
Tue Jul 25 16:54:58 CEST 2006


Hi Frank

  I think the following to constructors have to be adjusted:

   public VariableBinding() {
     oid = new OID(); // better: setOid(new OID());
     this.variable = new Null();
   }

   public VariableBinding(OID oid) {
     this.oid = oid; // better: setOid(oid);
     this.variable = new Null();
   }

This prevents the oid from being set to null, which is not assured by 
the second constructor.

Greetz, Fabian



More information about the SNMP4J mailing list