net-snmp 3.19.1 → 3.19.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 +2 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -3469,6 +3469,10 @@ Example programs are included under the module's `example` directory.
3469
3469
 
3470
3470
  * Fix integer constraints check
3471
3471
 
3472
+ # Version 3.19.2 - 06/03/2025
3473
+
3474
+ * Fix integer and string constraints check on cast
3475
+
3472
3476
  # License
3473
3477
 
3474
3478
  Copyright (c) 2020 Mark Abrahams <mark@abrahams.co.nz>
package/index.js CHANGED
@@ -604,7 +604,7 @@ ObjectTypeUtil.castSetValue = function (type, value, constraints) {
604
604
  if ( isNaN(parsedValue) ) {
605
605
  throw new Error("Invalid Integer", value);
606
606
  }
607
- if ( constraints && ObjectTypeUtil.doesIntegerMeetConstraints (parsedValue, constraints) ) {
607
+ if ( constraints && ! ObjectTypeUtil.doesIntegerMeetConstraints (parsedValue, constraints) ) {
608
608
  throw new Error("Integer does not meet constraints", value);
609
609
  }
610
610
  return parsedValue;
@@ -614,7 +614,7 @@ ObjectTypeUtil.castSetValue = function (type, value, constraints) {
614
614
  if ( ! value instanceof Buffer && typeof value != "string" ) {
615
615
  throw new Error("Invalid OctetString", value);
616
616
  }
617
- if ( constraints && ObjectTypeUtil.doesStringMeetConstraints (value, constraints) ) {
617
+ if ( constraints && ! ObjectTypeUtil.doesStringMeetConstraints (value, constraints) ) {
618
618
  throw new Error("OctetString does not meet constraints", value);
619
619
  }
620
620
  if ( value instanceof Buffer ) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "net-snmp",
3
- "version": "3.19.1",
3
+ "version": "3.19.2",
4
4
  "description": "JavaScript implementation of the Simple Network Management Protocol (SNMP)",
5
5
  "main": "index.js",
6
6
  "directories": {