possible to use fnmatch() on things other than paths (such as
arguments) so a limit of PATH_MAX does not make sense. Fixes a bug
where rules would fail to match if the length of the arguments were
larger than PATH_MAX (usually 1024).
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif /* HAVE_STRINGS_H */
-#include <limits.h>
#include "sudo_compat.h"
#include "compat/charclass.h"
const char *mismatch = NULL;
int matchlen = 0;
- if (strlen(pattern) > PATH_MAX || strlen(string) > PATH_MAX)
- return FNM_NOMATCH;
-
if (*pattern == '*')
goto firstsegment;