robiot / xclicker

XClicker - Fast gui autoclicker for x11 linux desktops
https://xclicker.xyz
GNU General Public License v3.0
472 stars 43 forks source link

Consider null terminator when using malloc #91

Closed TomaSajt closed 11 months ago

TomaSajt commented 11 months ago

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.

robiot commented 11 months ago

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