Skip to content

Commit e2d39d1

Browse files
committed
Forcefully set null byte on temp buffer
1 parent 86c7482 commit e2d39d1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

c_src/sqlite3_nif.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,6 +1453,7 @@ action_code_from_atom(ErlNifEnv* env, ERL_NIF_TERM atom)
14531453
if (!enif_get_atom(env, atom, buf, sizeof(buf), ERL_NIF_LATIN1)) {
14541454
return -1;
14551455
}
1456+
buf[31] = 0;
14561457

14571458
if (strcmp(buf, "create_index") == 0) {
14581459
return SQLITE_CREATE_INDEX;

0 commit comments

Comments
 (0)