We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
to your account
DefinePriorityAttribute allocates priorities->list using TidyAlloc(), but re-allocates using realloc() instead of TidyRealloc(), which crashes if TidyAlloc didn't allocate memory via malloc
DefineMutedMessage allocates list->list using TidyAlloc(), but re-allocates using realloc() instead of TidyRealloc(), which crashes if TidyAlloc didn't allocate memory via malloc
The text was updated successfully, but these errors were encountered:
@dd8 thanks for catching this not very obvious bug... but easy to see, when you know what to look for...
not very obvious
Given that libTidy has a memory TidyAllocator, that users can set to what they want, realloc() should not be used in the raw, in those 2 cases...
F:\Projects\tidy-html5>find /N ">list" src\*.c
 priorities->list = realloc( priorities->list, sizeof(tmbstr) * priorities->capacity + 1 );
 list->list = realloc( list->list, sizeof(tidyStrings) * list->capacity + 1 );
Will try to include this easy fix somewhere... unless someone beats me to it, with say a patch, or PR... thanks...
Sorry, something went wrong.
I do have a patch which has been tested in production, so I can package that up and attach it to this issue
@dd8 that would be appreciated... maybe I can then include it in the next merge I do... thanks...
Here's the patch
Compiles in XCode 10 clang on Mac, Visual Studio 2015 on Windows
Tested in production on macOS 10.13, macOS 10.14, Windows 7, Windows 10, Windows Server 2016
Not tested on Linux/gcc
Is #797 - use 'TidyRealloc' in place of raw 'realloc'
@dd8 now applied, version 5.7.22... thanks...
No branches or pull requests