File ZynAddSubFX-strncat-fix.diff of Package ZynAddSubFX

---
 src/Misc/Bank.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: ZynAddSubFX-2.4.1/src/Misc/Bank.cpp
===================================================================
--- ZynAddSubFX-2.4.1.orig/src/Misc/Bank.cpp
+++ ZynAddSubFX-2.4.1/src/Misc/Bank.cpp
@@ -337,9 +337,9 @@ int Bank::newbank(const char *newbankdir
 
     if(((bankdir[strlen(bankdir) - 1]) != '/')
        && ((bankdir[strlen(bankdir) - 1]) != '\\'))
-        strncat(bankdir, "/", MAX_STRING_SIZE);
+        strncat(bankdir, "/", MAX_STRING_SIZE-strlen(bankdir)-1);
     ;
-    strncat(bankdir, newbankdirname, MAX_STRING_SIZE);
+    strncat(bankdir, newbankdirname, MAX_STRING_SIZE-strlen(bankdir)-1);
 #ifdef OS_WINDOWS
     result = mkdir(bankdir);
 #else