Merge lp:~vkolesnikov/pbxt/pbxt-bug-534361 into lp:pbxt

Proposed by Vladimir Kolesnikov
Status: Merged
Merged at revision: not available
Proposed branch: lp:~vkolesnikov/pbxt/pbxt-bug-534361
Merge into: lp:pbxt
Diff against target: 42 lines (+9/-1)
3 files modified
ChangeLog (+2/-0)
src/myxt_xt.cc (+5/-0)
src/xactlog_xt.cc (+2/-1)
To merge this branch: bzr merge lp:~vkolesnikov/pbxt/pbxt-bug-534361
Reviewer Review Type Date Requested Status
PBXT Core Pending
Review via email: mp+21382@code.launchpad.net
To post a comment you must log in.
lp:~vkolesnikov/pbxt/pbxt-bug-534361 updated
798. By Vladimir Kolesnikov

Added Kristian's fix for buffer overrun

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2010-03-08 11:43:47 +0000
3+++ ChangeLog 2010-03-16 10:26:31 +0000
4@@ -3,6 +3,8 @@
5
6 ------- 1.0.10i RC4 - Not released yet
7
8+RN312: Fixed bug #534361: Valgrind error: write of uninitialised bytes in xt_flush_indices()
9+
10 RN311: Fixed ilog corruption when running out of disk space during an index flush operation, which lead to corruption of the index.
11
12 ------- 1.0.10h RC4 - 2010-02-25
13
14=== modified file 'src/myxt_xt.cc'
15--- src/myxt_xt.cc 2010-03-02 17:36:27 +0000
16+++ src/myxt_xt.cc 2010-03-16 10:26:31 +0000
17@@ -255,6 +255,11 @@
18 xtWord1 *end;
19 xtWord1 *start;
20
21+#ifdef HAVE_valgrind
22+ if (ind->mi_fix_key)
23+ memset((byte*) key, 0,(size_t) (ind->mi_key_size) );
24+#endif
25+
26 start = key;
27 for (u_int i=0; i<ind->mi_seg_count; i++, keyseg++)
28 {
29
30=== modified file 'src/xactlog_xt.cc'
31--- src/xactlog_xt.cc 2010-01-12 07:26:46 +0000
32+++ src/xactlog_xt.cc 2010-03-16 10:26:31 +0000
33@@ -1140,7 +1140,8 @@
34 part_size = 512 - part_size;
35 xl_write_buffer[xl_write_buf_pos] = XT_LOG_ENT_END_OF_LOG;
36 #ifdef HAVE_valgrind
37- memset(xl_write_buffer + xl_write_buf_pos + 1, 0x66, part_size);
38+ if (part_size > 1)
39+ memset(xl_write_buffer + xl_write_buf_pos + 1, 0x66, part_size - 1);
40 #endif
41 if (!xt_pwrite_file(xl_log_file, xl_write_log_offset, xl_write_buf_pos+part_size, xl_write_buffer, &thread->st_statistics.st_xlog, thread))
42 goto write_failed;

Subscribers

People subscribed via source and target branches