mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-17 07:12:06 +08:00
Change match to fnmatch
follow the kernel side change Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:

committed by
Alan Carvalho de Assis

parent
1120bc844a
commit
ad3f44bc77
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* Derived from the file of the same name in the original THTTPD package:
|
||||
*
|
||||
* Copyright <20> 1995 by Jef Poskanzer <jef@mail.acme.com>.
|
||||
* Copyright 1995 by Jef Poskanzer <jef@mail.acme.com>.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -46,8 +46,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/lib/regex.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
@@ -339,7 +338,7 @@ static int check_filename(char *filename)
|
||||
|
||||
/* Ensure that we are not reading a CGI file. */
|
||||
|
||||
if (cgi_pattern != (char *)0 && match(cgi_pattern, filename))
|
||||
if (cgi_pattern != (char *)0 && !fnmatch(cgi_pattern, filename, 0))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user