X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/ad939de5017f3451376d6f559858a30bae675964..f3c8131a0df4bd1d5cf39b886ba7c355efc2430c:/client/scripting.c diff --git a/client/scripting.c b/client/scripting.c index e73c7138..232da889 100644 --- a/client/scripting.c +++ b/client/scripting.c @@ -221,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) {