]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/scripting.c
update travis config (#662)
[proxmark3-svn] / client / scripting.c
index 0c761cb2e91c21ff4a78ff0000b9bce051dd8e67..232da889703618914bd8e4ec73fcacb0332d559a 100644 (file)
@@ -15,6 +15,7 @@
 #include <lualib.h>
 #include <lauxlib.h>
 #include "proxmark3.h"
+#include "comms.h"
 #include "usb_cmd.h"
 #include "cmdmain.h"
 #include "util.h"
@@ -220,7 +221,7 @@ static int l_iso14443b_crc(lua_State *L)
        unsigned char buf[USB_CMD_DATA_SIZE];
        size_t len = 0;
        const char *data = luaL_checklstring(L, 1, &len);
-       if (USB_CMD_DATA_SIZE < len)
+       if (len > USB_CMD_DATA_SIZE-2)
                len =  USB_CMD_DATA_SIZE-2;
 
        for (int i = 0; i < len; i += 2) {
Impressum, Datenschutz