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
f900ed14
Commit
f900ed14
authored
Apr 12, 2012
by
Ilya Basin
Committed by
Alexandre Julliard
Apr 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Fix buffer size when exporting binary values.
parent
1d2cd065
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
regproc.c
programs/regedit/regproc.c
+5
-4
No files found.
programs/regedit/regproc.c
View file @
f900ed14
...
...
@@ -1018,12 +1018,13 @@ static void REGPROC_export_binary(WCHAR **line_buf, DWORD *line_buf_size, DWORD
/* - The 2 spaces that concat places at the start of the
* line effectively reduce the space available for data.
* - If the value name and hex prefix are very long
* ( > REG_FILE_HEX_LINE_LEN) then we may overestimate
* ( > REG_FILE_HEX_LINE_LEN) or *line_len divides
* without a remainder then we may overestimate
* the needed number of lines by one. But that's ok.
* - The trailing
linefeed
takes the place of a comma so
*
it's accounted for already.
* - The trailing
'\r'
takes the place of a comma so
*
we only need to add 1 for the trailing '\n'
*/
*
line_len
+=
*
line_len
/
(
REG_FILE_HEX_LINE_LEN
-
concat_prefix
)
*
concat_len
;
*
line_len
+=
*
line_len
/
(
REG_FILE_HEX_LINE_LEN
-
concat_prefix
)
*
concat_len
+
1
;
REGPROC_resize_char_buffer
(
line_buf
,
line_buf_size
,
*
line_len
);
lstrcpyW
(
*
line_buf
+
hex_pos
,
hex_prefix
);
if
(
value_size
)
...
...
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