Closed dundee closed 11 months ago
It is okay not to be initialized since the pointers to the start of the buffer are set at 0 indicating there is no data in the buffer yet.
Can you give more details about the issue you are seeing?
We can see a random string data being inserted into the resulting JSON string. It happened only in few occurrences though.
I probably get what you mean. The dirty data could be there, but since cur
is set to beginning of the array we doesn't care what is further.
If you can help me recreate the issue I can get it fixed.
Closing. If I am able to reproduce it, I will post more details. Thank you!
We have found out that the problem was not limited to OJ serialisation. It was a general data corruption issue caused by faulty HW node.
Glad you figured it out. Glad it wasn't Oj as well. 😄
Hi, I am sorry for probably very dumb question since I don't know C very well, but we are investigating very weird behaviour of JSON serialisation (data busted randomly) and OJ is the main suspect right now.
Is it ok that
stack_buffer
is not initialised inside theencode
function?I can see a call to
oj_out_init
butstack_buffer
is not initialised there, it's used right away.Thanks!