Changeset: 93896e8a553f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=93896e8a553f
Modified Files:
sql/server/rel_psm.c
Branch: Apr2012
Log Message:
rel_create_func(): (try to) avoid segfault in case result_type() returns NULL
Not sure, though, whether my error handling is completely correct;
please double check!
diffs (17 lines):
diff --git a/sql/server/rel_psm.c b/sql/server/rel_psm.c
--- a/sql/server/rel_psm.c
+++ b/sql/server/rel_psm.c
@@ -745,8 +745,12 @@ rel_create_func(mvc *sql, dlist *qname,
}
if (!l)
l = sa_list(sql->sa);
- if (res)
+ if (res) {
restype = result_type(sql, sf, fname, res);
+ if (!restype)
+ return sql_error(sql, 01,
+ "CREATE %s%s: failed to
get restype", KF, F);
+ }
if (body) { /* sql func */
list *b = NULL;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list