From cfa11486a5c7bc5adaae18e239ac531e5c5cf6d3 Mon Sep 17 00:00:00 2001 From: lotusexpeditor <51518492+lotusexpeditor@users.noreply.github.com> Date: Tue, 7 Jul 2020 22:24:19 +0300 Subject: [PATCH] Fix for Stack Corruption --- gvfsmain.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gvfsmain.cpp b/gvfsmain.cpp index 9838594..f60e3f6 100644 --- a/gvfsmain.cpp +++ b/gvfsmain.cpp @@ -56,7 +56,7 @@ int main(int args, char** argv) continue; if (!strcmp (ent->d_name, "..")) continue; - sprintf(path,"%s\\%s\0",argv[1],ent->d_name); + sprintf(path,"%s/%s\0",argv[1],ent->d_name); GVFSOpen(path); } } @@ -166,6 +166,7 @@ int readChild(long offset, int level) cEntry.metaOffset = readInteger(fileBuffer,offset + 8,4); cEntry.lastUpdate = readInteger(fileBuffer,offset+12,4)+ baseTime; cEntry.numMetaKeys = readInteger(fileBuffer, cEntry.metaOffset,4); + if(cEntry.numMetaKeys > 2)cEntry.numMetaKeys=2; // stack corruption when this value over 2, idk why, but working with this sh*tty fix for (int n = 0;n