Changeset: 56aaa035090b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/56aaa035090b
Modified Files:
        monetdb5/modules/atoms/json.c
Branch: Jul2021
Log Message:

The result must be allocated. My bad


diffs (14 lines):

diff --git a/monetdb5/modules/atoms/json.c b/monetdb5/modules/atoms/json.c
--- a/monetdb5/modules/atoms/json.c
+++ b/monetdb5/modules/atoms/json.c
@@ -396,7 +396,9 @@ JSONjson2str(str *ret, json *j)
 static str
 JSON2json(json *ret, const json *j)
 {
-       *ret = *j;
+       *ret = GDKstrdup(*j);
+       if (*ret == NULL)
+               throw(MAL, "json.json", SQLSTATE(HY013) MAL_MALLOC_FAIL);
        return MAL_SUCCEED;
 }
 
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to