mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #366] Weakness in Set header and footer that can lead to crash #290
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#290
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gabrielaexile on GitHub (Feb 22, 2022).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/366
Originally assigned to: @jmcnamara on GitHub.
Hello
Setting header or footer generates error then it will call free(self->footer); in various of places. But it will not set it to NULL, which will cause problem when you come to lxw_worksheet_free where it will again free the footer and header which now are invalid pointers.
@jmcnamara commented on GitHub (Feb 22, 2022):
Thanks, that looks like a bug. I'll look into it.
@jmcnamara commented on GitHub (Feb 22, 2022):
I've pushed a fix for this to main if you care to try it out.
There is a failing Windows compilation test but I don't think that it is related. I am debugging it.
@jmcnamara commented on GitHub (Feb 23, 2022):
The failing test is related so I'll need to look at this a bit more.
@jmcnamara commented on GitHub (Feb 23, 2022):
I fixed the Windows issue, it was in the test case and not the code. I also did a bit more refactoring to take care of some other edge cases in the header/footer failure modes.
Anyway, let me know if this resolves your issue. I will close the GitHub issue in a few days if there is no update.
@jmcnamara commented on GitHub (Feb 25, 2022):
Closing. If there are any further issues let me know.