From 2415b89510df362eb89c79c29d18f2d0ce793f35 Mon Sep 17 00:00:00 2001 From: "Xiaokang Wang (Shelikhoo)" Date: Sun, 27 Oct 2024 21:50:37 +0000 Subject: [PATCH] fix infinite loop when parsing empty nonnative subscription content (#3208) --- app/subscription/entries/nonnative/nonnative.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/subscription/entries/nonnative/nonnative.go b/app/subscription/entries/nonnative/nonnative.go index 579ee2b71..acba14dde 100644 --- a/app/subscription/entries/nonnative/nonnative.go +++ b/app/subscription/entries/nonnative/nonnative.go @@ -30,6 +30,10 @@ func (a *AbstractNonNativeLink) fromBytes(bytes []byte) { } func (a *AbstractNonNativeLink) extractValue(content, prefix string) { + if content == "" { + return + } + { // check if the content is a link match, err := regexp.Match("[a-zA-Z0-9]+:((\\/\\/)|\\?)", []byte(content))