From 10fc2d9354cb67bd4dd3dbc86215610039640342 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 12 Feb 2024 13:55:06 -0500 Subject: [PATCH] fix possible crash when loading invalid song issue #1760 --- src/engine/fileOps/fileOpsCommon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/fileOps/fileOpsCommon.cpp b/src/engine/fileOps/fileOpsCommon.cpp index 7362171cb..56046b078 100644 --- a/src/engine/fileOps/fileOpsCommon.cpp +++ b/src/engine/fileOps/fileOpsCommon.cpp @@ -136,7 +136,7 @@ bool DivEngine::load(unsigned char* f, size_t slen) { } // step 3: try loading as .mod - if (loadMod(f,slen)) { + if (loadMod(file,len)) { delete[] f; return true; }