if (cnt_info->text.html_charset != NULL) {
memcpy(html_body, cnt_info->text.html_charset, EM_SAFE_STRLEN(cnt_info->text.html_charset));
- strcat(html_body, HTML_EXTENSION_STRING);
+ strncat(html_body, HTML_EXTENSION_STRING, MAX_PATH);
} else if (cnt_info->text.plain_charset != NULL) {
memcpy(html_body, cnt_info->text.plain_charset, EM_SAFE_STRLEN(cnt_info->text.plain_charset));
- strcat(html_body, HTML_EXTENSION_STRING);
+ strncat(html_body, HTML_EXTENSION_STRING, MAX_PATH);
} else {
memcpy(html_body, "UTF-8.htm", strlen("UTF-8.htm"));
}
while ((entry = readdir(dp)) != NULL) {
SNPRINTF(buf, sizeof(buf), "%s/%s", path, entry->d_name);
- remove(buf);
+ if (remove(buf) != 0) {
+ EM_DEBUG_EXCEPTION("File Deletion Failed`");
+ }
}
closedir(dp);