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
b707a523
Commit
b707a523
authored
Oct 27, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Avoid accessing uninitialized memory in ConvertUrlComponentValue.
Found by valgrind.
parent
c3775d82
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
internet.c
dlls/wininet/internet.c
+6
-3
No files found.
dlls/wininet/internet.c
View file @
b707a523
...
...
@@ -1133,11 +1133,14 @@ static void ConvertUrlComponentValue(LPSTR* lppszComponent, LPDWORD dwComponentL
DWORD
nASCIILength
=
WideCharToMultiByte
(
CP_ACP
,
0
,
lpwszComponent
,
dwwComponentLen
,
NULL
,
0
,
NULL
,
NULL
);
if
(
*
lppszComponent
==
NULL
)
{
int
nASCIIOffset
=
WideCharToMultiByte
(
CP_ACP
,
0
,
lpwszStart
,
lpwszComponent
-
lpwszStart
,
NULL
,
0
,
NULL
,
NULL
);
if
(
lpwszComponent
)
*
lppszComponent
=
(
LPSTR
)
lpszStart
+
nASCIIOffset
;
{
int
offset
=
WideCharToMultiByte
(
CP_ACP
,
0
,
lpwszStart
,
lpwszComponent
-
lpwszStart
,
NULL
,
0
,
NULL
,
NULL
);
*
lppszComponent
=
(
LPSTR
)
lpszStart
+
offset
;
}
else
*
lppszComponent
=
NULL
;
*
dwComponentLen
=
nASCIILength
;
}
else
...
...
@@ -1184,7 +1187,7 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags,
InternetCrackUrlW should not include it */
if
(
dwUrlLength
==
-
1
)
nLength
--
;
lpwszUrl
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
WCHAR
)
*
nLength
);
lpwszUrl
=
HeapAlloc
(
GetProcessHeap
(),
0
,
nLength
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
lpszUrl
,
dwUrlLength
,
lpwszUrl
,
nLength
);
memset
(
&
UCW
,
0
,
sizeof
(
UCW
));
...
...
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