fix a crash problem; from DBD::SQLite CVS; via FreeBSD

This commit is contained in:
robert 2004-06-11 17:37:48 +00:00
parent a2c0a3d15f
commit eec4016291

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-dbdimp_c,v 1.1 2004/06/11 17:37:48 robert Exp $
--- dbdimp.c.orig Sat Feb 14 18:36:38 2004
+++ dbdimp.c Fri Jun 11 19:38:42 2004
@@ -294,8 +294,11 @@
char *
sqlite_decode(imp_dbh_t *imp_dbh, char *input, size_t *len)
{
- char *ret = malloc(*len);
- char *swit = ret;
+ char *ret;
+ char *swit;
+
+ New(1, ret, *len, char);
+ swit = ret;
while (*input) {
switch (*input) {