Merge lp:~tdaitx/whoopsie/lp-1850608-security-regression into lp:whoopsie
- lp-1850608-security-regression
- Merge into trunk
Proposed by
Tiago Stürmer Daitx
Status: | Merged |
---|---|
Merged at revision: | 710 |
Proposed branch: | lp:~tdaitx/whoopsie/lp-1850608-security-regression |
Merge into: | lp:whoopsie |
Diff against target: |
341 lines (+54/-41) 6 files modified
debian/changelog (+8/-0) lib/bson/bson.c (+29/-24) lib/bson/bson.h (+6/-6) lib/bson/encoding.c (+6/-6) lib/bson/encoding.h (+2/-2) src/whoopsie.c (+3/-3) |
To merge this branch: | bzr merge lp:~tdaitx/whoopsie/lp-1850608-security-regression |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brian Murray | Approve | ||
Review via email: mp+375788@code.launchpad.net |
Commit message
Description of the change
This merge request sync whoopsie with the latest release in Focal (0.2.69), fixing the last security update which introduced a bug for big endian archs - it is also a improved fix from the previous release (0.2.68).
Changelog:
* SECURITY REGRESSION: segfault when sending crash report (LP: #1850608)
- use uint32_t instead of size_t and INT32_MAX instead of INT_MAX
as bson expects variable sizes to be 32 bits long.
To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/changelog' | |||
2 | --- debian/changelog 2019-10-30 17:55:35 +0000 | |||
3 | +++ debian/changelog 2019-11-20 20:32:05 +0000 | |||
4 | @@ -1,3 +1,11 @@ | |||
5 | 1 | whoopsie (0.2.69) focal; urgency=medium | ||
6 | 2 | |||
7 | 3 | * SECURITY REGRESSION: segfault when sending crash report (LP: #1850608) | ||
8 | 4 | - use uint32_t instead of size_t and INT32_MAX instead of INT_MAX | ||
9 | 5 | as bson expects variable sizes to be 32 bits long. | ||
10 | 6 | |||
11 | 7 | -- Tiago Stürmer Daitx <tiago.daitx@ubuntu.com> Mon, 04 Nov 2019 23:33:08 +0000 | ||
12 | 8 | |||
13 | 1 | whoopsie (0.2.68) focal; urgency=medium | 9 | whoopsie (0.2.68) focal; urgency=medium |
14 | 2 | 10 | ||
15 | 3 | * lib/bson/bson.c: properly initialize bson_size variable. | 11 | * lib/bson/bson.c: properly initialize bson_size variable. |
16 | 4 | 12 | ||
17 | === modified file 'lib/bson/bson.c' | |||
18 | --- lib/bson/bson.c 2019-10-30 17:55:35 +0000 | |||
19 | +++ lib/bson/bson.c 2019-11-20 20:32:05 +0000 | |||
20 | @@ -24,7 +24,7 @@ | |||
21 | 24 | #include "bson.h" | 24 | #include "bson.h" |
22 | 25 | #include "encoding.h" | 25 | #include "encoding.h" |
23 | 26 | 26 | ||
25 | 27 | const size_t initialBufferSize = 128; | 27 | const uint32_t initialBufferSize = 128; |
26 | 28 | 28 | ||
27 | 29 | /* only need one of these */ | 29 | /* only need one of these */ |
28 | 30 | static const int zero = 0; | 30 | static const int zero = 0; |
29 | @@ -86,8 +86,8 @@ | |||
30 | 86 | b->errstr = NULL; | 86 | b->errstr = NULL; |
31 | 87 | } | 87 | } |
32 | 88 | 88 | ||
35 | 89 | size_t bson_size( const bson *b ) { | 89 | uint32_t bson_size( const bson *b ) { |
36 | 90 | size_t i = 0; | 90 | uint32_t i; |
37 | 91 | if ( ! b || ! b->data ) | 91 | if ( ! b || ! b->data ) |
38 | 92 | return 0; | 92 | return 0; |
39 | 93 | bson_little_endian32( &i, b->data ); | 93 | bson_little_endian32( &i, b->data ); |
40 | @@ -567,7 +567,7 @@ | |||
41 | 567 | BUILDING | 567 | BUILDING |
42 | 568 | ------------------------------ */ | 568 | ------------------------------ */ |
43 | 569 | 569 | ||
45 | 570 | static void _bson_init_size( bson *b, size_t size ) { | 570 | static void _bson_init_size( bson *b, uint32_t size ) { |
46 | 571 | if( size == 0 ) | 571 | if( size == 0 ) |
47 | 572 | b->data = NULL; | 572 | b->data = NULL; |
48 | 573 | else | 573 | else |
49 | @@ -581,7 +581,7 @@ | |||
50 | 581 | _bson_init_size( b, initialBufferSize ); | 581 | _bson_init_size( b, initialBufferSize ); |
51 | 582 | } | 582 | } |
52 | 583 | 583 | ||
54 | 584 | void bson_init_size( bson *b, size_t size ) { | 584 | void bson_init_size( bson *b, uint32_t size ) { |
55 | 585 | _bson_init_size( b, size ); | 585 | _bson_init_size( b, size ); |
56 | 586 | } | 586 | } |
57 | 587 | 587 | ||
58 | @@ -590,7 +590,7 @@ | |||
59 | 590 | b->cur++; | 590 | b->cur++; |
60 | 591 | } | 591 | } |
61 | 592 | 592 | ||
63 | 593 | void bson_append( bson *b, const void *data, size_t len ) { | 593 | void bson_append( bson *b, const void *data, uint32_t len ) { |
64 | 594 | memcpy( b->cur , data , len ); | 594 | memcpy( b->cur , data , len ); |
65 | 595 | b->cur += len; | 595 | b->cur += len; |
66 | 596 | } | 596 | } |
67 | @@ -605,13 +605,13 @@ | |||
68 | 605 | b->cur += 8; | 605 | b->cur += 8; |
69 | 606 | } | 606 | } |
70 | 607 | 607 | ||
73 | 608 | int bson_ensure_space( bson *b, const size_t bytesNeeded ) { | 608 | int bson_ensure_space( bson *b, const uint32_t bytesNeeded ) { |
74 | 609 | size_t pos = b->cur - b->data; | 609 | uint32_t pos = b->cur - b->data; |
75 | 610 | char *orig = b->data; | 610 | char *orig = b->data; |
77 | 611 | size_t new_size; | 611 | uint32_t new_size; |
78 | 612 | 612 | ||
81 | 613 | if ( bytesNeeded > INT_MAX || pos > INT_MAX || b->dataSize > INT_MAX || | 613 | if ( bytesNeeded > INT32_MAX || pos > INT32_MAX || b->dataSize > INT32_MAX || |
82 | 614 | ( INT_MAX - b->dataSize ) < bytesNeeded || ( INT_MAX - pos) < bytesNeeded ) { | 614 | ( INT32_MAX - b->dataSize ) < bytesNeeded || ( INT32_MAX - pos) < bytesNeeded ) { |
83 | 615 | b->err = BSON_SIZE_OVERFLOW; | 615 | b->err = BSON_SIZE_OVERFLOW; |
84 | 616 | return BSON_ERROR; | 616 | return BSON_ERROR; |
85 | 617 | } | 617 | } |
86 | @@ -621,8 +621,8 @@ | |||
87 | 621 | 621 | ||
88 | 622 | new_size = 1.5 * ( b->dataSize + bytesNeeded ); | 622 | new_size = 1.5 * ( b->dataSize + bytesNeeded ); |
89 | 623 | 623 | ||
92 | 624 | if ( new_size > INT_MAX) | 624 | if ( new_size > INT32_MAX) |
93 | 625 | new_size = INT_MAX; | 625 | new_size = INT32_MAX; |
94 | 626 | 626 | ||
95 | 627 | b->data = bson_realloc( b->data, new_size ); | 627 | b->data = bson_realloc( b->data, new_size ); |
96 | 628 | if ( !b->data ) | 628 | if ( !b->data ) |
97 | @@ -635,7 +635,7 @@ | |||
98 | 635 | } | 635 | } |
99 | 636 | 636 | ||
100 | 637 | int bson_finish( bson *b ) { | 637 | int bson_finish( bson *b ) { |
102 | 638 | size_t i; | 638 | uint32_t i; |
103 | 639 | 639 | ||
104 | 640 | if( b->err & BSON_NOT_UTF8 ) | 640 | if( b->err & BSON_NOT_UTF8 ) |
105 | 641 | return BSON_ERROR; | 641 | return BSON_ERROR; |
106 | @@ -659,8 +659,8 @@ | |||
107 | 659 | b->finished = 1; | 659 | b->finished = 1; |
108 | 660 | } | 660 | } |
109 | 661 | 661 | ||
112 | 662 | static int bson_append_estart( bson *b, int type, const char *name, const size_t dataSize ) { | 662 | static int bson_append_estart( bson *b, int type, const char *name, const uint32_t dataSize ) { |
113 | 663 | const size_t len = strlen( name ) + 1; | 663 | const uint32_t len = strlen( name ) + 1; |
114 | 664 | 664 | ||
115 | 665 | if ( b->finished ) { | 665 | if ( b->finished ) { |
116 | 666 | b->err |= BSON_ALREADY_FINISHED; | 666 | b->err |= BSON_ALREADY_FINISHED; |
117 | @@ -726,9 +726,9 @@ | |||
118 | 726 | } | 726 | } |
119 | 727 | 727 | ||
120 | 728 | int bson_append_string_base( bson *b, const char *name, | 728 | int bson_append_string_base( bson *b, const char *name, |
122 | 729 | const char *value, size_t len, bson_type type ) { | 729 | const char *value, uint32_t len, bson_type type ) { |
123 | 730 | 730 | ||
125 | 731 | size_t sl = len + 1; | 731 | uint32_t sl = len + 1; |
126 | 732 | if ( bson_check_string( b, ( const char * )value, sl - 1 ) == BSON_ERROR ) | 732 | if ( bson_check_string( b, ( const char * )value, sl - 1 ) == BSON_ERROR ) |
127 | 733 | return BSON_ERROR; | 733 | return BSON_ERROR; |
128 | 734 | if ( bson_append_estart( b, type, name, 4 + sl ) == BSON_ERROR ) { | 734 | if ( bson_append_estart( b, type, name, 4 + sl ) == BSON_ERROR ) { |
129 | @@ -741,7 +741,12 @@ | |||
130 | 741 | } | 741 | } |
131 | 742 | 742 | ||
132 | 743 | int bson_append_string( bson *b, const char *name, const char *value ) { | 743 | int bson_append_string( bson *b, const char *name, const char *value ) { |
134 | 744 | return bson_append_string_base( b, name, value, strlen ( value ), BSON_STRING ); | 744 | size_t len = strlen ( value ); |
135 | 745 | |||
136 | 746 | if ( len > INT32_MAX ) | ||
137 | 747 | return BSON_ERROR; | ||
138 | 748 | |||
139 | 749 | return bson_append_string_base( b, name, value, len, BSON_STRING ); | ||
140 | 745 | } | 750 | } |
141 | 746 | 751 | ||
142 | 747 | int bson_append_symbol( bson *b, const char *name, const char *value ) { | 752 | int bson_append_symbol( bson *b, const char *name, const char *value ) { |
143 | @@ -835,7 +840,7 @@ | |||
144 | 835 | 840 | ||
145 | 836 | int bson_append_element( bson *b, const char *name_or_null, const bson_iterator *elem ) { | 841 | int bson_append_element( bson *b, const char *name_or_null, const bson_iterator *elem ) { |
146 | 837 | bson_iterator next = *elem; | 842 | bson_iterator next = *elem; |
148 | 838 | size_t size; | 843 | uint32_t size; |
149 | 839 | 844 | ||
150 | 840 | bson_iterator_next( &next ); | 845 | bson_iterator_next( &next ); |
151 | 841 | size = next.cur - elem->cur; | 846 | size = next.cur - elem->cur; |
152 | @@ -845,7 +850,7 @@ | |||
153 | 845 | return BSON_ERROR; | 850 | return BSON_ERROR; |
154 | 846 | bson_append( b, elem->cur, size ); | 851 | bson_append( b, elem->cur, size ); |
155 | 847 | } else { | 852 | } else { |
157 | 848 | size_t data_size = size - 2 - strlen( bson_iterator_key( elem ) ); | 853 | uint32_t data_size = size - 2 - strlen( bson_iterator_key( elem ) ); |
158 | 849 | bson_append_estart( b, elem->cur[0], name_or_null, data_size ); | 854 | bson_append_estart( b, elem->cur[0], name_or_null, data_size ); |
159 | 850 | bson_append( b, bson_iterator_value( elem ), data_size ); | 855 | bson_append( b, bson_iterator_value( elem ), data_size ); |
160 | 851 | } | 856 | } |
161 | @@ -888,7 +893,7 @@ | |||
162 | 888 | 893 | ||
163 | 889 | int bson_append_finish_object( bson *b ) { | 894 | int bson_append_finish_object( bson *b ) { |
164 | 890 | char *start; | 895 | char *start; |
166 | 891 | size_t i; | 896 | uint32_t i; |
167 | 892 | if ( bson_ensure_space( b, 1 ) == BSON_ERROR ) return BSON_ERROR; | 897 | if ( bson_ensure_space( b, 1 ) == BSON_ERROR ) return BSON_ERROR; |
168 | 893 | bson_append_byte( b , 0 ); | 898 | bson_append_byte( b , 0 ); |
169 | 894 | 899 | ||
170 | @@ -914,14 +919,14 @@ | |||
171 | 914 | return old; | 919 | return old; |
172 | 915 | } | 920 | } |
173 | 916 | 921 | ||
175 | 917 | void *bson_malloc( size_t size ) { | 922 | void *bson_malloc( uint32_t size ) { |
176 | 918 | void *p; | 923 | void *p; |
177 | 919 | p = bson_malloc_func( size ); | 924 | p = bson_malloc_func( size ); |
178 | 920 | bson_fatal_msg( !!p, "malloc() failed" ); | 925 | bson_fatal_msg( !!p, "malloc() failed" ); |
179 | 921 | return p; | 926 | return p; |
180 | 922 | } | 927 | } |
181 | 923 | 928 | ||
183 | 924 | void *bson_realloc( void *ptr, size_t size ) { | 929 | void *bson_realloc( void *ptr, uint32_t size ) { |
184 | 925 | void *p; | 930 | void *p; |
185 | 926 | p = bson_realloc_func( ptr, size ); | 931 | p = bson_realloc_func( ptr, size ); |
186 | 927 | bson_fatal_msg( !!p, "realloc() failed" ); | 932 | bson_fatal_msg( !!p, "realloc() failed" ); |
187 | 928 | 933 | ||
188 | === modified file 'lib/bson/bson.h' | |||
189 | --- lib/bson/bson.h 2019-10-30 04:28:50 +0000 | |||
190 | +++ lib/bson/bson.h 2019-11-20 20:32:05 +0000 | |||
191 | @@ -86,7 +86,7 @@ | |||
192 | 86 | typedef struct { | 86 | typedef struct { |
193 | 87 | char *data; | 87 | char *data; |
194 | 88 | char *cur; | 88 | char *cur; |
196 | 89 | size_t dataSize; | 89 | uint32_t dataSize; |
197 | 90 | bson_bool_t finished; | 90 | bson_bool_t finished; |
198 | 91 | int stack[32]; | 91 | int stack[32]; |
199 | 92 | int stackPos; | 92 | int stackPos; |
200 | @@ -119,7 +119,7 @@ | |||
201 | 119 | * | 119 | * |
202 | 120 | * @return the size. | 120 | * @return the size. |
203 | 121 | */ | 121 | */ |
205 | 122 | size_t bson_size( const bson *b ); | 122 | uint32_t bson_size( const bson *b ); |
206 | 123 | 123 | ||
207 | 124 | /** | 124 | /** |
208 | 125 | * Print a string representation of a BSON object. | 125 | * Print a string representation of a BSON object. |
209 | @@ -546,7 +546,7 @@ | |||
210 | 546 | * | 546 | * |
211 | 547 | * @return BSON_OK or BSON_ERROR. | 547 | * @return BSON_OK or BSON_ERROR. |
212 | 548 | */ | 548 | */ |
214 | 549 | void bson_init_size( bson *b, size_t size ); | 549 | void bson_init_size( bson *b, uint32_t size ); |
215 | 550 | 550 | ||
216 | 551 | /** | 551 | /** |
217 | 552 | * Grow a bson object. | 552 | * Grow a bson object. |
218 | @@ -557,7 +557,7 @@ | |||
219 | 557 | * @return BSON_OK or BSON_ERROR with the bson error object set. | 557 | * @return BSON_OK or BSON_ERROR with the bson error object set. |
220 | 558 | * Exits if allocation fails. | 558 | * Exits if allocation fails. |
221 | 559 | */ | 559 | */ |
223 | 560 | int bson_ensure_space( bson *b, const size_t bytesNeeded ); | 560 | int bson_ensure_space( bson *b, const uint32_t bytesNeeded ); |
224 | 561 | 561 | ||
225 | 562 | /** | 562 | /** |
226 | 563 | * Finalize a bson object. | 563 | * Finalize a bson object. |
227 | @@ -930,7 +930,7 @@ | |||
228 | 930 | * | 930 | * |
229 | 931 | * @sa malloc(3) | 931 | * @sa malloc(3) |
230 | 932 | */ | 932 | */ |
232 | 933 | void *bson_malloc( size_t size ); | 933 | void *bson_malloc( uint32_t size ); |
233 | 934 | 934 | ||
234 | 935 | /** | 935 | /** |
235 | 936 | * Changes the size of allocated memory and checks return value, | 936 | * Changes the size of allocated memory and checks return value, |
236 | @@ -943,7 +943,7 @@ | |||
237 | 943 | * | 943 | * |
238 | 944 | * @sa realloc() | 944 | * @sa realloc() |
239 | 945 | */ | 945 | */ |
241 | 946 | void *bson_realloc( void *ptr, size_t size ); | 946 | void *bson_realloc( void *ptr, uint32_t size ); |
242 | 947 | 947 | ||
243 | 948 | /** | 948 | /** |
244 | 949 | * Set a function for error handling. | 949 | * Set a function for error handling. |
245 | 950 | 950 | ||
246 | === modified file 'lib/bson/encoding.c' | |||
247 | --- lib/bson/encoding.c 2019-10-30 04:28:50 +0000 | |||
248 | +++ lib/bson/encoding.c 2019-11-20 20:32:05 +0000 | |||
249 | @@ -67,7 +67,7 @@ | |||
250 | 67 | * If presented with a length > 4, this returns 0. The Unicode | 67 | * If presented with a length > 4, this returns 0. The Unicode |
251 | 68 | * definition of UTF-8 goes up to 4-byte sequences. | 68 | * definition of UTF-8 goes up to 4-byte sequences. |
252 | 69 | */ | 69 | */ |
254 | 70 | static int isLegalUTF8( const unsigned char *source, size_t length ) { | 70 | static int isLegalUTF8( const unsigned char *source, uint32_t length ) { |
255 | 71 | unsigned char a; | 71 | unsigned char a; |
256 | 72 | const unsigned char *srcptr = source + length; | 72 | const unsigned char *srcptr = source + length; |
257 | 73 | switch ( length ) { | 73 | switch ( length ) { |
258 | @@ -102,11 +102,11 @@ | |||
259 | 102 | } | 102 | } |
260 | 103 | 103 | ||
261 | 104 | static int bson_validate_string( bson *b, const unsigned char *string, | 104 | static int bson_validate_string( bson *b, const unsigned char *string, |
263 | 105 | const size_t length, const char check_utf8, const char check_dot, | 105 | const uint32_t length, const char check_utf8, const char check_dot, |
264 | 106 | const char check_dollar ) { | 106 | const char check_dollar ) { |
265 | 107 | 107 | ||
268 | 108 | size_t position = 0; | 108 | uint32_t position = 0; |
269 | 109 | size_t sequence_length = 1; | 109 | uint32_t sequence_length = 1; |
270 | 110 | 110 | ||
271 | 111 | if( check_dollar && string[0] == '$' ) { | 111 | if( check_dollar && string[0] == '$' ) { |
272 | 112 | b->err |= BSON_FIELD_INIT_DOLLAR; | 112 | b->err |= BSON_FIELD_INIT_DOLLAR; |
273 | @@ -136,13 +136,13 @@ | |||
274 | 136 | 136 | ||
275 | 137 | 137 | ||
276 | 138 | int bson_check_string( bson *b, const char *string, | 138 | int bson_check_string( bson *b, const char *string, |
278 | 139 | const size_t length ) { | 139 | const uint32_t length ) { |
279 | 140 | 140 | ||
280 | 141 | return bson_validate_string( b, ( const unsigned char * )string, length, 1, 0, 0 ); | 141 | return bson_validate_string( b, ( const unsigned char * )string, length, 1, 0, 0 ); |
281 | 142 | } | 142 | } |
282 | 143 | 143 | ||
283 | 144 | int bson_check_field_name( bson *b, const char *string, | 144 | int bson_check_field_name( bson *b, const char *string, |
285 | 145 | const size_t length ) { | 145 | const uint32_t length ) { |
286 | 146 | 146 | ||
287 | 147 | return bson_validate_string( b, ( const unsigned char * )string, length, 1, 1, 1 ); | 147 | return bson_validate_string( b, ( const unsigned char * )string, length, 1, 1, 1 ); |
288 | 148 | } | 148 | } |
289 | 149 | 149 | ||
290 | === modified file 'lib/bson/encoding.h' | |||
291 | --- lib/bson/encoding.h 2019-10-30 04:28:50 +0000 | |||
292 | +++ lib/bson/encoding.h 2019-11-20 20:32:05 +0000 | |||
293 | @@ -35,7 +35,7 @@ | |||
294 | 35 | * Set the value of b->err appropriately. | 35 | * Set the value of b->err appropriately. |
295 | 36 | */ | 36 | */ |
296 | 37 | int bson_check_field_name( bson *b, const char *string, | 37 | int bson_check_field_name( bson *b, const char *string, |
298 | 38 | const size_t length ); | 38 | const uint32_t length ); |
299 | 39 | 39 | ||
300 | 40 | /** | 40 | /** |
301 | 41 | * Check that a string is valid UTF8. Sets the buffer bit field appropriately. | 41 | * Check that a string is valid UTF8. Sets the buffer bit field appropriately. |
302 | @@ -48,7 +48,7 @@ | |||
303 | 48 | * Sets b->err on error. | 48 | * Sets b->err on error. |
304 | 49 | */ | 49 | */ |
305 | 50 | bson_bool_t bson_check_string( bson *b, const char *string, | 50 | bson_bool_t bson_check_string( bson *b, const char *string, |
307 | 51 | const size_t length ); | 51 | const uint32_t length ); |
308 | 52 | 52 | ||
309 | 53 | MONGO_EXTERN_C_END | 53 | MONGO_EXTERN_C_END |
310 | 54 | #endif | 54 | #endif |
311 | 55 | 55 | ||
312 | === modified file 'src/whoopsie.c' | |||
313 | --- src/whoopsie.c 2019-10-30 04:28:50 +0000 | |||
314 | +++ src/whoopsie.c 2019-11-20 20:32:05 +0000 | |||
315 | @@ -261,7 +261,7 @@ | |||
316 | 261 | 261 | ||
317 | 262 | gboolean | 262 | gboolean |
318 | 263 | bsonify (GHashTable* report, bson* b, const char** bson_message, | 263 | bsonify (GHashTable* report, bson* b, const char** bson_message, |
320 | 264 | size_t* bson_message_len) | 264 | uint32_t* bson_message_len) |
321 | 265 | { | 265 | { |
322 | 266 | /* Attempt to convert a #GHashTable of the report into a BSON string. | 266 | /* Attempt to convert a #GHashTable of the report into a BSON string. |
323 | 267 | * On error return %FALSE. */ | 267 | * On error return %FALSE. */ |
324 | @@ -295,7 +295,7 @@ | |||
325 | 295 | } | 295 | } |
326 | 296 | 296 | ||
327 | 297 | int | 297 | int |
329 | 298 | upload_report (const char* message_data, size_t message_len, GString *s) | 298 | upload_report (const char* message_data, uint32_t message_len, GString *s) |
330 | 299 | { | 299 | { |
331 | 300 | CURL* curl = NULL; | 300 | CURL* curl = NULL; |
332 | 301 | CURLcode result_code = 0; | 301 | CURLcode result_code = 0; |
333 | @@ -665,7 +665,7 @@ | |||
334 | 665 | { | 665 | { |
335 | 666 | GHashTable* report = NULL; | 666 | GHashTable* report = NULL; |
336 | 667 | gboolean success = FALSE; | 667 | gboolean success = FALSE; |
338 | 668 | size_t message_len = 0; | 668 | uint32_t message_len = 0; |
339 | 669 | const char* message_data = NULL; | 669 | const char* message_data = NULL; |
340 | 670 | GError* error = NULL; | 670 | GError* error = NULL; |
341 | 671 | bson b[1]; | 671 | bson b[1]; |