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
90eb14a6
Commit
90eb14a6
authored
Nov 28, 2015
by
Bruno Jesus
Committed by
Alexandre Julliard
Dec 02, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
krnl386.exe16: Skip invalid entries in GetPrivateProfileString16.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c87a78bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
file.c
dlls/krnl386.exe16/file.c
+9
-1
No files found.
dlls/krnl386.exe16/file.c
View file @
90eb14a6
...
...
@@ -539,6 +539,9 @@ INT16 WINAPI GetPrivateProfileString16( LPCSTR section, LPCSTR entry,
LPCSTR
def_val
,
LPSTR
buffer
,
UINT16
len
,
LPCSTR
filename
)
{
TRACE
(
"(%s, %s, %s, %p, %u, %s)
\n
"
,
debugstr_a
(
section
),
debugstr_a
(
entry
),
debugstr_a
(
def_val
),
buffer
,
len
,
debugstr_a
(
filename
));
if
(
!
section
)
{
if
(
buffer
&&
len
)
buffer
[
0
]
=
0
;
...
...
@@ -572,7 +575,12 @@ INT16 WINAPI GetPrivateProfileString16( LPCSTR section, LPCSTR entry,
{
char
*
p
=
strchr
(
src
,
'='
);
if
(
!
p
)
p
=
src
+
strlen
(
src
);
/* A valid entry is formed by name = value */
if
(
!
p
)
{
src
+=
strlen
(
src
)
+
1
;
continue
;
}
if
(
p
-
src
<
len
)
{
memcpy
(
buffer
,
src
,
p
-
src
);
...
...
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