slackhq / tree-sitter-hack

Hack grammar for tree-sitter
MIT License
33 stars 16 forks source link

Change to using std::string instead of const char* #38

Closed brownierin closed 2 years ago

brownierin commented 2 years ago

Summary

This update should fix the use-after-free vulnerability reported in #37. While this wasn't exploitable, it's better to remove dangling pointers. We are now returning a string object instead of a pointer to a const char* that no longer exists after exiting the function.

Thank you for your report, @theHamsta!

Requirements (place an x in each [ ])

CLAassistant commented 2 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.