Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
27ccf416
Commit
27ccf416
authored
Feb 15, 2011
by
valenok
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in verify_document_root()
parent
3583e83a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
main.c
main.c
+3
-2
No files found.
main.c
View file @
27ccf416
...
@@ -131,12 +131,13 @@ static void verify_document_root(const char *root) {
...
@@ -131,12 +131,13 @@ static void verify_document_root(const char *root) {
path
=
root
;
path
=
root
;
if
((
p
=
strchr
(
root
,
','
))
!=
NULL
&&
(
size_t
)
(
p
-
root
)
<
sizeof
(
buf
))
{
if
((
p
=
strchr
(
root
,
','
))
!=
NULL
&&
(
size_t
)
(
p
-
root
)
<
sizeof
(
buf
))
{
strncpy
(
buf
,
root
,
p
-
root
);
memcpy
(
buf
,
root
,
p
-
root
);
buf
[
p
-
root
]
=
'\0'
;
path
=
buf
;
path
=
buf
;
}
}
if
(
stat
(
path
,
&
st
)
!=
0
||
!
S_ISDIR
(
st
.
st_mode
))
{
if
(
stat
(
path
,
&
st
)
!=
0
||
!
S_ISDIR
(
st
.
st_mode
))
{
die
(
"Invalid root directory:
\"
%s
\"
"
,
root
);
die
(
"Invalid root directory:
[%s]: %s"
,
root
,
strerror
(
errno
)
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment