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
33ce8e04
Commit
33ce8e04
authored
Sep 24, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Sep 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Use the wcsdup function instead or reimplementing it.
parent
0a7084f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
19 deletions
+6
-19
edit.c
programs/regedit/edit.c
+1
-2
listview.c
programs/regedit/listview.c
+2
-9
regproc.c
programs/regedit/regproc.c
+3
-8
No files found.
programs/regedit/edit.c
View file @
33ce8e04
...
...
@@ -637,8 +637,7 @@ BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCWSTR keyPath, LPCWSTR newName)
}
else
{
LPWSTR
srcSubKey_copy
;
parentPath
=
malloc
((
lstrlenW
(
keyPath
)
+
1
)
*
sizeof
(
WCHAR
));
lstrcpyW
(
parentPath
,
keyPath
);
parentPath
=
wcsdup
(
keyPath
);
srcSubKey_copy
=
wcsrchr
(
parentPath
,
'\\'
);
*
srcSubKey_copy
=
0
;
srcSubKey
=
srcSubKey_copy
+
1
;
...
...
programs/regedit/listview.c
View file @
33ce8e04
...
...
@@ -73,8 +73,7 @@ BOOL update_listview_path(const WCHAR *path)
{
free
(
g_currentPath
);
g_currentPath
=
malloc
((
lstrlenW
(
path
)
+
1
)
*
sizeof
(
WCHAR
));
lstrcpyW
(
g_currentPath
,
path
);
g_currentPath
=
wcsdup
(
path
);
return
TRUE
;
}
...
...
@@ -154,13 +153,7 @@ int AddEntryToList(HWND hwndLV, WCHAR *Name, DWORD dwValType, void *ValBuf, DWOR
linfo
=
malloc
(
sizeof
(
LINE_INFO
));
linfo
->
dwValType
=
dwValType
;
linfo
->
val_len
=
dwCount
;
if
(
Name
)
{
linfo
->
name
=
malloc
((
lstrlenW
(
Name
)
+
1
)
*
sizeof
(
WCHAR
));
lstrcpyW
(
linfo
->
name
,
Name
);
}
else
linfo
->
name
=
NULL
;
linfo
->
name
=
wcsdup
(
Name
);
if
(
ValBuf
&&
dwCount
)
{
...
...
programs/regedit/regproc.c
View file @
33ce8e04
...
...
@@ -447,10 +447,7 @@ static LONG open_key(struct parser *parser, WCHAR *path)
KEY_ALL_ACCESS
,
NULL
,
&
parser
->
hkey
,
NULL
);
if
(
res
==
ERROR_SUCCESS
)
{
parser
->
key_name
=
malloc
((
lstrlenW
(
path
)
+
1
)
*
sizeof
(
WCHAR
));
lstrcpyW
(
parser
->
key_name
,
path
);
}
parser
->
key_name
=
wcsdup
(
path
);
else
parser
->
hkey
=
NULL
;
...
...
@@ -699,8 +696,7 @@ static WCHAR *quoted_value_name_state(struct parser *parser, WCHAR *pos)
goto
invalid
;
/* copy the value name in case we need to parse multiple lines and the buffer is overwritten */
parser
->
value_name
=
malloc
((
lstrlenW
(
val_name
)
+
1
)
*
sizeof
(
WCHAR
));
lstrcpyW
(
parser
->
value_name
,
val_name
);
parser
->
value_name
=
wcsdup
(
val_name
);
set_state
(
parser
,
DATA_START
);
return
p
;
...
...
@@ -1486,8 +1482,7 @@ static BOOL export_all(WCHAR *file_name, WCHAR *path, BOOL unicode)
return
FALSE
;
}
class_name
=
malloc
((
lstrlenW
(
reg_class_namesW
[
i
])
+
1
)
*
sizeof
(
WCHAR
));
lstrcpyW
(
class_name
,
reg_class_namesW
[
i
]);
class_name
=
wcsdup
(
reg_class_namesW
[
i
]);
export_registry_data
(
fp
,
classes
[
i
],
class_name
,
unicode
);
...
...
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