Changeset: 30355ac3b324 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=30355ac3b324
Modified Files:
        monetdb5/modules/atoms/json.c
Branch: json
Log Message:

Revert "Do not interpret strings before JSON parsing"

This reverts commit fe63ebfa4e06099b5969a05692ae7e12f8607bd3.


diffs (19 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
@@ -125,7 +125,14 @@ JSONfromString(const char *src, size_t *
                        return -1;
                *len = slen + 1;
        }
-       strcpy(*j, src);
+       if (external) {
+               if (GDKstrFromStr((unsigned char *) *j,
+                                                 (const unsigned char *) src, 
(ssize_t) slen) < 0)
+                       return -1;
+               src = *j;
+       } else {
+               strcpy(*j, src);
+       }
        jt = JSONparse(*j);
        if (jt == NULL)
                return -1;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to