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
26201ca9
Commit
26201ca9
authored
Oct 20, 2023
by
Brendan Shanks
Committed by
Alexandre Julliard
Oct 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac.drv: Replace sprintf with snprintf to avoid deprecation warnings.
parent
4a05c631
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
clipboard.c
dlls/winemac.drv/clipboard.c
+1
-1
keyboard.c
dlls/winemac.drv/keyboard.c
+1
-1
macdrv_main.c
dlls/winemac.drv/macdrv_main.c
+2
-2
mouse.c
dlls/winemac.drv/mouse.c
+1
-1
No files found.
dlls/winemac.drv/clipboard.c
View file @
26201ca9
...
...
@@ -569,7 +569,7 @@ static void *import_html(CFDataRef data, size_t *ret_size)
if
((
ret
=
malloc
(
total
)))
{
char
*
p
=
ret
;
p
+=
s
printf
(
p
,
header
,
total
-
1
,
len
,
len
+
size
+
1
/* include the final \n in the data */
);
p
+=
s
nprintf
(
p
,
total
,
header
,
total
-
1
,
len
,
len
+
size
+
1
/* include the final \n in the data */
);
CFDataGetBytes
(
data
,
CFRangeMake
(
0
,
size
),
(
UInt8
*
)
p
);
strcpy
(
p
+
size
,
trailer
);
*
ret_size
=
total
;
...
...
dlls/winemac.drv/keyboard.c
View file @
26201ca9
...
...
@@ -1361,7 +1361,7 @@ INT macdrv_GetKeyNameText(LONG lparam, LPWSTR buffer, INT size)
if
(
!
len
)
{
char
name
[
16
];
len
=
s
printf
(
name
,
"Key 0x%02x"
,
vkey
);
len
=
s
nprintf
(
name
,
sizeof
(
name
)
,
"Key 0x%02x"
,
vkey
);
len
=
min
(
len
+
1
,
size
);
ascii_to_unicode
(
buffer
,
name
,
len
);
if
(
len
)
buffer
[
--
len
]
=
0
;
...
...
dlls/winemac.drv/macdrv_main.c
View file @
26201ca9
...
...
@@ -131,13 +131,13 @@ HKEY open_hkcu_key(const char *name)
return
0
;
sid
=
((
TOKEN_USER
*
)
sid_data
)
->
User
.
Sid
;
len
=
s
printf
(
buffer
,
"
\\
Registry
\\
User
\\
S-%u-%u"
,
sid
->
Revision
,
len
=
s
nprintf
(
buffer
,
sizeof
(
buffer
)
,
"
\\
Registry
\\
User
\\
S-%u-%u"
,
sid
->
Revision
,
(
unsigned
int
)
MAKELONG
(
MAKEWORD
(
sid
->
IdentifierAuthority
.
Value
[
5
],
sid
->
IdentifierAuthority
.
Value
[
4
]),
MAKEWORD
(
sid
->
IdentifierAuthority
.
Value
[
3
],
sid
->
IdentifierAuthority
.
Value
[
2
])));
for
(
i
=
0
;
i
<
sid
->
SubAuthorityCount
;
i
++
)
len
+=
s
printf
(
buffer
+
len
,
"-%u"
,
(
unsigned
int
)
sid
->
SubAuthority
[
i
]);
len
+=
s
nprintf
(
buffer
+
len
,
sizeof
(
buffer
)
-
len
,
"-%u"
,
(
unsigned
int
)
sid
->
SubAuthority
[
i
]);
ascii_to_unicode
(
bufferW
,
buffer
,
len
);
hkcu
=
reg_open_key
(
NULL
,
bufferW
,
len
*
sizeof
(
WCHAR
));
...
...
dlls/winemac.drv/mouse.c
View file @
26201ca9
...
...
@@ -187,7 +187,7 @@ CFStringRef copy_system_cursor_name(ICONINFOEXW *info)
else
{
char
buf
[
16
];
s
printf
(
buf
,
"%hu"
,
info
->
wResID
);
s
nprintf
(
buf
,
sizeof
(
buf
)
,
"%hu"
,
info
->
wResID
);
asciiz_to_unicode
(
p
,
buf
);
}
...
...
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