@scrypted/libav 1.0.139 → 1.0.140

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrypted/libav",
3
- "version": "1.0.139",
3
+ "version": "1.0.140",
4
4
  "dependencies": {
5
5
  "detect-libc": "^2.0.3",
6
6
  "follow-redirects": "^1.15.9",
@@ -796,7 +796,12 @@ Napi::Value createSDP(const Napi::CallbackInfo &info) {
796
796
 
797
797
  Napi::Array formatContextArray = info[0].As<Napi::Array>();
798
798
  size_t length = formatContextArray.Length();
799
- AVFormatContext *ctx[length];
799
+ AVFormatContext *ctx[100];
800
+
801
+ if (length > 100) {
802
+ Napi::Error::New(env, "Array length must be less than 100").ThrowAsJavaScriptException();
803
+ return env.Undefined();
804
+ }
800
805
 
801
806
  for (size_t i = 0; i < length; i++) {
802
807
  Napi::Object formatContextObject = formatContextArray.Get(i).As<Napi::Object>();