protobufjs 7.2.3 → 7.2.5

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * protobuf.js v7.2.3 (c) 2016, daniel wirtz
3
- * compiled mon, 27 mar 2023 18:08:22 utc
2
+ * protobuf.js v7.2.5 (c) 2016, daniel wirtz
3
+ * compiled tue, 22 aug 2023 00:04:28 utc
4
4
  * licensed under the bsd-3-clause license
5
5
  * see: https://github.com/dcodeio/protobuf.js for details
6
6
  */
@@ -1173,7 +1173,7 @@ function genValuePartial_fromObject(gen, field, fieldIndex, prop) {
1173
1173
  break;
1174
1174
  case "uint64":
1175
1175
  isUnsigned = true;
1176
- // eslint-disable-line no-fallthrough
1176
+ // eslint-disable-next-line no-fallthrough
1177
1177
  case "int64":
1178
1178
  case "sint64":
1179
1179
  case "fixed64":
@@ -1287,7 +1287,7 @@ function genValuePartial_toObject(gen, field, fieldIndex, prop) {
1287
1287
  break;
1288
1288
  case "uint64":
1289
1289
  isUnsigned = true;
1290
- // eslint-disable-line no-fallthrough
1290
+ // eslint-disable-next-line no-fallthrough
1291
1291
  case "int64":
1292
1292
  case "sint64":
1293
1293
  case "fixed64":
@@ -3997,9 +3997,14 @@ Reader.prototype.bytes = function read_bytes() {
3997
3997
  this.pos += length;
3998
3998
  if (Array.isArray(this.buf)) // plain array
3999
3999
  return this.buf.slice(start, end);
4000
- return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1
4001
- ? new this.buf.constructor(0)
4002
- : this._slice.call(this.buf, start, end);
4000
+
4001
+ if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1
4002
+ var nativeBuffer = util.Buffer;
4003
+ return nativeBuffer
4004
+ ? nativeBuffer.alloc(0)
4005
+ : new this.buf.constructor(0);
4006
+ }
4007
+ return this._slice.call(this.buf, start, end);
4003
4008
  };
4004
4009
 
4005
4010
  /**
@@ -5857,7 +5862,7 @@ util.decorateEnum = function decorateEnum(object) {
5857
5862
  util.setProperty = function setProperty(dst, path, value) {
5858
5863
  function setProp(dst, path, value) {
5859
5864
  var part = path.shift();
5860
- if (part === "__proto__") {
5865
+ if (part === "__proto__" || part === "prototype") {
5861
5866
  return dst;
5862
5867
  }
5863
5868
  if (path.length > 0) {