projects
/
users
/
heikki
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
629b3e9
)
PL/Python: Fix type mixup
author
Peter Eisentraut
<peter_e@gmx.net>
Fri, 14 Jun 2013 01:42:42 +0000
(21:42 -0400)
committer
Peter Eisentraut
<peter_e@gmx.net>
Fri, 14 Jun 2013 01:42:42 +0000
(21:42 -0400)
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.
src/pl/plpython/plpy_typeio.c
patch
|
blob
|
blame
|
history
diff --git
a/src/pl/plpython/plpy_typeio.c
b/src/pl/plpython/plpy_typeio.c
index 8f2367d30425f38c4175312a75df1d32f2c27ec1..6a9a2cb974721d8ee37165222402d1679110fbe5 100644
(file)
--- a/
src/pl/plpython/plpy_typeio.c
+++ b/
src/pl/plpython/plpy_typeio.c
@@
-200,7
+200,7
@@
PLy_output_tuple_funcs(PLyTypeInfo *arg, TupleDesc desc)
if (arg->out.r.atts)
PLy_free(arg->out.r.atts);
arg->out.r.natts = desc->natts;
- arg->out.r.atts = PLy_malloc0(desc->natts * sizeof(PLy
DatumToOb
));
+ arg->out.r.atts = PLy_malloc0(desc->natts * sizeof(PLy
ObToDatum
));
}
Assert(OidIsValid(desc->tdtypeid));