Changeset: 609dc54e0db5 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=609dc54e0db5 Modified Files: monetdb5/modules/atoms/json.c Branch: atom_strings Log Message:
Call JSONtoken and assign in two steps because of realloc. diffs (16 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 @@ -929,9 +929,11 @@ JSONtoken(JSON *jt, const char *j, const j++; skipblancs(j); jt->elm[nxt].kind = JSON_ELEMENT; - jt->elm[nxt].child = JSONtoken(jt, j, next); + /* do in two steps since JSONtoken may realloc jt->elm */ + int chld = JSONtoken(jt, j, next); if (jt->error) return idx; + jt->elm[nxt].child = chld; jt->elm[nxt].value++; jt->elm[nxt].valuelen -= 2; JSONappend(jt, idx, nxt); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list