Skip to content

Commit

Permalink
fix stringop-truncation error
Browse files Browse the repository at this point in the history
fixes #1
  • Loading branch information
ktgeek committed Jun 10, 2021
1 parent 5f1a1c6 commit 1da0e68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blinkstick-userspace-led-daemon/src/LEDBinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1da0e68

Please sign in to comment.