From bf50caf105a901c4f83ac1df3cdaf910c26694a4 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sun, 10 Apr 2011 11:42:00 -0400 Subject: pgindent run before PG 9.1 beta 1. --- src/backend/utils/adt/arrayfuncs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/backend/utils/adt/arrayfuncs.c') diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index e023b2458ed..0869de66cef 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -72,7 +72,7 @@ typedef struct ArrayIteratorData /* current position information, updated on each iteration */ char *data_ptr; /* our current position in the array */ int current_item; /* the item # we're at in the array */ -} ArrayIteratorData; +} ArrayIteratorData; static bool array_isspace(char ch); static int ArrayCount(const char *str, int *dim, char typdelim); @@ -1268,7 +1268,8 @@ array_recv(PG_FUNCTION_ARGS) */ if (dim[i] != 0) { - int ub = lBound[i] + dim[i] - 1; + int ub = lBound[i] + dim[i] - 1; + if (lBound[i] > ub) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), -- cgit v1.2.3