Skip to content

Commit 6cf843f

Browse files
committed
Fix invalid string length passing
1 parent 492aef7 commit 6cf843f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sqlite3-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ bind_values(emacs_env *env, sqlite3 *db, sqlite3_stmt *stmt, emacs_value bounds)
113113
if (eq_type(env, type, "string")) {
114114
ptrdiff_t size;
115115
const char *p = retrieve_string(env, bound, &size);
116-
ret = sqlite3_bind_text(stmt, i+1, p, size, NULL);
116+
ret = sqlite3_bind_text(stmt, i+1, p, size-1, NULL);
117117
} else if (eq_type(env, type, "integer")) {
118118
intmax_t num = env->extract_integer(env, bound);
119119
ret = sqlite3_bind_int64(stmt, i+1, num);

0 commit comments

Comments
 (0)