From beb59543dc56ce4ff54b97b663ad4ee31541ea9a Mon Sep 17 00:00:00 2001 From: Jake Daynes Date: Fri, 13 Mar 2026 04:21:14 -0700 Subject: [PATCH] fix: update inline error for linter --- internal/attack/rtsp.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/internal/attack/rtsp.go b/internal/attack/rtsp.go index d628793..96b157c 100644 --- a/internal/attack/rtsp.go +++ b/internal/attack/rtsp.go @@ -152,14 +152,20 @@ func (a Attacker) handleRedirect(stream *cameradar.Stream, resHeaders base.Heade } if location.Hostname() != "" { - if addr, err := netip.ParseAddr(location.Hostname()); err == nil { + + addr, err := netip.ParseAddr(location.Hostname()) + if err == nil { stream.Address = addr } } if location.Port() != "" { - if port, err := strconv.Atoi(location.Port()); err == nil { - stream.Port = uint16(port) + + port, err := strconv.Atoi(location.Port()) + if err == nil { + if port >= 0 && port <= 65535 { + stream.Port = uint16(port) + } } } }