net-snmp 3.5.1 → 3.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +4 -0
  2. package/index.js +7 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -3138,6 +3138,10 @@ Example programs are included under the module's `example` directory.
3138
3138
 
3139
3139
  * Fix MIB parsing of sized integers without whitespace
3140
3140
 
3141
+ ## Version 3.5.2 - 02/03/2021
3142
+
3143
+ * Fix MIB table index handling of Buffer type
3144
+
3141
3145
  # License
3142
3146
 
3143
3147
  Copyright (c) 2020 Mark Abrahams <mark@abrahams.co.nz>
package/index.js CHANGED
@@ -4081,7 +4081,13 @@ Mib.prototype.getOidAddressFromValue = function (value, indexPart) {
4081
4081
  oidComponents = value.split (".");
4082
4082
  break;
4083
4083
  case ObjectType.OctetString:
4084
- oidComponents = [...value].map (c => c.charCodeAt());
4084
+ if ( value instanceof Buffer ) {
4085
+ // Buffer
4086
+ oidComponents = Array.prototype.slice.call (value);
4087
+ } else {
4088
+ // string
4089
+ oidComponents = [...value].map (c => c.charCodeAt());
4090
+ }
4085
4091
  break;
4086
4092
  case ObjectType.IpAddress:
4087
4093
  return value.split (".");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "net-snmp",
3
- "version": "3.5.1",
3
+ "version": "3.5.2",
4
4
  "description": "JavaScript implementation of the Simple Network Management Protocol (SNMP)",
5
5
  "main": "index.js",
6
6
  "directories": {