diff options
author | Mark Spencer <markster@digium.com> | 2004-07-14 13:57:15 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-07-14 13:57:15 +0000 |
commit | 044ad2e2e7a74049ed5c2215d00624be9f045e60 (patch) | |
tree | 30a1118273807f5c6ba0e3ca611ab0c6a160fa3b /res/res_musiconhold.c | |
parent | 9cd917c42a6cf0661861a7e19d4685b2449df43f (diff) |
Merge remaining audit patch (save dlfcn.c)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_musiconhold.c')
-rwxr-xr-x | res/res_musiconhold.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 311cb4046..b446551c1 100755 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -153,7 +153,7 @@ static int spawn_mp3(struct mohclass *class) files = 0; while((de = readdir(dir)) && (files < MAX_MP3S)) { if ((strlen(de->d_name) > 3) && !strcasecmp(de->d_name + strlen(de->d_name) - 4, ".mp3")) { - strncpy(fns[files], de->d_name, sizeof(fns[files])); + strncpy(fns[files], de->d_name, sizeof(fns[files]) - 1); argv[argc++] = fns[files]; files++; } @@ -340,7 +340,7 @@ static int moh2_exec(struct ast_channel *chan, void *data) ast_log(LOG_WARNING, "SetMusicOnHold requires an argument (class)\n"); return -1; } - strncpy(chan->musicclass, data, sizeof(chan->musicclass)); + strncpy(chan->musicclass, data, sizeof(chan->musicclass) - 1); return 0; } |