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

Commit2d481b3

Browse files
committed
Fix plperl crash with list value return for an array result type.
Reported by Michael Fuhr, fixed by Andrew Dunstan.
1 parent807bbe6 commit2d481b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/pl/plperl/plperl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* ENHANCEMENTS, OR MODIFICATIONS.
3434
*
3535
* IDENTIFICATION
36-
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.85 2005/07/1201:16:21 tgl Exp $
36+
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.86 2005/07/1220:35:42 tgl Exp $
3737
*
3838
**********************************************************************/
3939

@@ -1020,8 +1020,8 @@ plperl_func_handler(PG_FUNCTION_ARGS)
10201020
/* Return a perl string converted to a Datum */
10211021
char*val;
10221022

1023-
1024-
if (prodesc->fn_retisarray&&SvTYPE(SvRV(perlret))==SVt_PVAV)
1023+
if (prodesc->fn_retisarray&&SvROK(perlret)&&
1024+
SvTYPE(SvRV(perlret))==SVt_PVAV)
10251025
{
10261026
array_ret=plperl_convert_to_pg_array(perlret);
10271027
SvREFCNT_dec(perlret);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp