You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If, say, alignment is 2, then padding is <= 2, and padding + alignment is still less than the size of a void pointer, so the memcpy will write before the start of the allocated memory.
As far as I can tell this attempts to free the address at which the original pointer is stored, rather than the actual original pointer. I think there should be a read using memcpy somewhere.
I don't have time to look into this further at the moment, I just wanted to create an issue while I remembered.
The text was updated successfully, but these errors were encountered:
The squash_aligned_free function was not reading back the original
pointer. Also make sure there is room for storing the original
pointer even with small alignment values.
Fixes#240
I just took a quick look through
squash-memory.c
, and noticed:squash/squash/squash-memory.c
Lines 227 to 232 in bcf1acf
If, say, alignment is 2, then padding is <= 2, and padding + alignment is still less than the size of a void pointer, so the
memcpy
will write before the start of the allocated memory.squash/squash/squash-memory.c
Line 249 in bcf1acf
As far as I can tell this attempts to free the address at which the original pointer is stored, rather than the actual original pointer. I think there should be a read using
memcpy
somewhere.I don't have time to look into this further at the moment, I just wanted to create an issue while I remembered.
The text was updated successfully, but these errors were encountered: