zippy / ceptr

(a recomposable medium for distributed social computing) || (semantic self-describing protocol stacks)
http://ceptr.org
GNU General Public License v3.0
88 stars 17 forks source link

add dynamic buffer growing for _t2rawjson #79

Open zippy opened 8 years ago

zippy commented 8 years ago

just had a stack-smashing event in dump2json because the sys defs passed 10k. Shouldn't have to watch out for that...

currently _t2rawjson just takes a buffer and fills it with data converting the semantic tree structure to json. It doesn't do any checking for buffer overrun. What should really happen is that it should use malloc and dynamically and grow the buffer as needed, and then return that allocated buffer as a result.