New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Valgrind: invalid read after json_object_array_del_idx. #332
Comments
hmm... your code looks fine, seems like a bug somewhere in json-c. I'll see what I can figure out. |
…would attempt to free previously free'd entries due to not checking the current array length. Add a test that triggers the problem to ensure it stays fixed.
Sometimes you wonder how it ever worked. It should be fixed now, please try again with the most recent code. |
Thanks |
Hi I have exactely the same problem ! any solution please ! |
I set this but always the same problem ! it destroys the structure of objects after deletion |
I'll be happy to help you, but I don't understand what you're trying to explain. Please create a separate issue with an example of the problem that you are seeing. |
Hi,
I need to clear an array and add some new elements, but using json_object_array_del_idx is raising a possible issue, when adding new values after deleting.
Below is a snippet of code to reproduce the error. I can work around this by deleting the array object, and recreating, but that is a more time consuming process.
Running this through valgrind raises:
Invalid read of size 4
At the position as indicated in the comments. I'm using version "json-c 0.12.99".
The text was updated successfully, but these errors were encountered: