rem: char* tmpbuf = tmpbuf = malloc(strlen("ai-add ") + strlen(nexttrack));
add: size_t len = strlen("ai-add '") + strlen(nexttrack) + strlen("'") + 1; char* tmpbuf = malloc(len);
context: static void add_track_to_chainsetup(eci_handle_t eci, const char* nexttrack){  char* tmpbuf = tmpbuf = malloc(strlen("ai-add ") + strlen(nexttrack));  assert(tmpbuf != NULL);  snprintf(tmpbuf, 8 + strlen(nexttrack), "ai-add %s", nexttrack);  eci_command_r(eci, tmpbuf);  /* check that add succeeded */  eci_command_r(eci, "ai-list");  if (eci_last_string_list_count_r(eci) != 1) {    fprintf(stderr, "(ecaplay) Warning! Failed to add input '%s'.\n", nexttrack);  }  free(tmpbuf);}