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

ta_alloc(0) leads to returning same non-NULL address twice #15

Open
jlindgren90 opened this issue Mar 24, 2024 · 1 comment
Open

ta_alloc(0) leads to returning same non-NULL address twice #15

jlindgren90 opened this issue Mar 24, 2024 · 1 comment

Comments

@jlindgren90
Copy link

jlindgren90 commented Mar 24, 2024

Calling ta_alloc(0) and then another ta_alloc() (of any size) appears to be returning the same address twice. Having two memory blocks sharing the same address is bad since there is no way for ta_free() to know which to free.

ta_alloc(0) should probably either return NULL or behave the same as if ta_alloc(1) was called.

@postspectacular
Copy link
Member

@jlindgren90 Thank you very much for this and the other PR - I will take a look asap, but likely will take a little while for me to review & test this...

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

No branches or pull requests

2 participants