Skip to content

clam-1650 fixing leak when exporting pdf json metadata#553

Merged
val-ms merged 1 commit intoCisco-Talos:mainfrom
m-sola:clam-1650
May 31, 2022
Merged

clam-1650 fixing leak when exporting pdf json metadata#553
val-ms merged 1 commit intoCisco-Talos:mainfrom
m-sola:clam-1650

Conversation

@m-sola
Copy link
Contributor

@m-sola m-sola commented Apr 19, 2022

Cleanup for the pdf->stats structure wasn't guaranteed when handling
a fatal memory error. This fix pulls stats cleanup into its own function
and handles the case where there's a fatal memory error by moving the
function call below the err: tag.

This fix also removes an extraneous call to pdf_export_json.

@m-sola m-sola requested review from ragusaa and val-ms April 19, 2022 02:58
@ragusaa
Copy link
Contributor

ragusaa commented May 9, 2022

There is a block of code in cli_pdf with an '#if 0 ... #endif' around it. Could you remove that as part of the PR?

@ragusaa
Copy link
Contributor

ragusaa commented May 10, 2022

Everything else looks good to me. I reproduced the issue in main, and verified that it is gone with your changes, so I'll go ahead and approve it.

@ragusaa
Copy link
Contributor

ragusaa commented May 10, 2022

Could you also add a merge request to the private fuzz corpus?

Cleanup for the pdf->stats structure wasn't guaranteed when handling
a fatal memory error. This fix pulls stats cleanup into its own function
and handles the case where there's a fatal memory error by moving the
function call below the err: tag.

This fix also removes an extraneous call to pdf_export_json.
@val-ms
Copy link
Contributor

val-ms commented May 28, 2022

Rebased to see it go through the test pipelines with the PoC in there.

@val-ms val-ms merged commit 6d5d295 into Cisco-Talos:main May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants