Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite193acd

Browse files
committed
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 ...
1 parent4b72779 commite193acd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/backend/utils/adt/arrayfuncs.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.52 2000/01/26 05:57:12 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.52.2.1 2000/05/28 17:43:34 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1309,6 +1309,10 @@ array_map(ArrayType *v,
13091309
char*p;
13101310
va_listap;
13111311

1312+
/* Need to guard against NULL input array */
1313+
if (v==NULL)
1314+
returnNULL;
1315+
13121316
/* Large objects not yet supported */
13131317
if (ARR_IS_LO(v)== true)
13141318
elog(ERROR,"array_map: large objects not supported");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp