summaryrefslogtreecommitdiff
path: root/ext/dbase
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dbase')
-rw-r--r--ext/dbase/dbase.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/dbase/dbase.c b/ext/dbase/dbase.c
index 43a8dfd89e..7bcc7f7026 100644
--- a/ext/dbase/dbase.c
+++ b/ext/dbase/dbase.c
@@ -294,7 +294,7 @@ PHP_FUNCTION(dbase_add_record)
tmp = **field;
zval_copy_ctor(&tmp);
convert_to_string(&tmp);
- sprintf(t_cp, cur_f->db_format, Z_STRVAL(tmp));
+ snprintf(t_cp, cur_f->db_flen+1, cur_f->db_format, Z_STRVAL(tmp));
zval_dtor(&tmp);
t_cp += cur_f->db_flen;
}
@@ -306,7 +306,7 @@ PHP_FUNCTION(dbase_add_record)
RETURN_FALSE;
}
- put_dbf_info(dbh);
+ put_dbf_info(dbh);
efree(cp);
RETURN_TRUE;
@@ -361,7 +361,7 @@ PHP_FUNCTION(dbase_replace_record)
RETURN_FALSE;
}
convert_to_string_ex(field);
- sprintf(t_cp, cur_f->db_format, Z_STRVAL_PP(field));
+ snprintf(t_cp, cur_f->db_flen+1, cur_f->db_format, Z_STRVAL_PP(field));
t_cp += cur_f->db_flen;
}