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

Timestamp constructor may trigger segmentation fault #625

Open
mmd-osm opened this issue Jun 27, 2021 · 0 comments
Open

Timestamp constructor may trigger segmentation fault #625

mmd-osm opened this issue Jun 27, 2021 · 0 comments
Labels

Comments

@mmd-osm
Copy link
Contributor

mmd-osm commented Jun 27, 2021

One of the Timestamp constructors reads 8 bytes from void*, although a Timestamp has only 5 bytes. I've seen some issues in connection with attic data, where the timestamp was at the very end of an allocated memory block, and reading 8 bytes instead of the permitted 5 remaining bytes triggered a segmentation fault. g++ address sanitizer also complains about undefined behavior due to a heap-buffer-overflow. Proposed fix would be to read exactly 5 bytes instead of 8.

timestamp

A similar issue needs to be fixed in the Attic constructor as well:

timestamp2

@drolbr drolbr added the bug label Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants