From 418b33040c025c4f1f7668177b5d70a41cd4be74 Mon Sep 17 00:00:00 2001 From: Saxon Nelson-Milton Date: Mon, 13 Mar 2023 12:37:03 +1030 Subject: [PATCH] vidforward/file.go: check length of urls on load --- cmd/vidforward/utils.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/vidforward/utils.go b/cmd/vidforward/utils.go index 2d19a1b1..a93c5008 100644 --- a/cmd/vidforward/utils.go +++ b/cmd/vidforward/utils.go @@ -38,6 +38,9 @@ import ( var loggingLevel = logging.Info func newRevid(log logging.Logger, urls []string) (*revid.Revid, error) { + if len(urls) <= 0 { + return nil, fmt.Errorf("cannot have %d URLs", len(urls)) + } var outputs []uint8 for _ = range urls { outputs = append(outputs, config.OutputRTMP)