[server] access_folder is guaranteed to be NULL terminated
This commit is contained in:
parent
d85b1077fb
commit
24f57f36a7
@ -1349,7 +1349,6 @@ acc_data_is_valid(fko_srv_options_t *opts,
|
||||
int
|
||||
parse_access_folder(fko_srv_options_t *opts, char *access_folder, int *depth)
|
||||
{
|
||||
char *ndx;
|
||||
char *extension;
|
||||
DIR *dir_ptr;
|
||||
|
||||
@ -1362,11 +1361,8 @@ parse_access_folder(fko_srv_options_t *opts, char *access_folder, int *depth)
|
||||
acc_stanza_init(opts);
|
||||
}
|
||||
|
||||
if((ndx = strrchr(access_folder, '/')) != NULL)
|
||||
{
|
||||
if (strlen(ndx) == 1)
|
||||
*ndx = '\0';
|
||||
}
|
||||
/* access_folder is guaranteed to be NULL terminated
|
||||
*/
|
||||
dir_ptr = opendir(access_folder);
|
||||
|
||||
//grab the file names in the directory and loop through them
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user