mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-19 20:48:22 +00:00
Change match to fnmatch
follow the kernel side change Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
1120bc844a
commit
ad3f44bc77
3 changed files with 11 additions and 12 deletions
|
|
@ -7,7 +7,7 @@
|
|||
*
|
||||
* Derived from the file of the same name in the original THTTPD package:
|
||||
*
|
||||
* Copyright © 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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue