Skip to content

Commit

Permalink
Merge pull request #1 from kokke/kokke-patch-1
Browse files Browse the repository at this point in the history
fix time-of-check time-of-use problem
  • Loading branch information
kokke committed Sep 13, 2021
2 parents 4be45b4 + 8c7ee06 commit 57265a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parser.c
Expand Up @@ -434,13 +434,13 @@ extract_referer_site (const char *referer, char *host) {
* On success, the 1 is returned. */
static int
verify_static_content (const char *req) {
if ((req == NULL) || (*req == '\0'))
return 0;

const char *nul = req + strlen (req);
const char *ext = NULL, *pch = NULL;
int elen = 0, i;

if ((req == NULL) || (*req == '\0'))
return 0;

for (i = 0; i < conf.static_file_idx; ++i) {
ext = conf.static_files[i];
if (ext == NULL || *ext == '\0')
Expand Down

0 comments on commit 57265a6

Please sign in to comment.