From 064c3a19f96527095376571484637ba299bf93b1 Mon Sep 17 00:00:00 2001 From: Aurelien David Date: Mon, 4 Mar 2024 14:56:15 +0100 Subject: [PATCH] out_http: fix port parsing --- src/filters/out_http.c | 2 +- testsuite | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/filters/out_http.c b/src/filters/out_http.c index f5d5529ba8..976c1dcd52 100644 --- a/src/filters/out_http.c +++ b/src/filters/out_http.c @@ -2670,7 +2670,7 @@ static GF_Err httpout_initialize(GF_Filter *filter) cplen = (u32) (sep-ctx->dst-7); if (cplen>1023) cplen=1023; strncpy(szIP, ctx->dst+7, cplen); - szIP[1023] = 0; + szIP[MIN(cplen,1023)] = 0; sep = strchr(szIP, ':'); if (sep) { port = atoi(sep+1); diff --git a/testsuite b/testsuite index 1c3c5e7982..9be125c717 160000 --- a/testsuite +++ b/testsuite @@ -1 +1 @@ -Subproject commit 1c3c5e79823d3a8fd2785c12e52d97428bf22f94 +Subproject commit 9be125c717d81e157f53380b48010d3ec15d79b9