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
3db8af25
Commit
3db8af25
authored
Mar 07, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleview: Fix buffer length passed to Reg* functions (Coverity).
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ba5e12ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
details.c
programs/oleview/details.c
+8
-12
No files found.
programs/oleview/details.c
View file @
3db8af25
...
...
@@ -51,8 +51,8 @@ static void CreateRegRec(HKEY hKey, HTREEITEM parent, WCHAR *wszKeyName, BOOL ad
while
(
TRUE
)
{
lenName
=
sizeof
(
WCHAR
[
MAX_LOAD_STRING
]
)
/
sizeof
(
WCHAR
);
lenData
=
sizeof
(
WCHAR
[
MAX_LOAD_STRING
]
);
lenName
=
sizeof
(
wszName
)
/
sizeof
(
WCHAR
);
lenData
=
sizeof
(
wszData
);
retEnum
=
RegEnumValueW
(
hKey
,
i
,
wszName
,
&
lenName
,
NULL
,
&
valType
,
(
LPBYTE
)
wszData
,
&
lenData
);
...
...
@@ -100,8 +100,7 @@ static void CreateRegRec(HKEY hKey, HTREEITEM parent, WCHAR *wszKeyName, BOOL ad
tvis
.
hParent
=
TVI_ROOT
;
tvis
.
hParent
=
TreeView_InsertItemW
(
details
.
hReg
,
&
tvis
);
lenName
=
sizeof
(
WCHAR
[
MAX_LOAD_STRING
]);
lenName
=
sizeof
(
wszName
);
RegQueryValueW
(
hCurKey
,
NULL
,
wszName
,
(
LONG
*
)
&
lenName
);
RegCloseKey
(
hCurKey
);
...
...
@@ -116,13 +115,12 @@ static void CreateRegRec(HKEY hKey, HTREEITEM parent, WCHAR *wszKeyName, BOOL ad
}
i
=-
1
;
lenName
=
sizeof
(
WCHAR
[
MAX_LOAD_STRING
]);
while
(
TRUE
)
{
i
++
;
if
(
RegEnumKeyW
(
hKey
,
i
,
wszName
,
lenName
)
!=
ERROR_SUCCESS
)
break
;
if
(
RegEnumKeyW
(
hKey
,
i
,
wszName
,
sizeof
(
wszName
)
/
sizeof
(
WCHAR
)
)
!=
ERROR_SUCCESS
)
break
;
if
(
RegOpenKeyW
(
hKey
,
wszName
,
&
hCurKey
)
!=
ERROR_SUCCESS
)
continue
;
...
...
@@ -131,8 +129,7 @@ static void CreateRegRec(HKEY hKey, HTREEITEM parent, WCHAR *wszKeyName, BOOL ad
if
(
addings
&&
!
memcmp
(
wszName
,
wszProgID
,
sizeof
(
WCHAR
[
7
])))
{
lenData
=
sizeof
(
WCHAR
[
MAX_LOAD_STRING
]);
lenData
=
sizeof
(
wszData
);
RegQueryValueW
(
hCurKey
,
NULL
,
wszData
,
(
LONG
*
)
&
lenData
);
RegCloseKey
(
hCurKey
);
...
...
@@ -149,7 +146,7 @@ static void CreateRegRec(HKEY hKey, HTREEITEM parent, WCHAR *wszKeyName, BOOL ad
RegOpenKeyW
(
HKEY_CLASSES_ROOT
,
wszCLSID
,
&
hCurKey
);
lenName
=
sizeof
(
WCHAR
[
MAX_LOAD_STRING
]
);
lenName
=
sizeof
(
wszName
);
RegQueryValueW
(
hCurKey
,
NULL
,
wszName
,
(
LONG
*
)
&
lenName
);
tvis
.
hParent
=
TVI_ROOT
;
...
...
@@ -171,14 +168,13 @@ static void CreateRegRec(HKEY hKey, HTREEITEM parent, WCHAR *wszKeyName, BOOL ad
}
else
if
(
addings
&&
!
memcmp
(
wszName
,
wszTypeLib
,
sizeof
(
WCHAR
[
8
])))
{
lenData
=
sizeof
(
WCHAR
[
MAX_LOAD_STRING
]);
lenData
=
sizeof
(
wszData
);
RegQueryValueW
(
hCurKey
,
NULL
,
wszData
,
(
LONG
*
)
&
lenData
);
RegCloseKey
(
hCurKey
);
RegOpenKeyW
(
HKEY_CLASSES_ROOT
,
wszTypeLib
,
&
hCurKey
);
lenName
=
sizeof
(
WCHAR
[
MAX_LOAD_STRING
]
);
lenName
=
sizeof
(
wszName
);
RegQueryValueW
(
hCurKey
,
NULL
,
wszName
,
(
LONG
*
)
&
lenName
);
tvis
.
hParent
=
TVI_ROOT
;
...
...
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