Commit 5fdb142f authored by Tom Lane's avatar Tom Lane

Tweak ArrayCount() to forestall possible access to temp[-1]. Problem

cannot actually happen at present because ArrayCount() is only called
on strings beginning with '{', but seems best to prevent it going forward.
Per report from Yichen Xie.
parent 3cb282f3
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.85 2002/11/13 00:39:47 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.86 2003/01/29 01:28:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -275,7 +275,7 @@ ArrayCount(char *str, int *dim, char typdelim)
{
int nest_level = 0,
i;
int ndim = 0,
int ndim = 1,
temp[MAXDIM];
bool scanning_string = false;
bool eoArray = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment