From: Chris Tallon Date: Mon, 6 Nov 2023 15:51:03 +0000 (+0000) Subject: 15 years that line of code has been waiting to crash X-Git-Url: https://git.vomp.tv/gitweb/?a=commitdiff_plain;ds=sidebyside;p=vompserver.git 15 years that line of code has been waiting to crash --- diff --git a/vompclientrrproc.c b/vompclientrrproc.c index 50dee4e..940374b 100644 --- a/vompclientrrproc.c +++ b/vompclientrrproc.c @@ -750,7 +750,9 @@ int VompClientRRProc::processGetRecordingsList() #else int Percent = VideoDiskSpace(&FreeMB); #endif - int Total = (FreeMB / (100 - Percent)) * 100; + // int Total = (FreeMB / (100 - Percent)) * 100; + int Total = 0; // This was never used, which explains why nobody noticed it's total rubbish anyway. + // Also it breaks with a lovely divide by 0 crash when your storage gets full. resp->addULONG(Total); resp->addULONG(FreeMB);