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: Incorrect pointer arithmetics in ucl_expand_single_variable #221

Merged
merged 1 commit into from
Apr 13, 2020

Conversation

andoriyu
Copy link
Contributor

This one I'm not 100% sure, but other code paths in that function are doing it this way.

As I said in previous issue, I had UclObjects holding bytes related to previous allocations. I think it's related to this code block. Valgrind showed read/write problems related to those pointers as well.

Hopefully this is last PR for this function.

This one I'm not 100% sure, but other code paths in that function are doing it this way.

As I said in previous issue, I had UclObjects holding bytes related to previous allocations. I *think* it's related to this code block. Valgrind showed read/write problems related to those pointers as well.

Hopefully this is last PR for this function.
@vstakhov
Copy link
Owner

The strange thing is that I have tested this variables expansion many times in Rspamd in conjunction with asan/valgrind. But it has not revealed any issues. Perhaps, in my scenarios, I never wanted ucl to free the variables (meaning transfering memory ownership to libucl from variables handlers).
Anyway, thank you very much for your work!

@vstakhov vstakhov merged commit 5a9386a into vstakhov:master Apr 13, 2020
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