version 1.1.1.1, 2013/10/14 10:32:47
|
version 1.1.1.2, 2014/06/15 20:20:06
|
Line 278 SETDEFAULTS_FUNC(mod_dirlisting_set_defaults) {
|
Line 278 SETDEFAULTS_FUNC(mod_dirlisting_set_defaults) {
|
|
|
if (!p) return HANDLER_ERROR; |
if (!p) return HANDLER_ERROR; |
|
|
p->config_storage = calloc(1, srv->config_context->used * sizeof(specific_config *)); | p->config_storage = calloc(1, srv->config_context->used * sizeof(plugin_config *)); |
|
|
for (i = 0; i < srv->config_context->used; i++) { |
for (i = 0; i < srv->config_context->used; i++) { |
plugin_config *s; |
plugin_config *s; |
Line 672 static int http_list_directory(server *srv, connection
|
Line 672 static int http_list_directory(server *srv, connection
|
#endif |
#endif |
|
|
path = malloc(dir->used + name_max); |
path = malloc(dir->used + name_max); |
assert(path); | force_assert(path); |
strcpy(path, dir->ptr); |
strcpy(path, dir->ptr); |
path_file = path + i; |
path_file = path + i; |
|
|
Line 685 static int http_list_directory(server *srv, connection
|
Line 685 static int http_list_directory(server *srv, connection
|
} |
} |
|
|
dirs.ent = (dirls_entry_t**) malloc(sizeof(dirls_entry_t*) * DIRLIST_BLOB_SIZE); |
dirs.ent = (dirls_entry_t**) malloc(sizeof(dirls_entry_t*) * DIRLIST_BLOB_SIZE); |
assert(dirs.ent); | force_assert(dirs.ent); |
dirs.size = DIRLIST_BLOB_SIZE; |
dirs.size = DIRLIST_BLOB_SIZE; |
dirs.used = 0; |
dirs.used = 0; |
files.ent = (dirls_entry_t**) malloc(sizeof(dirls_entry_t*) * DIRLIST_BLOB_SIZE); |
files.ent = (dirls_entry_t**) malloc(sizeof(dirls_entry_t*) * DIRLIST_BLOB_SIZE); |
assert(files.ent); | force_assert(files.ent); |
files.size = DIRLIST_BLOB_SIZE; |
files.size = DIRLIST_BLOB_SIZE; |
files.used = 0; |
files.used = 0; |
|
|
Line 730 static int http_list_directory(server *srv, connection
|
Line 730 static int http_list_directory(server *srv, connection
|
log_error_write(srv, __FILE__, __LINE__, "sd", |
log_error_write(srv, __FILE__, __LINE__, "sd", |
"execution error while matching:", n); |
"execution error while matching:", n); |
|
|
return -1; | /* aborting would require a lot of manual cleanup here. |
| * skip instead (to not leak names that break pcre matching) |
| */ |
| exclude_match = 1; |
| break; |
} |
} |
} |
} |
else { |
else { |
Line 762 static int http_list_directory(server *srv, connection
|
Line 766 static int http_list_directory(server *srv, connection
|
if (list->used == list->size) { |
if (list->used == list->size) { |
list->size += DIRLIST_BLOB_SIZE; |
list->size += DIRLIST_BLOB_SIZE; |
list->ent = (dirls_entry_t**) realloc(list->ent, sizeof(dirls_entry_t*) * list->size); |
list->ent = (dirls_entry_t**) realloc(list->ent, sizeof(dirls_entry_t*) * list->size); |
assert(list->ent); | force_assert(list->ent); |
} |
} |
|
|
tmp = (dirls_entry_t*) malloc(sizeof(dirls_entry_t) + 1 + i); |
tmp = (dirls_entry_t*) malloc(sizeof(dirls_entry_t) + 1 + i); |