From 18e9e4358708aa43e8544465f291105dfe3ccfb6 Mon Sep 17 00:00:00 2001 From: cecille Date: Mon, 2 Oct 2023 17:03:39 -0400 Subject: [PATCH] ID buffer size was also incorrect --- examples/tv-casting-app/tv-casting-common/core/CastingPlayer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/tv-casting-app/tv-casting-common/core/CastingPlayer.h b/examples/tv-casting-app/tv-casting-common/core/CastingPlayer.h index 3f33b69e526c0e..bfa048e8984651 100644 --- a/examples/tv-casting-app/tv-casting-common/core/CastingPlayer.h +++ b/examples/tv-casting-app/tv-casting-common/core/CastingPlayer.h @@ -40,7 +40,8 @@ using ConnectCallback = std::function; using DisconnectCallback = std::function; const int kPortMaxLength = 5; // port is uint16_t -const int kIdMaxLength = chip::Dnssd::kHostNameMaxLength + kPortMaxLength; +// +1 for the : between the hostname and the port. +const int kIdMaxLength = chip::Dnssd::kHostNameMaxLength + kPortMaxLength + 1; class CastingPlayerAttributes {