@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 +1 -1
- package/src/formatcontext.cpp +6 -1
package/package.json
CHANGED
package/src/formatcontext.cpp
CHANGED
|
@@ -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[
|
|
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>();
|