Skip to content

Commit

Permalink
Merge pull request #4044 from sysown/v2.x-4042
Browse files Browse the repository at this point in the history
Do not print version numbers longer than 32 chars
  • Loading branch information
renecannao authored Dec 8, 2022
2 parents 28f1367 + e8c1bf6 commit 4768a95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4768a95

Please sign in to comment.