From e6efcd555f4e91756b0fb918c0d4631569d4b896 Mon Sep 17 00:00:00 2001 From: sathiyajith Date: Thu, 27 Jun 2024 16:03:26 -0400 Subject: [PATCH] fix: bugfix for #579 --- internal/sbi/processor/event_exposure.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/internal/sbi/processor/event_exposure.go b/internal/sbi/processor/event_exposure.go index 92b0c1c..4809d69 100644 --- a/internal/sbi/processor/event_exposure.go +++ b/internal/sbi/processor/event_exposure.go @@ -62,6 +62,15 @@ func (p *Processor) CreateAMFEventSubscriptionProcedure(createEventSubscription ueEventSubscription.RemainReports = new(int32) *ueEventSubscription.RemainReports = subscription.Options.MaxReports } + + if subscription.EventList == nil { + problemDetails := &models.ProblemDetails{ + Status: http.StatusBadRequest, + Cause: "SUBSCRIPTION_EMPTY", + } + return nil, problemDetails + } + for _, events := range *subscription.EventList { immediateFlags = append(immediateFlags, events.ImmediateFlag) if events.ImmediateFlag {