diff --git a/blinkstick-userspace-led-daemon/src/LEDBinding.cpp b/blinkstick-userspace-led-daemon/src/LEDBinding.cpp index 66c84f7..57949c1 100644 --- a/blinkstick-userspace-led-daemon/src/LEDBinding.cpp +++ b/blinkstick-userspace-led-daemon/src/LEDBinding.cpp @@ -54,7 +54,7 @@ LEDBinding::~LEDBinding() void LEDBinding::registerUserSpaceLED() { struct uleds_user_dev dev; - strncpy(dev.name, mName.c_str(), LED_MAX_NAME_SIZE); + strncpy(dev.name, mName.c_str(), LED_MAX_NAME_SIZE - 1); dev.max_brightness = 100; mULedsFileDescriptor = open("/dev/uleds", O_RDWR);