vorbis_comment vc;
vorbis_info vi;
- char filename[PATH_MAX];
-
FILE *in;
bool opened;
long serial;
int prevW;
int extrapage;
int eosin;
+
+ char filename[0];
};
static void
vcedit_state_new (const char *filename)
{
vcedit_state *state;
+ size_t len;
+
+ len = strlen (filename);
- state = malloc (sizeof (vcedit_state));
+ state = malloc (sizeof (vcedit_state) + len + 1);
if (!state)
return NULL;
return NULL;
}
- snprintf (state->filename, sizeof (state->filename),
- "%s", filename);
+ strcpy (state->filename, filename);
return state;
}