Merge branch '884-patches-to-review-4' into 'master'

dlz filesystem driver failed to properly detect period at end of filename.

Closes #884

See merge request isc-projects/bind9!1533
This commit is contained in:
Evan Hunt
2019-03-05 17:18:47 -05:00
2 changed files with 4 additions and 4 deletions

View File

@@ -113,10 +113,10 @@ is_safe(const char *input) {
if (i == 0)
return (false);
/* '..', two dots together is not allowed. */
else if (input[i-1] == '.')
if (input[i-1] == '.')
return (false);
/* '.' is not allowed as last char */
if (i == len)
if (i == len - 1)
return (false);
/* only 1 dot in ok location, continue at next char */
continue;

View File

@@ -106,10 +106,10 @@ is_safe(const char *input) {
if (i == 0)
return (false);
/* '..', two dots together is not allowed. */
else if (input[i-1] == '.')
if (input[i-1] == '.')
return (false);
/* '.' is not allowed as last char */
if (i == len)
if (i == len - 1)
return (false);
/* only 1 dot in ok location, continue at next char */
continue;