git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46990
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
if (complete) {
if (msgcnt < MAX_MSG_QUEUE) {
/* Allocate new structure */
- if ((m = malloc(sizeof(*m)))) {
- m->msg = NULL;
+ if ((m = calloc(1, sizeof(*m))))
msgcnt++;
- }
} else {
/* Recycle the oldest entry */
m = list;
free(m->msg);
}
if (m) {
- m->msg = NULL;
m->msg = strdup(stuff);
if (m->msg) {
if (last)
if ((strlen(files_dirent->d_name) < 4) || ((strlen(files_dirent->d_name) + dirnamelen) >= MAX_MOHFILE_LEN))
continue;
+ /* Skip files that start with a dot */
+ if (files_dirent->d_name[0] == '.')
+ continue;
+
snprintf(filepath, MAX_MOHFILE_LEN, "%s/%s", class->dir, files_dirent->d_name);
if (stat(filepath, &statbuf))