mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 02:49:02 -04:00
Reject empty disk filter patterns in filter_alloc_disk
This commit is contained in:
parent
d4dc5a7339
commit
f75827281f
1 changed files with 2 additions and 2 deletions
|
|
@ -127,8 +127,8 @@ struct snapraid_filter* filter_alloc_disk(int direction, const char* pattern)
|
|||
filter->is_abs = 0;
|
||||
filter->is_dir = 0;
|
||||
|
||||
/* no slash allowed in disk names */
|
||||
if (strchr(filter->pattern, '/') != 0) {
|
||||
/* no empty pattern or slash allowed in disk names */
|
||||
if (filter->pattern[0] == 0 || strchr(filter->pattern, '/') != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
free(filter);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue