From: Stefan Schmidt stefan@slimlogic.co.uk
Signed-off-by: Stefan Schmidt stefan@slimlogic.co.uk --- src/ascenario.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/ascenario.c b/src/ascenario.c index d2a9519..49845dc 100644 --- a/src/ascenario.c +++ b/src/ascenario.c @@ -554,11 +554,11 @@ static int read_sequence_file(snd_scenario_t *scn, int position) struct scenario_info *info = &scn->scenario[scn->current_scenario];
if (position == PRE_SEQ) { - sprintf(filename, "%s/%s/%s", ALSA_SCN_DIR, scn->card_name, + snprintf(filename, MAX_FILE, "%s/%s/%s", ALSA_SCN_DIR, scn->card_name, info->pre_sequence_file); } else { - sprintf(filename, "%s/%s/%s", ALSA_SCN_DIR, scn->card_name, + snprintf(filename, MAX_FILE, "%s/%s/%s", ALSA_SCN_DIR, scn->card_name, info->post_sequence_file); }
@@ -777,7 +777,7 @@ static int import_master_config(snd_scenario_t *scn) FILE *f; char filename[MAX_FILE];
- sprintf(filename, "%s/%s.conf", ALSA_SCN_DIR, scn->card_name); + snprintf(filename, MAX_FILE, "%s/%s.conf", ALSA_SCN_DIR, scn->card_name);
fd = open(filename, O_RDONLY | O_NOATIME); if (fd < 0) {