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
5851ba86
Commit
5851ba86
authored
Mar 11, 2024
by
Brendan Shanks
Committed by
Alexandre Julliard
Mar 11, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Replace sprintf with snprintf/asprintf to avoid deprecation warnings on macOS.
parent
3af1e7df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
unix_wgl.c
dlls/opengl32/unix_wgl.c
+9
-9
No files found.
dlls/opengl32/unix_wgl.c
View file @
5851ba86
...
@@ -318,13 +318,13 @@ static HKEY open_hkcu_key( const char *name )
...
@@ -318,13 +318,13 @@ static HKEY open_hkcu_key( const char *name )
return
0
;
return
0
;
sid
=
((
TOKEN_USER
*
)
sid_data
)
->
User
.
Sid
;
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
,
(
int
)
MAKELONG
(
MAKEWORD
(
sid
->
IdentifierAuthority
.
Value
[
5
],
(
int
)
MAKELONG
(
MAKEWORD
(
sid
->
IdentifierAuthority
.
Value
[
5
],
sid
->
IdentifierAuthority
.
Value
[
4
]
),
sid
->
IdentifierAuthority
.
Value
[
4
]
),
MAKEWORD
(
sid
->
IdentifierAuthority
.
Value
[
3
],
MAKEWORD
(
sid
->
IdentifierAuthority
.
Value
[
3
],
sid
->
IdentifierAuthority
.
Value
[
2
]
)));
sid
->
IdentifierAuthority
.
Value
[
2
]
)));
for
(
i
=
0
;
i
<
sid
->
SubAuthorityCount
;
i
++
)
for
(
i
=
0
;
i
<
sid
->
SubAuthorityCount
;
i
++
)
len
+=
s
printf
(
buffer
+
len
,
"-%u"
,
(
int
)
sid
->
SubAuthority
[
i
]
);
len
+=
s
nprintf
(
buffer
+
len
,
sizeof
(
buffer
)
-
len
,
"-%u"
,
(
int
)
sid
->
SubAuthority
[
i
]
);
ascii_to_unicode
(
bufferW
,
buffer
,
len
);
ascii_to_unicode
(
bufferW
,
buffer
,
len
);
hkcu
=
reg_open_key
(
NULL
,
bufferW
,
len
*
sizeof
(
WCHAR
)
);
hkcu
=
reg_open_key
(
NULL
,
bufferW
,
len
*
sizeof
(
WCHAR
)
);
...
@@ -491,9 +491,9 @@ static const GLubyte *wrap_glGetString( TEB *teb, GLenum name )
...
@@ -491,9 +491,9 @@ static const GLubyte *wrap_glGetString( TEB *teb, GLenum name )
/* 4.4 depends on ARB_buffer_storage, which we don't support on wow64. */
/* 4.4 depends on ARB_buffer_storage, which we don't support on wow64. */
if
(
major
>
4
||
(
major
==
4
&&
minor
>=
4
))
if
(
major
>
4
||
(
major
==
4
&&
minor
>=
4
))
{
{
char
*
str
=
malloc
(
3
+
strlen
(
rest
)
+
1
)
;
char
*
str
=
NULL
;
sprintf
(
str
,
"4.3%s"
,
rest
);
asprintf
(
&
str
,
"4.3%s"
,
rest
);
if
(
InterlockedCompareExchangePointer
(
(
void
**
)
&
ptr
->
u
.
context
->
version_string
,
str
,
NULL
))
if
(
InterlockedCompareExchangePointer
(
(
void
**
)
&
ptr
->
u
.
context
->
version_string
,
str
,
NULL
))
free
(
str
);
free
(
str
);
return
ptr
->
u
.
context
->
version_string
;
return
ptr
->
u
.
context
->
version_string
;
...
@@ -536,7 +536,7 @@ static char *build_extension_list( TEB *teb )
...
@@ -536,7 +536,7 @@ static char *build_extension_list( TEB *teb )
capacity
=
max
(
capacity
,
len
+
strlen
(
extension
)
+
2
);
capacity
=
max
(
capacity
,
len
+
strlen
(
extension
)
+
2
);
if
(
!
(
tmp
=
realloc
(
available_extensions
,
capacity
)))
break
;
if
(
!
(
tmp
=
realloc
(
available_extensions
,
capacity
)))
break
;
available_extensions
=
tmp
;
available_extensions
=
tmp
;
len
+=
s
printf
(
available_extensions
+
len
,
"%s "
,
extension
);
len
+=
s
nprintf
(
available_extensions
+
len
,
capacity
-
len
,
"%s "
,
extension
);
}
}
if
(
len
)
available_extensions
[
len
-
1
]
=
0
;
if
(
len
)
available_extensions
[
len
-
1
]
=
0
;
...
...
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