From 7fa65d6712ffb9badcf5c00a927e4ec72d4a32a6 Mon Sep 17 00:00:00 2001 From: Brian Stubbs Date: Wed, 7 Nov 2012 12:24:14 -0200 Subject: [PATCH] Allocating more memory than required? --- c_src/sqlite3_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_src/sqlite3_drv.c b/c_src/sqlite3_drv.c index a09fbef..a9ac948 100644 --- a/c_src/sqlite3_drv.c +++ b/c_src/sqlite3_drv.c @@ -421,7 +421,7 @@ static int bind_parameters( return output_error(drv, SQLITE_ERROR, "error while binding parameters"); } - acc_string = driver_alloc(sizeof(char*) * (*p_size + 1)); + acc_string = driver_alloc(sizeof(char) * (*p_size + 1)); ei_decode_string(buffer, p_index, acc_string); for (param_index = 1; param_index <= *p_size; param_index++) { sqlite3_bind_int(statement, param_index, (int) (unsigned char) acc_string[param_index - 1]);