code analysis, bounds checks, buffer overrun fixes.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7403 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2008-01-28 08:47:55 +00:00
parent 482badffca
commit 284d03e5e1
11 changed files with 26 additions and 16 deletions

View File

@@ -589,7 +589,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_mime_add_type(const char *type, cons
if ((argc = switch_separate_string(ext_list, ' ', argv, (sizeof(argv) / sizeof(argv[0]))))) {
for (x = 0; x < argc; x++) {
switch_core_hash_insert(runtime.mime_types, argv[x], ptype);
if (argv[x] && ptype) {
switch_core_hash_insert(runtime.mime_types, argv[x], ptype);
}
}
status = SWITCH_STATUS_SUCCESS;