]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdscript.c
FIX: COverityScan 133865, out-of-bounds access, Forgot that bits is not used in...
[proxmark3-svn] / client / cmdscript.c
index 928a216d7334bc72cf52f4b457f12ecbb111683c..b8c971581f05daa8b772e8ba491e36eae0e4a607 100644 (file)
@@ -83,7 +83,7 @@ int CmdList(const char *Cmd)
     {
         while ((ep = readdir (dp)) != NULL)
         {
-            if(ep->d_name != NULL && str_ends_with(ep->d_name, ".lua"))
+            if(str_ends_with(ep->d_name, ".lua"))
                 PrintAndLog("%-16s %s", ep->d_name, "A script file");
         }
         (void) closedir (dp);
@@ -98,10 +98,10 @@ int CmdList(const char *Cmd)
  * @param Cmd
  * @return
  */
-int CmdScript(const char *Cmd)
-{
-  CmdsParse(CommandTable, Cmd);
-  return 0;
+int CmdScript(const char *Cmd) {
+       clearCommandBuffer();
+       CmdsParse(CommandTable, Cmd);
+       return 0;
 }
 /**
  * Utility to check the ending of a string (used to check file suffix)
Impressum, Datenschutz