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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy