Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
9c551448
Commit
9c551448
authored
Jul 05, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Prevent infinite symlink recursion in lookup_named_object().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
24823146
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
object.c
server/object.c
+10
-0
No files found.
server/object.c
View file @
9c551448
...
...
@@ -233,6 +233,7 @@ static void free_object( struct object *obj )
struct
object
*
lookup_named_object
(
struct
object
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
struct
unicode_str
*
name_left
)
{
static
int
recursion_count
;
struct
object
*
obj
,
*
parent
;
struct
unicode_str
name_tmp
=
*
name
,
*
ptr
=
&
name_tmp
;
...
...
@@ -261,6 +262,13 @@ struct object *lookup_named_object( struct object *root, const struct unicode_st
if
(
!
name_tmp
.
len
)
ptr
=
NULL
;
/* special case for empty path */
if
(
recursion_count
>
32
)
{
set_error
(
STATUS_INVALID_PARAMETER
);
release_object
(
parent
);
return
NULL
;
}
recursion_count
++
;
clear_error
();
while
((
obj
=
parent
->
ops
->
lookup_name
(
parent
,
ptr
,
attr
,
root
)))
...
...
@@ -269,6 +277,8 @@ struct object *lookup_named_object( struct object *root, const struct unicode_st
release_object
(
parent
);
parent
=
obj
;
}
recursion_count
--
;
if
(
get_error
())
{
release_object
(
parent
);
...
...
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