fix: Out-of-bounds memory access in strtok.#192
Conversation
|
This is currently a draft. It has a unit test but no fix yet. |
|
Thank you for the testcase! I think the best way forward is to set a default value for Thus I'll try setting it to |
|
I have tried both However, I cannot make out the cause of the error. Do you see an error: https://github.com/ooxi/gerbv/actions/runs/5545198229/jobs/10123767309? |
3af7a07 to
b3ae98e
Compare
Put all the filename allocation and deallocation into the `gerb_fopen` and `gerb_fclose` functions so that the caller doesn't need to deal with this anymore. Also, free includeFilename. It was allocated as part of `gerb_fgetstring()` above but never freed properly. Unit tests added to valgrind.
b3ae98e to
dfb5aac
Compare
@ooxi Setting it to Lines 1450 to 1480 in caa6560 Looking into the code for that call to Lines 196 to 224 in caa6560 There's a |
This fixes #191