[pkg-wine-party] [SCM] Debian Wine packaging branch, wheezy, updated. wine-1.4-7-302-gb61b690
Alexandre Julliard
julliard at winehq.org
Sun Jun 17 20:03:14 UTC 2012
The following commit has been merged in the wheezy branch:
commit d7a97ce89bba1e11f7c3a2dd5d996f81b48ee359
Author: Ilya Basin <basinilya at gmail.com>
Date: Thu Apr 12 18:10:59 2012 +0400
regedit: Fix buffer size when exporting binary values.
(cherry picked from commit f900ed1474b0fd05dbf0a11907d0bf0682fff979)
diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c
index 1a87442..f82d793 100644
--- a/programs/regedit/regproc.c
+++ b/programs/regedit/regproc.c
@@ -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)
--
Debian Wine packaging
More information about the pkg-wine-party
mailing list