We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afe2c2d commit 34668ebCopy full SHA for 34668eb
src/audio/capture/jack.c
@@ -181,7 +181,10 @@ static void * audio_cap_jack_init(struct module *parent, const char *cfg)
181
goto error;
182
}
183
} else if (strstr(item, "name=") == item) {
184
- strcpy(client_name, item + strlen("name="));
+ strncpy(client_name, item + strlen("name="),
185
+ sizeof client_name - 1);
186
+ // ensure termination if truncated
187
+ client_name[sizeof client_name - 1] = '\0';
188
} else { // this is the device name
189
source_name = cfg + (item - dup);
190
break;
0 commit comments