8000 Consider null terminator when using malloc by TomaSajt · Pull Request #91 · robiot/xclicker · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Consider null terminator when using malloc #91

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

Merged
merged 1 commit into from
Nov 22, 2023
Merged

Consider null terminator when using malloc #91

merged 1 commit into from
Nov 22, 2023

Conversation

TomaSajt
Copy link
Contributor
@TomaSajt TomaSajt commented Nov 21, 2023

I was trying to package this program for Nixpkgs, and used its custom meson builder script, which uses some kind of fortification by default, which catches buffer overflows.

When running the program I got several buffer overflow errors, and with the help of coredumpctl I could trace it back to some string size math. It looks like there wasn't enough space for the null-terminator of the string.

Copy link
Owner
@robiot robiot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool

@robiot
Copy link
Owner
robiot commented Nov 22, 2023

Thanks, looks like I missed that when allocating memory. I will merge this so you can package it for nixpkg!

@robiot robiot merged commit c99f69a into robiot:master Nov 22, 2023
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
0