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
a18ea3dd
Commit
a18ea3dd
authored
Dec 01, 2005
by
Rein Klazes
Committed by
Alexandre Julliard
Dec 01, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use formatted output in WCMD_setshow_sortenv.
Don't use unsafe vsprintf in WCMD_output.
parent
65ad3f25
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
builtins.c
programs/wcmd/builtins.c
+4
-2
wcmdmain.c
programs/wcmd/wcmdmain.c
+6
-1
No files found.
programs/wcmd/builtins.c
View file @
a18ea3dd
...
...
@@ -792,8 +792,10 @@ static void WCMD_setshow_sortenv(const char *s)
qsort
(
str
,
count
,
sizeof
(
char
*
),
WCMD_compare
);
/* print it */
for
(
i
=
0
;
i
<
count
;
i
++
)
WCMD_output
(
"%s
\n
"
,
str
[
i
]
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
WCMD_output_asis
(
str
[
i
]);
WCMD_output_asis
(
"
\n
"
);
}
LocalFree
(
str
);
}
...
...
programs/wcmd/wcmdmain.c
View file @
a18ea3dd
...
...
@@ -789,10 +789,15 @@ void WCMD_output (const char *format, ...) {
va_list
ap
;
char
string
[
1024
];
int
ret
;
va_start
(
ap
,
format
);
vsprintf
(
string
,
format
,
ap
);
ret
=
vsnprintf
(
string
,
sizeof
(
string
)
,
format
,
ap
);
va_end
(
ap
);
if
(
ret
>=
sizeof
(
string
))
{
WCMD_output_asis
(
"ERR: output truncated in WCMD_output
\n
"
);
string
[
sizeof
(
string
)
-
1
]
=
'\0'
;
}
WCMD_output_asis
(
string
);
}
...
...
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