Skip to content

Free attributes before return NULL#899

Merged
geoffmcl merged 1 commit intohtacg:nextfrom
ltx2018:next
Nov 21, 2020
Merged

Free attributes before return NULL#899
geoffmcl merged 1 commit intohtacg:nextfrom
ltx2018:next

Conversation

@ltx2018
Copy link
Contributor

@ltx2018 ltx2018 commented Oct 9, 2020

fix memleak in GetTokenFromStream()

@ltx2018
Copy link
Contributor Author

ltx2018 commented Oct 9, 2020

And here is the reproduce testcode(based from oss-fuzz):
poc.zip

@geoffmcl
Copy link
Contributor

geoffmcl commented Oct 9, 2020

@ltx2018 thank you for this next PR... and the poc.c sample code, to reproduce...

But actually you can use tidy itself, like just running -

$ echo "<?xml a" | valgrind tidy -q

And applying your 9e05e16 patch clears the heap summery - in use at exit: 0 bytes in 0 blocks - great...

Look forward to others testing this, and reporting... thanks...

Baring any negative reports, but do not expect any, will get to merging this soonest... thanks...

@geoffmcl geoffmcl added the Bug label Oct 9, 2020
@ltx2018
Copy link
Contributor Author

ltx2018 commented Oct 13, 2020

@ltx2018 thank you for this next PR... and the poc.c sample code, to reproduce...

But actually you can use tidy itself, like just running -

$ echo "<?xml a" | valgrind tidy -q

And applying your 9e05e16 patch clears the heap summery - in use at exit: 0 bytes in 0 blocks - great...

Look forward to others testing this, and reporting... thanks...

Baring any negative reports, but do not expect any, will get to merging this soonest... thanks...

Thanks for the review and comments

@geoffmcl geoffmcl merged commit 8f0e7aa into htacg:next Nov 21, 2020
geoffmcl added a commit that referenced this pull request Nov 21, 2020
@geoffmcl
Copy link
Contributor

@ltx2018 PR now merged... thanks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants