Browse Source

jack_connect: fix off-by-one error in allocating space for the server name string

pull/612/head
fps 5 years ago
parent
commit
31590ad4ec
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      example-clients/connect.c

+ 1
- 1
example-clients/connect.c View File

@@ -88,7 +88,7 @@ main (int argc, char *argv[])
while ((c = getopt_long (argc, argv, "s:hvu", long_options, &option_index)) >= 0) {
switch (c) {
case 's':
server_name = (char *) malloc (sizeof (char) * strlen(optarg));
server_name = (char *) malloc (sizeof (char) * (strlen(optarg) + 1));
strcpy (server_name, optarg);
options |= JackServerName;
break;


Loading…
Cancel
Save