From e8c1bf6690ff834b2ce028ae65e4d5f9635f8e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Wed, 7 Dec 2022 11:40:22 +0000 Subject: [PATCH] Do not print version numbers longer than 32 chars If the returned version number during version check is longer than 32 bytes it means that probably the request failed. In this case we suppress and ignore it. --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 7a13f06fe..d5bfa9c74 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -150,7 +150,8 @@ static char * main_check_latest_version() { void * main_check_latest_version_thread(void *arg) { char * latest_version = main_check_latest_version(); - if (latest_version) { + // we check for potential invalid data , see issue #4042 + if (latest_version != NULL && strlen(latest_version) < 32) { if ( (know_latest_version == NULL) // first check || (strcmp(know_latest_version,latest_version)) // new version detected