From 822bb007023e82e6c7b8c650783880ced1595a8c Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 28 Jul 2024 13:44:46 +0200 Subject: [PATCH] prevent buffer overrun when fetching non-steam apps --- sgdboop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sgdboop.c b/sgdboop.c index c463d5d..1140404 100644 --- a/sgdboop.c +++ b/sgdboop.c @@ -814,7 +814,7 @@ struct nonSteamApp* getNonSteamApps(int includeMods) { uint64_t intBytes[4]; // Parse the vdf content - while (strstr_i(parsingChar, "appname") > 0) { + while ((parsingChar - fileContent) < filesize && strstr_i(parsingChar, "appname") > 0) { uint64_t appid_old = 0; uint64_t appid = 0;