Fix value overflow in get_top_upstreams() due to in_port_t being an unsigned 16 bit integer where we need a signed data type. This is a regression of #2001

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2024-08-03 22:40:02 +02:00
parent c9275ace5f
commit 1b2ce29454
+1 -1
View File
@@ -570,7 +570,7 @@ cJSON *get_top_upstreams(struct ftl_conn *api, const bool upstreams_only)
{
int count = 0;
const char* ip, *name;
in_port_t port = -1;
int port = -1; // Need signed data type here as -1 means: no port applicable
double responsetime = 0.0, uncertainty = 0.0;
if(i == -2)