mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 15:40:14 +00:00
acap/jack: fix CID 480385
an overflow
This commit is contained in:
@@ -181,7 +181,10 @@ static void * audio_cap_jack_init(struct module *parent, const char *cfg)
|
||||
goto error;
|
||||
}
|
||||
} else if (strstr(item, "name=") == item) {
|
||||
strcpy(client_name, item + strlen("name="));
|
||||
strncpy(client_name, item + strlen("name="),
|
||||
sizeof client_name - 1);
|
||||
// ensure termination if truncated
|
||||
client_name[sizeof client_name - 1] = '\0';
|
||||
} else { // this is the device name
|
||||
source_name = cfg + (item - dup);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user