]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/pm3_binlib.c
Add ROCA vulnerability test (RRG repository PR 76 by @merlokk) (#762)
[proxmark3-svn] / client / pm3_binlib.c
index 5c1e3cfcb94178563ca6ff5c3d3eb55cc81b0238..cffbca6cd3995f18dae85b5ec1be5236bd8086a2 100644 (file)
@@ -107,7 +107,8 @@ static int l_unpack(lua_State *L)           /** unpack(f,s, [init]) */
  size_t len;
  const char *s=luaL_checklstring(L,2,&len); /* switched s and f */
  const char *f=luaL_checkstring(L,1);
- int i_read = luaL_optint(L,3,1)-1;
+ int i_read = luaL_optinteger(L,3,1)-1;
+ // int i_read = luaL_optint(L,3,1)-1;
  unsigned int i;
  if (i_read >= 0) {
    i = i_read;
@@ -305,7 +306,7 @@ static int l_pack(lua_State *L)             /** pack(f,...) */
         sbyte = 0;
         odd = 0;
       }
-    } else if (isspace(a[ii])) {
+    } else if (isspace((unsigned char)a[ii])) {
       /* ignore */
     } else {
       /* err ... ignore too*/
@@ -347,4 +348,3 @@ int set_bin_library (lua_State *L) {
    lua_pop(L, 1);
   return 1;
 }
-
Impressum, Datenschutz