]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/ui.c
Add string.h
[proxmark3-svn] / client / ui.c
index 3a1e42c523786b2771f74eb94d08731e4d474dcc..46f7b73c349b48a0dcb067e93a51097c30f003fc 100644 (file)
@@ -13,6 +13,7 @@
 #ifndef EXTERNAL_PRINTANDLOG
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include <stdarg.h>
 #include <readline/readline.h>
 #include <pthread.h>
@@ -99,7 +100,7 @@ void PrintAndLogEx(logLevel_t level, char *fmt, ...) {
                }
                PrintAndLog(buffer2);
        } else {
-               snprintf(buffer2, sizeof(buffer2), "%s%s", prefix, buffer);
+               snprintf(buffer2, sizeof(buffer2), "%s%.*s", prefix, MAX_PRINT_BUFFER - 20, buffer);
                PrintAndLog(buffer2);
        }
 }
Impressum, Datenschutz