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
ed821879
Commit
ed821879
authored
Apr 02, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed length handling in RtlUnicodeStringToAnsi/OemString.
parent
7ccf8bc8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
rtlstr.c
dlls/ntdll/rtlstr.c
+8
-8
No files found.
dlls/ntdll/rtlstr.c
View file @
ed821879
...
...
@@ -401,13 +401,13 @@ NTSTATUS WINAPI RtlUnicodeStringToAnsiString( STRING *ansi,
NTSTATUS
ret
=
STATUS_SUCCESS
;
DWORD
len
=
RtlUnicodeStringToAnsiSize
(
uni
);
ansi
->
Length
=
len
;
ansi
->
Length
=
len
-
1
;
if
(
doalloc
)
{
ansi
->
MaximumLength
=
len
+
1
;
if
(
!
(
ansi
->
Buffer
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
len
+
1
)))
return
STATUS_NO_MEMORY
;
ansi
->
MaximumLength
=
len
;
if
(
!
(
ansi
->
Buffer
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
len
)))
return
STATUS_NO_MEMORY
;
}
else
if
(
ansi
->
MaximumLength
<
=
len
)
else
if
(
ansi
->
MaximumLength
<
len
)
{
if
(
!
ansi
->
MaximumLength
)
return
STATUS_BUFFER_OVERFLOW
;
ansi
->
Length
=
ansi
->
MaximumLength
-
1
;
...
...
@@ -434,13 +434,13 @@ NTSTATUS WINAPI RtlUnicodeStringToOemString( STRING *oem,
NTSTATUS
ret
=
STATUS_SUCCESS
;
DWORD
len
=
RtlUnicodeStringToOemSize
(
uni
);
oem
->
Length
=
len
;
oem
->
Length
=
len
-
1
;
if
(
doalloc
)
{
oem
->
MaximumLength
=
len
+
1
;
if
(
!
(
oem
->
Buffer
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
len
+
1
)))
return
STATUS_NO_MEMORY
;
oem
->
MaximumLength
=
len
;
if
(
!
(
oem
->
Buffer
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
len
)))
return
STATUS_NO_MEMORY
;
}
else
if
(
oem
->
MaximumLength
<
=
len
)
else
if
(
oem
->
MaximumLength
<
len
)
{
if
(
!
oem
->
MaximumLength
)
return
STATUS_BUFFER_OVERFLOW
;
oem
->
Length
=
oem
->
MaximumLength
-
1
;
...
...
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