Add guard code to prevent the use of NULL pointers in emitter.c#305
Add guard code to prevent the use of NULL pointers in emitter.c#305rsbeckerca wants to merge 1 commit intoyaml:masterfrom
Conversation
This is related to CVE-2024-35326 Fixes yaml#301 Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca>
|
This is a candidate contribution of defensive guard code that I added in my own fork to deal with potential NULL pointers and double-frees in the emitter.c code. If this is useful, please consider it. |
|
Looking at the CI builds, I don't think the failures are related to this contribution, but I might be wrong about that. |
|
Thanks! I had also been playing around with setting things to NULL after freeing, but ran into problems. |
|
btw, the linked CVE is about heap-buffer-overflow, not double free |
|
I'm not sure I understand the test failure. Is this because if a NULL is passed in, it previously ignored it? Or is that a free after free not working anymore - because that would be an actual bug. I did not change that much. |
|
@perlpunk Is there a command I can run to test the CI failure? Having trouble viewing it. I would like to make this work. |
This is related to CVE-2024-35326
Fixes #301