]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Merge branch 'master' of https://github.com/Proxmark/proxmark3
authorpwpiwi <pwpiwi@users.noreply.github.com>
Mon, 10 Apr 2017 17:37:05 +0000 (19:37 +0200)
committerpwpiwi <pwpiwi@users.noreply.github.com>
Mon, 10 Apr 2017 17:37:05 +0000 (19:37 +0200)
client/proxmark3.c
client/proxmark3.h

index 2ed127a4f934d2eb736c567af1de07d3d1e77af5..98f7880e3bc6d35116618f5085c36466ae31a9c9 100644 (file)
@@ -199,12 +199,12 @@ static void dumpAllHelp(int markdown)
 static char *my_executable_path = NULL;
 static char *my_executable_directory = NULL;
 
-const char const *get_my_executable_path(void)
+const char *get_my_executable_path(void)
 {
        return my_executable_path;
 }
 
-const char const *get_my_executable_directory(void)
+const char *get_my_executable_directory(void)
 {
        return my_executable_directory;
 }
@@ -219,6 +219,7 @@ static void set_my_executable_path(void)
                        my_executable_path[path_length] = '\0';
                        my_executable_directory = (char *)malloc(dirname_length + 2);
                        strncpy(my_executable_directory, my_executable_path, dirname_length+1);
+                       my_executable_directory[dirname_length+1] = '\0';
                }
        }
 }
index 2d19cf5c811af0d581f3fcef37ab010370dbd1f7..3f7c300441f2b7d2a2aeda619ceeced02384ccce 100644 (file)
@@ -17,7 +17,7 @@
 #define PROXPROMPT "proxmark3> "
 
 void SendCommand(UsbCommand *c);
-const char const *get_my_executable_path(void);
-const char const *get_my_executable_directory(void);
+const char *get_my_executable_path(void);
+const char *get_my_executable_directory(void);
 
 #endif
Impressum, Datenschutz