Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
9ec5be2c
Commit
9ec5be2c
authored
Jul 14, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use malloc() to allocate the buffer in server_get_unix_name().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1037bf54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
file.c
dlls/ntdll/unix/file.c
+7
-8
No files found.
dlls/ntdll/unix/file.c
View file @
9ec5be2c
...
...
@@ -1777,8 +1777,7 @@ static NTSTATUS server_get_unix_name( HANDLE handle, char **unix_name )
for
(;;)
{
name
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
size
+
1
);
if
(
!
name
)
return
STATUS_NO_MEMORY
;
if
(
!
(
name
=
malloc
(
size
+
1
)))
return
STATUS_NO_MEMORY
;
SERVER_START_REQ
(
get_handle_unix_name
)
{
...
...
@@ -1795,7 +1794,7 @@ static NTSTATUS server_get_unix_name( HANDLE handle, char **unix_name )
*
unix_name
=
name
;
break
;
}
RtlFreeHeap
(
GetProcessHeap
(),
0
,
name
);
free
(
name
);
if
(
ret
!=
STATUS_BUFFER_OVERFLOW
)
break
;
}
return
ret
;
...
...
@@ -1962,7 +1961,7 @@ static NTSTATUS get_mountmgr_fs_info( HANDLE handle, int fd, struct mountmgr_uni
if
((
status
=
server_get_unix_name
(
handle
,
&
unix_name
)))
return
status
;
letter
=
find_dos_device
(
unix_name
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
unix_name
);
free
(
unix_name
);
if
(
letter
==
-
1
)
{
...
...
@@ -3985,7 +3984,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
info
->
AlignmentInformation
.
AlignmentRequirement
=
1
;
/* FIXME */
io
->
u
.
Status
=
fill_name_info
(
unix_name
,
&
info
->
NameInformation
,
&
name_len
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
unix_name
);
free
(
unix_name
);
io
->
Information
=
FIELD_OFFSET
(
FILE_ALL_INFORMATION
,
NameInformation
.
FileName
)
+
name_len
;
}
}
...
...
@@ -4037,7 +4036,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
{
LONG
name_len
=
len
-
FIELD_OFFSET
(
FILE_NAME_INFORMATION
,
FileName
);
io
->
u
.
Status
=
fill_name_info
(
unix_name
,
info
,
&
name_len
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
unix_name
);
free
(
unix_name
);
io
->
Information
=
FIELD_OFFSET
(
FILE_NAME_INFORMATION
,
FileName
)
+
name_len
;
}
}
...
...
@@ -4072,7 +4071,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
info
->
EndOfFile
=
std
.
EndOfFile
;
info
->
FileAttributes
=
basic
.
FileAttributes
;
}
RtlFreeHeap
(
GetProcessHeap
(),
0
,
unix_name
);
free
(
unix_name
);
}
}
break
;
...
...
@@ -6395,7 +6394,7 @@ NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_clas
if
(
used_len
)
*
used_len
=
sizeof
(
*
p
)
+
size
;
free
(
nt_name
);
}
RtlFreeHeap
(
GetProcessHeap
(),
0
,
unix_name
);
free
(
unix_name
);
break
;
}
else
if
(
status
!=
STATUS_OBJECT_TYPE_MISMATCH
)
break
;
...
...
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