FIX: mem leaks

FIX: 'hf mf nested' - params
This commit is contained in:
iceman1001 2019-02-20 22:29:39 +01:00
parent 956899b839
commit 06ade9970a
6 changed files with 23 additions and 15 deletions

View file

@ -608,7 +608,7 @@ static int l_hardnested(lua_State *L){
char filename[FILE_PATH_SIZE]="nonces.bin";
const char *p_filename = luaL_checklstring(L, 11, &size);
if(size != 0)
strcpy(filename, p_filename);
memcpy(filename, p_filename, FILE_PATH_SIZE-1);
uint32_t blockNo = 0, keyType = 0;
uint32_t trgBlockNo = 0, trgKeyType = 0;