Skip to content
New issue

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? Sign in to your account

Fix for handling changes introduced in postprocess #135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RomanSek
Copy link

@RomanSek RomanSek commented May 4, 2017

Plugin postprocessing didn't introduce changes in files if string chain pointer didn't change. I removed additional check for that so HTTrack will now depend only on return value from plugin to apply changes.
Let me know if you need tests for this fix.

@xroche
Copy link
Owner

xroche commented Jun 10, 2018

I don't get the change - if cAddr == TypedArrayElts(output_buffer), the copy will be idem-potent, so this does not change anything

@RomanSek
Copy link
Author

I'm a bit rusty with my C, so I can be wrong. I suspect that bug happens when you realloc memory for changed output and get pointer to the same memory address, but with bigger/smaller size of the allocated memory block. In that case if cAddr == TypedArrayElts(output_buffer) will be true, but new output is different and isn't copied properly.

If you want - I can write a plugin that triggers this behavior.

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.

2 participants