From: Rasmus Lerdorf Date: Wed, 15 Jul 2009 23:50:59 +0000 (+0000) Subject: Fix the buffer handling here X-Git-Tag: php-5.2.11RC1~172 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13878ae91eb3e21b9112414ae11ae2aa83b03ff6;p=php Fix the buffer handling here --- diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c index fc9623fdc8..969db5363b 100644 --- a/ext/interbase/interbase.c +++ b/ext/interbase/interbase.c @@ -588,8 +588,8 @@ static char const dpb_args[] = { int _php_ibase_attach_db(char **args, int *len, long *largs, isc_db_handle *db TSRMLS_DC) { - short i, dpb_len, buf_len = 256; - char dpb_buffer[256] = { isc_dpb_version1 }, *dpb; + short i, dpb_len, buf_len = 257-2; /* version byte at the front, and a null at the end */ + char dpb_buffer[257] = { isc_dpb_version1, 0 }, *dpb; dpb = dpb_buffer + 1;