Skip to content
Snippets Groups Projects
Commit 3229c418 authored by Lorenz Meier's avatar Lorenz Meier Committed by Daniel Agar
Browse files

Mixer test: Condition strncpy properly

parent 9e95d885
No related branches found
No related tags found
No related merge requests found
......@@ -217,7 +217,7 @@ bool MixerTest::loadAllTest()
char buf[PATH_MAX];
(void)strncpy(&buf[0], MIXER_ONBOARD_PATH, sizeof(buf));
(void)strncpy(&buf[strlen(MIXER_ONBOARD_PATH)], result->d_name, sizeof(buf));
(void)strncpy(&buf[strlen(MIXER_ONBOARD_PATH)], result->d_name, sizeof(buf) - strlen(MIXER_ONBOARD_PATH));
bool ret = load_mixer(buf, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment