summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.c
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2002-11-24 07:45:26 +0000
committerYasuo Ohgaki <yohgaki@php.net>2002-11-24 07:45:26 +0000
commit5c2fda30b241a8d0793d7a6e414de78021e2fc5f (patch)
treebc32a5578aac2773533011a4da557e541a105e59 /ext/pgsql/pgsql.c
parentbad0d653a1304b777ba5bb3765eeac80abfea724 (diff)
downloadphp-git-5c2fda30b241a8d0793d7a6e414de78021e2fc5f.tar.gz
Added missing '\0'
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r--ext/pgsql/pgsql.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index f73bf062d6..6aee07e890 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -2730,7 +2730,8 @@ static unsigned char * php_pgsql_unescape_bytea(unsigned char *strtext, size_t *
break;
}
}
- buffer = erealloc(buffer, buflen);
+ buffer[buflen] = '\0';
+ buffer = erealloc(buffer, buflen+1);
if (buffer == NULL)
return NULL;