#16 json_encode64 bug part 2

closed-fixed
nobody
None
5
2011-07-19
2011-07-18
Anonymous
No

When JSON_MEMORY_MANAGE is enabled, the returned string is not-null terminated. In general, when you write StringHandler.insert(...), make sure the string being inserted is null terminated. The same problem happens in returnDecode64() as well.

Discussion

  • Jonathan Wallace

    I am fixing this, it also would fail in unicode mode, I'm fixing that too.

    decode is not supposed to null terminate, it's binary data, not a string

     
  • Jonathan Wallace

    I changed the documentation, to make it clearer that decode64 returns a non-terminated chunk of data

     
  • Jonathan Wallace

    • status: open --> closed-fixed
     
  • Jonathan Wallace

    Closing this. It's been fixed, and I added a regression test. The unit testers are running now, they take about 24 hours to run, so you should be able to get the fixed version sometime tomorrow.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks