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
86fb5c7b
Commit
86fb5c7b
authored
Feb 15, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 15, 2023
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Don't crash on NULL argument in getenv.
parent
887e72b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
environ.c
dlls/msvcrt/environ.c
+6
-3
No files found.
dlls/msvcrt/environ.c
View file @
86fb5c7b
...
...
@@ -26,18 +26,21 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msvcrt
);
/*********************************************************************
*
getenv (MSVCRT.@)
*
getenv (MSVCRT.@)
*/
char
*
CDECL
getenv
(
const
char
*
name
)
{
char
**
env
;
unsigned
int
length
=
strlen
(
name
);
size_t
len
;
if
(
!
MSVCRT_CHECK_PMT
(
name
!=
NULL
))
return
NULL
;
len
=
strlen
(
name
);
for
(
env
=
MSVCRT__environ
;
*
env
;
env
++
)
{
char
*
str
=
*
env
;
char
*
pos
=
strchr
(
str
,
'='
);
if
(
pos
&&
((
pos
-
str
)
==
len
gth
)
&&
!
_strnicmp
(
str
,
name
,
length
))
if
(
pos
&&
((
pos
-
str
)
==
len
)
&&
!
_strnicmp
(
str
,
name
,
len
))
{
TRACE
(
"(%s): got %s
\n
"
,
debugstr_a
(
name
),
debugstr_a
(
pos
+
1
));
return
pos
+
1
;
...
...
Vitaly Lipatov
@lav
mentioned in commit
8d2a7f6b
·
Feb 25, 2024
mentioned in commit
8d2a7f6b
mentioned in commit 8d2a7f6b64d68229f826a11caaa1f9e76afe5249
Toggle commit list
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