From: Sterling Hughes Date: Sun, 24 Nov 2002 15:11:43 +0000 (+0000) Subject: null after the erealloc() X-Git-Tag: RELEASE_1_0b2~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=490903da5ad33a7ff40d81339fd5803f56c935b1;p=php null after the erealloc() --- diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 6aee07e890..0b75af16fa 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2730,8 +2730,8 @@ static unsigned char * php_pgsql_unescape_bytea(unsigned char *strtext, size_t * break; } } - buffer[buflen] = '\0'; buffer = erealloc(buffer, buflen+1); + buffer[buflen] = 0; if (buffer == NULL) return NULL;