فهرست منبع

fix infinite loop when parsing empty nonnative subscription content (#3208)

Xiaokang Wang (Shelikhoo) 1 سال پیش
والد
کامیت
2415b89510
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      app/subscription/entries/nonnative/nonnative.go

+ 4 - 0
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))