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

Commit4ecd197

Browse files
committed
Check that result tupdesc has exactly 1 column in return_next scalar case.
This should always be true, but since we're relying on a tuple descriptorpassed from outside pltcl itself, let's check. Per a gripe from Coverity.
1 parentb40b4dd commit4ecd197

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/pl/tcl/pltcl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2192,6 +2192,10 @@ pltcl_returnnext(ClientData cdata, Tcl_Interp *interp,
21922192
Datumretval;
21932193
boolisNull= false;
21942194

2195+
/* for paranoia's sake, check that tupdesc has exactly one column */
2196+
if (call_state->ret_tupdesc->natts!=1)
2197+
elog(ERROR,"wrong result type supplied in return_next");
2198+
21952199
retval=InputFunctionCall(&prodesc->result_in_func,
21962200
utf_u2e((char*)Tcl_GetString(objv[1])),
21972201
prodesc->result_typioparam,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp