calmh/node-snmp-native — pull request #19 by ukko (2014-07-29 11:57:29+00:00)
Title: Fixed the error slice buffer, which was spammed valueRaw

Hello!

Here's a script that reproduces the error.

It is possible that these OID will not be on your machine, then you can add any of the 2 (or more) OID type OCTET STRING (other types I have not tested)

```js
var oids, session, snmp;

snmp = require('./node-snmp-native');

session = new snmp.Session({
host: '127.0.0.1',
port: 161,
community: 'public'
});

// There must be more than 2 OID {OCTET STRING}
oids = [
'.1.3.6.1.4.1.0.0.0.10.2.1.0',
'.1.3.6.1.4.1.0.0.0.10.2.2.0',
'.1.3.6.1.4.1.0.0.0.10.2.3.0',
'.1.3.6.1.4.1.0.0.0.10.2.4.0'
];

session.getAll({oids: oids}, function(error, varbinds) {
if (error) {
return console.error('Fail :-(');
} else {
varbinds.forEach(function(val) {
return console.log("" + (val.oid.join('.')) + "=", val.value, val.valueRaw.toString(), val.valueRaw);
});
return session.close();
}
});
```

Error

```
➜ /tmp nodejs test.js
1.3.6.1.4.1.0.0.0.10.2.1.0= n/a n/a0
+
n/a0
+
n/a0
+
n/a
1.3.6.1.4.1.0.0.0.10.2.2.0= n/a n/a0
+
n/a0
+
n/a
1.3.6.1.4.1.0.0.0.10.2.3.0= n/a n/a0
+
n/a
1.3.6.1.4.1.0.0.0.10.2.4.0= n/a n/a
```

Fixed
```
1.3.6.1.4.1.0.0.0.10.2.1.0= n/a
1.3.6.1.4.1.0.0.0.10.2.2.0= n/a
1.3.6.1.4.1.0.0.0.10.2.3.0= n/a
1.3.6.1.4.1.0.0.0.10.2.4.0= n/a
```