From 896abc5e34d905879558f85ec93887154c3cdd95 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 6 Mar 2007 02:17:13 +0000 Subject: use safe_realloc --- ext/sqlite/sqlite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/sqlite/sqlite.c') diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index 35eb656628..27922020b1 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -1465,7 +1465,7 @@ next_row: /* add the row to our collection */ if (rres->nrows + 1 >= rres->alloc_rows) { rres->alloc_rows = rres->alloc_rows ? rres->alloc_rows * 2 : 16; - rres->table = erealloc(rres->table, rres->alloc_rows * rres->ncolumns * sizeof(char *)); + rres->table = safe_erealloc(rres->table, rres->alloc_rows, rres->ncolumns*sizeof(char *), 0); } base = rres->nrows * rres->ncolumns; for (i = 0; i < rres->ncolumns; i++) { -- cgit v1.2.1