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
62a1410a
Commit
62a1410a
authored
Jan 05, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix source/destination confusion in vsscanf.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0bdd879f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
string.c
dlls/ntdll/string.c
+12
-12
No files found.
dlls/ntdll/string.c
View file @
62a1410a
...
@@ -1178,19 +1178,19 @@ static int NTDLL_vsscanf( const char *str, const char *format, __ms_va_list ap)
...
@@ -1178,19 +1178,19 @@ static int NTDLL_vsscanf( const char *str, const char *format, __ms_va_list ap)
else
goto
widecharacter
;
else
goto
widecharacter
;
character:
character:
{
/* read single character into char */
{
/* read single character into char */
char
*
str
=
suppress
?
NULL
:
va_arg
(
ap
,
char
*
);
char
*
s
p
tr
=
suppress
?
NULL
:
va_arg
(
ap
,
char
*
);
char
*
pstr
=
s
tr
;
char
*
sptr_beg
=
sp
tr
;
unsigned
size
=
UINT_MAX
;
unsigned
size
=
UINT_MAX
;
if
(
width
==
-
1
)
width
=
1
;
if
(
width
==
-
1
)
width
=
1
;
while
(
width
&&
nch
!=
'\0'
)
while
(
width
&&
nch
!=
'\0'
)
{
{
if
(
!
suppress
)
if
(
!
suppress
)
{
{
*
str
++
=
nch
;
*
s
p
tr
++
=
nch
;
if
(
size
)
size
--
;
if
(
size
)
size
--
;
else
else
{
{
*
pstr
=
0
;
*
sptr_beg
=
0
;
return
rd
;
return
rd
;
}
}
}
}
...
@@ -1202,19 +1202,19 @@ static int NTDLL_vsscanf( const char *str, const char *format, __ms_va_list ap)
...
@@ -1202,19 +1202,19 @@ static int NTDLL_vsscanf( const char *str, const char *format, __ms_va_list ap)
break
;
break
;
widecharacter:
widecharacter:
{
/* read single character into a WCHAR */
{
/* read single character into a WCHAR */
WCHAR
*
str
=
suppress
?
NULL
:
va_arg
(
ap
,
WCHAR
*
);
WCHAR
*
s
p
tr
=
suppress
?
NULL
:
va_arg
(
ap
,
WCHAR
*
);
WCHAR
*
pstr
=
s
tr
;
WCHAR
*
sptr_beg
=
sp
tr
;
unsigned
size
=
UINT_MAX
;
unsigned
size
=
UINT_MAX
;
if
(
width
==
-
1
)
width
=
1
;
if
(
width
==
-
1
)
width
=
1
;
while
(
width
&&
nch
!=
'\0'
)
while
(
width
&&
nch
!=
'\0'
)
{
{
if
(
!
suppress
)
if
(
!
suppress
)
{
{
*
str
++
=
nch
;
*
s
p
tr
++
=
nch
;
if
(
size
)
size
--
;
if
(
size
)
size
--
;
else
else
{
{
*
pstr
=
0
;
*
sptr_beg
=
0
;
return
rd
;
return
rd
;
}
}
}
}
...
@@ -1248,10 +1248,10 @@ static int NTDLL_vsscanf( const char *str, const char *format, __ms_va_list ap)
...
@@ -1248,10 +1248,10 @@ static int NTDLL_vsscanf( const char *str, const char *format, __ms_va_list ap)
break
;
break
;
case
'['
:
case
'['
:
{
{
char
*
str
=
suppress
?
NULL
:
va_arg
(
ap
,
char
*
);
char
*
s
p
tr
=
suppress
?
NULL
:
va_arg
(
ap
,
char
*
);
char
*
sptr
=
s
tr
;
char
*
sptr
_beg
=
sp
tr
;
RTL_BITMAP
bitMask
;
RTL_BITMAP
bitMask
;
ULONG
Mask
[
8
];
ULONG
Mask
[
8
]
=
{
0
}
;
BOOLEAN
invert
=
FALSE
;
/* Set if we are NOT to find the chars */
BOOLEAN
invert
=
FALSE
;
/* Set if we are NOT to find the chars */
unsigned
size
=
UINT_MAX
;
unsigned
size
=
UINT_MAX
;
...
@@ -1312,7 +1312,7 @@ static int NTDLL_vsscanf( const char *str, const char *format, __ms_va_list ap)
...
@@ -1312,7 +1312,7 @@ static int NTDLL_vsscanf( const char *str, const char *format, __ms_va_list ap)
if
(
size
>
1
)
size
--
;
if
(
size
>
1
)
size
--
;
else
else
{
{
*
str
=
0
;
if
(
!
suppress
)
*
sptr_beg
=
0
;
return
rd
;
return
rd
;
}
}
}
}
...
...
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