summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-05-28 17:43:34 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-05-28 17:43:34 +0000
commite193acd8014179db8d484f621ecffe2b4b661b38 (patch)
tree90384cf6bef0eeaf719aeecf6f31d6fab726e4ce /src
parent4b72779f7bd8e674ac8a2a7b5eac007d11f16e4d (diff)
array_map() needs to guard against a NULL input array. This problem
should go away in 7.1 with the new fmgr, but for 7.0.1 ...
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/adt/arrayfuncs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c
index acb4e8f48a2..7c09276d86a 100644
--- a/src/backend/utils/adt/arrayfuncs.c
+++ b/src/backend/utils/adt/arrayfuncs.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.52 2000/01/26 05:57:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.52.2.1 2000/05/28 17:43:34 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1309,6 +1309,10 @@ array_map(ArrayType *v,
char *p;
va_list ap;
+ /* Need to guard against NULL input array */
+ if (v == NULL)
+ return NULL;
+
/* Large objects not yet supported */
if (ARR_IS_LO(v) == true)
elog(ERROR, "array_map: large objects not supported");