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
046bed65
Commit
046bed65
authored
Oct 23, 2022
by
Bartosz Kosiorek
Committed by
Alexandre Julliard
Oct 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix error handling for strcat_s.
parent
3cb897ff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
string.c
dlls/msvcrt/string.c
+4
-3
No files found.
dlls/msvcrt/string.c
View file @
046bed65
...
...
@@ -1350,9 +1350,9 @@ int CDECL strcpy_s( char* dst, size_t elem, const char* src )
int
CDECL
strcat_s
(
char
*
dst
,
size_t
elem
,
const
char
*
src
)
{
size_t
i
,
j
;
if
(
!
dst
)
return
EINVAL
;
if
(
elem
==
0
)
return
EINVAL
;
if
(
!
src
)
if
(
!
MSVCRT_CHECK_PMT
(
dst
!=
0
)
)
return
EINVAL
;
if
(
!
MSVCRT_CHECK_PMT
(
elem
!=
0
)
)
return
EINVAL
;
if
(
!
MSVCRT_CHECK_PMT
(
src
!=
NULL
)
)
{
dst
[
0
]
=
'\0'
;
return
EINVAL
;
...
...
@@ -1369,6 +1369,7 @@ int CDECL strcat_s( char* dst, size_t elem, const char* src )
}
}
/* Set the first element to 0, not the first element after the skipped part */
MSVCRT_INVALID_PMT
(
"dst[elem] is too small"
,
ERANGE
);
dst
[
0
]
=
'\0'
;
return
ERANGE
;
}
...
...
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