Content-Length: 260302 | pFad | http://github.com/postgrespro/postgres/commit/fa2fc066f34f1b631b5f92f11e7cda9f60a25330

48 PL/Python: Fix type mixup · postgrespro/postgres@fa2fc06 · GitHub
Skip to content

Commit fa2fc06

Browse files
committed
PL/Python: Fix type mixup
Memory was allocated based on the sizeof a type that was not the type of the pointer that the result was being assigned to. The types happen to be of the same size, but it's still wrong.
1 parent 629b3e9 commit fa2fc06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pl/plpython/plpy_typeio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ PLy_output_tuple_funcs(PLyTypeInfo *arg, TupleDesc desc)
200200
if (arg->out.r.atts)
201201
PLy_free(arg->out.r.atts);
202202
arg->out.r.natts = desc->natts;
203-
arg->out.r.atts = PLy_malloc0(desc->natts * sizeof(PLyDatumToOb));
203+
arg->out.r.atts = PLy_malloc0(desc->natts * sizeof(PLyObToDatum));
204204
}
205205

206206
Assert(OidIsValid(desc->tdtypeid));

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/fa2fc066f34f1b631b5f92f11e7cda9f60a25330

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy