1 diff -up openchange-openchange-2.3-VULCAN/libexchange2ical/exchange2ical_property.c.covscan openchange-openchange-2.3-VULCAN/libexchange2ical/exchange2ical_property.c
2 --- openchange-openchange-2.3-VULCAN/libexchange2ical/exchange2ical_property.c.covscan 2018-07-19 13:53:41.281450703 +0200
3 +++ openchange-openchange-2.3-VULCAN/libexchange2ical/exchange2ical_property.c 2018-07-19 13:53:41.285450703 +0200
4 @@ -53,6 +53,7 @@ static void openchange_all_string_sub(ch
12 @@ -68,6 +69,7 @@ static const struct RRULE_byday RRULE_by
18 static const char *get_filename(const char *filename)
20 diff -up openchange-openchange-2.3-VULCAN/libexchange2ical/exchange2ical_utils.c.covscan openchange-openchange-2.3-VULCAN/libexchange2ical/exchange2ical_utils.c
21 --- openchange-openchange-2.3-VULCAN/libexchange2ical/exchange2ical_utils.c.covscan 2018-07-19 13:53:41.281450703 +0200
22 +++ openchange-openchange-2.3-VULCAN/libexchange2ical/exchange2ical_utils.c 2018-07-19 13:53:41.285450703 +0200
23 @@ -232,7 +232,7 @@ uint32_t get_exchange_rdfDays_from_ical(
25 struct icaltimetype get_icaltimetype_from_tm(struct tm *tm)
27 - struct icaltimetype tt;
28 + struct icaltimetype tt = icaltime_null_time ();
30 tt.year = tm->tm_year+1900;
31 tt.month = tm->tm_mon+1;
32 @@ -259,7 +259,7 @@ struct icaltimetype get_icaltimetype_fro
34 struct icaltimetype get_icaldate_from_tm(struct tm *tm)
36 - struct icaltimetype tt;
37 + struct icaltimetype tt = icaltime_null_time ();
39 tt.year = tm->tm_year+1900;
40 tt.month = tm->tm_mon+1;
41 @@ -292,7 +293,7 @@ struct tm *get_tm_from_FILETIME(const st
43 struct icaltimetype get_icaltime_from_FILETIME(const struct FILETIME *ft)
45 - struct icaltimetype tt;
46 + struct icaltimetype tt = icaltime_null_time ();
48 struct timeval temp_timeval;
50 @@ -317,7 +318,7 @@ struct icaltimetype get_icaltime_from_FI
52 struct icaltimetype get_icaltime_from_FILETIME_UTC(const struct FILETIME *ft)
54 - struct icaltimetype tt;
55 + struct icaltimetype tt = icaltime_null_time ();
57 struct timeval temp_timeval;
59 @@ -342,7 +343,7 @@ struct icaltimetype get_icaltime_from_FI
61 struct icaltimetype get_icaldate_from_FILETIME(const struct FILETIME *ft)
63 - struct icaltimetype tt;
64 + struct icaltimetype tt = icaltime_null_time ();
66 struct timeval temp_timeval;
68 @@ -373,7 +374,7 @@ struct icaltimetype get_icaldate_from_FI
70 struct icaltimetype get_icaldate_from_GlobalObjectId(struct GlobalObjectId *GlobalObjectId)
72 - struct icaltimetype tt;
73 + struct icaltimetype tt = icaltime_null_time ();
74 tt.year = GlobalObjectId->YH;
75 tt.year = tt.year <<8;
76 tt.year |= GlobalObjectId->YL;
77 @@ -513,7 +514,10 @@ uint32_t get_minutes_from_icaltimetype(i
83 + if (icaltime_is_null_time(icaltime) || !icaltime_is_valid_time(icaltime))
86 tm.tm_year = icaltime.year - 1900;
87 tm.tm_mon = icaltime.month - 1;
88 tm.tm_mday = icaltime.day;
89 diff -up openchange-openchange-2.3-VULCAN/libexchange2ical/ical2exchange_property.c.covscan openchange-openchange-2.3-VULCAN/libexchange2ical/ical2exchange_property.c
90 --- openchange-openchange-2.3-VULCAN/libexchange2ical/ical2exchange_property.c.covscan 2015-05-16 17:22:04.000000000 +0200
91 +++ openchange-openchange-2.3-VULCAN/libexchange2ical/ical2exchange_property.c 2018-07-19 13:53:41.286450703 +0200
92 @@ -147,7 +147,6 @@ void ical2exchange_property_CATEGORIES(s
93 struct StringArray_r *sArray;
94 char **stringArray = NULL;
98 icalproperty *categoriesProp;
100 @@ -160,8 +159,10 @@ void ical2exchange_property_CATEGORIES(s
101 categoriesProp = icalcomponent_get_first_property(ical2exchange->categoriesEvent, ICAL_CATEGORIES_PROPERTY);
103 while(categoriesProp){
105 - value = strdup(icalproperty_get_categories(categoriesProp));
106 + const char *categories = icalproperty_get_categories(categoriesProp);
109 + value = strdup(categories ? categories : "");
110 tok = strtok(value, ",");
113 @@ -185,6 +186,7 @@ void ical2exchange_property_CATEGORIES(s
115 categoriesProp = icalcomponent_get_next_property(ical2exchange->categoriesEvent, ICAL_CATEGORIES_PROPERTY);
119 sArray->lppszA= (const char **) stringArray;
121 @@ -519,6 +521,7 @@ void ical2exchange_property_RRULE_EXDATE
123 ritr = icalrecur_iterator_new(irt,dtstart);
124 next=icalrecur_iterator_next(ritr);
125 + last = icaltime_null_time();
127 while (!icaltime_is_null_time(next)){
129 diff -up openchange-openchange-2.3-VULCAN/libmapi++/examples/foldertree.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/examples/foldertree.cpp
130 --- openchange-openchange-2.3-VULCAN/libmapi++/examples/foldertree.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
131 +++ openchange-openchange-2.3-VULCAN/libmapi++/examples/foldertree.cpp 2018-07-19 13:53:41.286450703 +0200
132 @@ -65,12 +65,12 @@ int main ()
136 - catch (libmapipp::mapi_exception e) // Catch any MAPI exceptions
137 + catch (libmapipp::mapi_exception &e) // Catch any MAPI exceptions
139 std::cout << "MAPI Exception in main: " << e.what()
142 - catch (std::runtime_error e) // Catch any other runtime exceptions
143 + catch (std::runtime_error &e) // Catch any other runtime exceptions
145 std::cout << "std::runtime_error exception in main: "
146 << e.what() << std::endl;
147 diff -up openchange-openchange-2.3-VULCAN/libmapi++/examples/messages.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/examples/messages.cpp
148 --- openchange-openchange-2.3-VULCAN/libmapi++/examples/messages.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
149 +++ openchange-openchange-2.3-VULCAN/libmapi++/examples/messages.cpp 2018-07-19 13:53:41.286450703 +0200
150 @@ -61,12 +61,12 @@ int main ()
154 - catch (libmapipp::mapi_exception e) // Catch any MAPI exceptions
155 + catch (libmapipp::mapi_exception &e) // Catch any MAPI exceptions
157 std::cout << "MAPI Exception in main: " << e.what()
160 - catch (std::runtime_error e) // Catch any other runtime exceptions
161 + catch (std::runtime_error &e) // Catch any other runtime exceptions
163 std::cout << "std::runtime_error exception in main: "
164 << e.what() << std::endl;
165 diff -up openchange-openchange-2.3-VULCAN/libmapi/FXICS.c.covscan openchange-openchange-2.3-VULCAN/libmapi/FXICS.c
166 --- openchange-openchange-2.3-VULCAN/libmapi/FXICS.c.covscan 2015-05-16 17:22:04.000000000 +0200
167 +++ openchange-openchange-2.3-VULCAN/libmapi/FXICS.c 2018-07-19 13:53:41.286450703 +0200
168 @@ -800,6 +800,7 @@ _PUBLIC_ enum MAPISTATUS FXGetBuffer(map
169 if ((retval = mapi_object_get_logon_id(obj_source_context, &logon_id)) != MAPI_E_SUCCESS)
172 + memset(&request, 0, sizeof(struct FastTransferSourceGetBuffer_req));
173 mem_ctx = talloc_named(session, 0, "FXGetBuffer");
176 diff -up openchange-openchange-2.3-VULCAN/libmapi/idset.c.covscan openchange-openchange-2.3-VULCAN/libmapi/idset.c
177 --- openchange-openchange-2.3-VULCAN/libmapi/idset.c.covscan 2015-05-16 17:22:04.000000000 +0200
178 +++ openchange-openchange-2.3-VULCAN/libmapi/idset.c 2018-07-19 13:53:41.286450703 +0200
179 @@ -383,6 +383,7 @@ _PUBLIC_ struct idset *IDSET_parse(TALLO
184 globset.length = buffer.length - 16;
185 globset.data = (uint8_t *) buffer.data + 16;
186 idset->ranges = GLOBSET_parse(idset, globset, &idset->range_count, &byte_count);
187 @@ -1182,7 +1183,8 @@ _PUBLIC_ void RAWIDSET_push_eid(struct r
190 glob_idset = RAWIDSET_make(rawidset->mem_ctx, true, rawidset->single);
191 - last_glob_idset->next = glob_idset;
192 + if (last_glob_idset)
193 + last_glob_idset->next = glob_idset;
195 glob_idset->repl.id = eid_id;
197 diff -up openchange-openchange-2.3-VULCAN/libmapi/IMAPIProp.c.covscan openchange-openchange-2.3-VULCAN/libmapi/IMAPIProp.c
198 --- openchange-openchange-2.3-VULCAN/libmapi/IMAPIProp.c.covscan 2015-05-16 17:22:04.000000000 +0200
199 +++ openchange-openchange-2.3-VULCAN/libmapi/IMAPIProp.c 2018-07-19 13:53:41.287450703 +0200
200 @@ -1122,6 +1122,7 @@ _PUBLIC_ enum MAPISTATUS QueryNamedPrope
204 + memset(&request, 0, sizeof(struct QueryNamedProperties_req));
205 mem_ctx = talloc_named(session, 0, "QueryNamesFromIDs");
208 diff -up openchange-openchange-2.3-VULCAN/libmapi/IMAPISupport.c.covscan openchange-openchange-2.3-VULCAN/libmapi/IMAPISupport.c
209 --- openchange-openchange-2.3-VULCAN/libmapi/IMAPISupport.c.covscan 2015-05-16 17:22:04.000000000 +0200
210 +++ openchange-openchange-2.3-VULCAN/libmapi/IMAPISupport.c 2018-07-19 13:53:41.287450703 +0200
211 @@ -101,6 +101,7 @@ _PUBLIC_ enum MAPISTATUS Subscribe(mapi_
212 if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
215 + memset(&request, 0, sizeof(struct RegisterNotification_req));
216 mem_ctx = talloc_named(session, 0, "Subscribe");
218 /* Fill the Subscribe operation */
219 diff -up openchange-openchange-2.3-VULCAN/libmapi/IMessage.c.covscan openchange-openchange-2.3-VULCAN/libmapi/IMessage.c
220 --- openchange-openchange-2.3-VULCAN/libmapi/IMessage.c.covscan 2015-05-16 17:22:04.000000000 +0200
221 +++ openchange-openchange-2.3-VULCAN/libmapi/IMessage.c 2018-07-19 13:53:41.287450703 +0200
222 @@ -499,6 +499,8 @@ _PUBLIC_ enum MAPISTATUS SetRecipientTyp
223 enum MAPISTATUS retval;
224 struct SPropValue lpProp;
226 + memset(&lpProp, 0, sizeof(struct SPropValue));
228 lpProp.ulPropTag = PR_RECIPIENT_TYPE;
229 lpProp.value.l = RecipClass;
231 @@ -1648,6 +1650,7 @@ _PUBLIC_ enum MAPISTATUS OpenEmbeddedMes
232 if ((retval = mapi_object_get_logon_id(obj_attach, &logon_id)) != MAPI_E_SUCCESS)
235 + memset(&lpProp, 0, sizeof(struct SPropValue));
236 mem_ctx = talloc_named(session, 0, "OpenEmbeddedMessage");
238 /* Fill the OpenEmbeddedMessage request */
239 diff -up openchange-openchange-2.3-VULCAN/libmapi/IStoreFolder.c.covscan openchange-openchange-2.3-VULCAN/libmapi/IStoreFolder.c
240 --- openchange-openchange-2.3-VULCAN/libmapi/IStoreFolder.c.covscan 2015-05-16 17:22:04.000000000 +0200
241 +++ openchange-openchange-2.3-VULCAN/libmapi/IStoreFolder.c 2018-07-19 13:53:41.287450703 +0200
242 @@ -93,6 +93,7 @@ _PUBLIC_ enum MAPISTATUS OpenMessage(map
243 if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
246 + memset(&lpProp, 0, sizeof(struct SPropValue));
247 mem_ctx = talloc_named(session, 0, "OpenMessage");
249 /* Fill the OpenMessage operation */
250 @@ -232,6 +233,7 @@ _PUBLIC_ enum MAPISTATUS ReloadCachedInf
251 if ((retval = mapi_object_get_logon_id(obj_message, &logon_id)) != MAPI_E_SUCCESS)
254 + memset(&lpProp, 0, sizeof(struct SPropValue));
255 mem_ctx = talloc_named(session, 0, "ReloadCachedInformation");
257 /* Fill the ReloadCachedInformation operation */
258 diff -up openchange-openchange-2.3-VULCAN/libmapi/IStream.c.covscan openchange-openchange-2.3-VULCAN/libmapi/IStream.c
259 --- openchange-openchange-2.3-VULCAN/libmapi/IStream.c.covscan 2015-05-16 17:22:04.000000000 +0200
260 +++ openchange-openchange-2.3-VULCAN/libmapi/IStream.c 2018-07-19 13:53:41.287450703 +0200
261 @@ -183,6 +183,7 @@ _PUBLIC_ enum MAPISTATUS ReadStream(mapi
262 if ((retval = mapi_object_get_logon_id(obj_stream, &logon_id)) != MAPI_E_SUCCESS)
265 + memset(&request, 0, sizeof(struct ReadStream_req));
266 mem_ctx = talloc_named(session, 0, "ReadStream");
269 diff -up openchange-openchange-2.3-VULCAN/libmapi++/src/folder.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/src/folder.cpp
270 --- openchange-openchange-2.3-VULCAN/libmapi++/src/folder.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
271 +++ openchange-openchange-2.3-VULCAN/libmapi++/src/folder.cpp 2018-07-19 13:53:41.287450703 +0200
272 @@ -57,7 +57,7 @@ folder::message_container_type folder::f
273 message_container.push_back(message_shared_ptr(new message(m_session,
275 row_set.aRow[i].lpProps[1].value.d)));
276 - } catch(mapi_exception e) {
277 + } catch(mapi_exception &e) {
278 mapi_object_release(&contents_table);
281 @@ -102,7 +102,7 @@ folder::hierarchy_container_type folder:
283 hierarchy_container.push_back(folder_shared_ptr(new folder(*this,
284 row_set.aRow[i].lpProps[0].value.d)));
285 - } catch(mapi_exception e) {
286 + } catch(mapi_exception &e) {
287 mapi_object_release(&hierarchy_table);
290 diff -up openchange-openchange-2.3-VULCAN/libmapi++/src/message.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/src/message.cpp
291 --- openchange-openchange-2.3-VULCAN/libmapi++/src/message.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
292 +++ openchange-openchange-2.3-VULCAN/libmapi++/src/message.cpp 2018-07-19 13:53:41.287450703 +0200
293 @@ -50,7 +50,7 @@ message::attachment_container_type messa
295 attachment_container.push_back(attachment_shared_ptr(new attachment(*this, row_set.aRow[i].lpProps[0].value.l)));
297 - catch(mapi_exception e) {
298 + catch(mapi_exception &e) {
299 mapi_object_release(&attachment_table);
302 diff -up openchange-openchange-2.3-VULCAN/libmapi++/src/session.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/src/session.cpp
303 --- openchange-openchange-2.3-VULCAN/libmapi++/src/session.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
304 +++ openchange-openchange-2.3-VULCAN/libmapi++/src/session.cpp 2018-07-19 13:53:41.287450703 +0200
305 @@ -61,7 +61,7 @@ void session::login(const std::string& p
306 if (m_profile_name == "") { // if profile is not set, try to get default profile
308 m_profile_name = profile_database().get_default_profile_name();
309 - } catch(mapi_exception e) {
310 + } catch(mapi_exception &e) {
314 @@ -74,7 +74,7 @@ void session::login(const std::string& p
317 m_message_store->open(m_session);
318 - } catch (mapi_exception e) {
319 + } catch (mapi_exception &e) {
323 diff -up openchange-openchange-2.3-VULCAN/libmapi++/tests/attach_test.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/tests/attach_test.cpp
324 --- openchange-openchange-2.3-VULCAN/libmapi++/tests/attach_test.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
325 +++ openchange-openchange-2.3-VULCAN/libmapi++/tests/attach_test.cpp 2018-07-19 13:53:41.287450703 +0200
326 @@ -84,11 +84,11 @@ int main()
328 print_folder_tree(top_folder, mapi_session);
330 - catch (mapi_exception e) // Catch any mapi exceptions
331 + catch (mapi_exception &e) // Catch any mapi exceptions
333 cout << "MAPI Exception @ main: " << e.what() << endl;
335 - catch (std::runtime_error e) // Catch runtime exceptions
336 + catch (std::runtime_error &e) // Catch runtime exceptions
338 cout << "std::runtime_error exception @ main: " << e.what() << endl;
340 diff -up openchange-openchange-2.3-VULCAN/libmapi++/tests/exception_test.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/tests/exception_test.cpp
341 --- openchange-openchange-2.3-VULCAN/libmapi++/tests/exception_test.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
342 +++ openchange-openchange-2.3-VULCAN/libmapi++/tests/exception_test.cpp 2018-07-19 13:53:41.287450703 +0200
343 @@ -12,7 +12,7 @@ int main()
347 - catch (libmapipp::mapi_exception e) {
348 + catch (libmapipp::mapi_exception &e) {
349 std::cout << e.what() << std::endl;
352 diff -up openchange-openchange-2.3-VULCAN/libmapi++/tests/profile_test.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/tests/profile_test.cpp
353 --- openchange-openchange-2.3-VULCAN/libmapi++/tests/profile_test.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
354 +++ openchange-openchange-2.3-VULCAN/libmapi++/tests/profile_test.cpp 2018-07-19 13:53:41.287450703 +0200
356 #define PROFILEDB_NAME_TEMPLATE "/tmp/mapidbXXXXXX"
359 + char *tmpname = NULL, *tmpname2 = NULL;
362 libmapipp::profile_database db;
364 std::cout << "default profile name: " << db.get_default_profile_name() << std::endl;
367 - char *tmpname = (char*) calloc(sizeof(PROFILEDB_NAME_TEMPLATE) + 1, sizeof(char));
368 - strncpy(tmpname, PROFILEDB_NAME_TEMPLATE, sizeof(PROFILEDB_NAME_TEMPLATE));
369 - int ret = mkstemp(tmpname);
372 + tmpname = strdup(PROFILEDB_NAME_TEMPLATE);
373 + ret = mkstemp(tmpname);
375 std::cout << "failed to create temporary file: " << strerror(errno) << std::endl;
377 @@ -45,12 +48,15 @@ int main ()
378 std::cout << "failed to create a temporary profile store" << std::endl;
386 - char *tmpname2 = (char*) calloc(sizeof(PROFILEDB_NAME_TEMPLATE) + 1, sizeof(char));
387 - strncpy(tmpname2, PROFILEDB_NAME_TEMPLATE, sizeof(PROFILEDB_NAME_TEMPLATE));
388 - int ret = mkstemp(tmpname2);
391 + tmpname2 = strdup(PROFILEDB_NAME_TEMPLATE);
392 + ret = mkstemp(tmpname2);
394 std::cout << "failed to create temporary file: " << strerror(errno) << std::endl;
396 @@ -60,19 +66,33 @@ int main ()
397 std::cout << "failed to create a temporary profile store with std::string" << std::endl;
404 std::cout << "finished profile and profile database tests" << std::endl;
406 - catch (libmapipp::mapi_exception e) // Catch any mapi exceptions
407 + catch (libmapipp::mapi_exception &e) // Catch any mapi exceptions
409 std::cout << "MAPI Exception @ main: " << e.what() << std::endl;
411 - catch (std::runtime_error e) // Catch runtime exceptions
412 + catch (std::runtime_error &e) // Catch runtime exceptions
414 std::cout << "std::runtime_error exception @ main: " << e.what() << std::endl;
432 diff -up openchange-openchange-2.3-VULCAN/libmapi++/tests/test.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/tests/test.cpp
433 --- openchange-openchange-2.3-VULCAN/libmapi++/tests/test.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
434 +++ openchange-openchange-2.3-VULCAN/libmapi++/tests/test.cpp 2018-07-19 13:53:41.288450703 +0200
435 @@ -126,11 +126,11 @@ int main ()
437 cout << "finished session" << endl;
439 - catch (mapi_exception e) // Catch any mapi exceptions
440 + catch (mapi_exception &e) // Catch any mapi exceptions
442 cout << "MAPI Exception @ main: " << e.what() << endl;
444 - catch (std::runtime_error e) // Catch runtime exceptions
445 + catch (std::runtime_error &e) // Catch runtime exceptions
447 cout << "std::runtime_error exception @ main: " << e.what() << endl;
449 diff -up openchange-openchange-2.3-VULCAN/libocpf/ocpf_api.c.covscan openchange-openchange-2.3-VULCAN/libocpf/ocpf_api.c
450 --- openchange-openchange-2.3-VULCAN/libocpf/ocpf_api.c.covscan 2015-05-16 17:22:04.000000000 +0200
451 +++ openchange-openchange-2.3-VULCAN/libocpf/ocpf_api.c 2018-07-19 13:53:41.288450703 +0200
452 @@ -316,6 +316,8 @@ int ocpf_propvalue(struct ocpf_context *
453 if (!ocpf || !ocpf->mem_ctx) return OCPF_ERROR;
454 if (!ctx) return OCPF_ERROR;
456 + memset(&lpProps, 0, sizeof(struct SPropValue));
460 /* Sanity check: do not insert the same property twice */
461 diff -up openchange-openchange-2.3-VULCAN/libocpf/ocpf_public.c.covscan openchange-openchange-2.3-VULCAN/libocpf/ocpf_public.c
462 --- openchange-openchange-2.3-VULCAN/libocpf/ocpf_public.c.covscan 2015-05-16 17:22:04.000000000 +0200
463 +++ openchange-openchange-2.3-VULCAN/libocpf/ocpf_public.c 2018-07-19 13:53:41.288450703 +0200
464 @@ -537,6 +537,8 @@ static bool set_external_recipients(TALL
466 struct SPropValue SPropValue;
468 + memset(&SPropValue, 0, sizeof(struct SPropValue));
470 SRowSet->aRow = talloc_realloc(mem_ctx, SRowSet->aRow, struct SRow, SRowSet->cRows + 2);
471 last = SRowSet->cRows;
472 SRowSet->aRow[last].cValues = 0;
473 @@ -626,6 +628,8 @@ _PUBLIC_ enum MAPISTATUS ocpf_set_Recipi
475 MAPI_RETVAL_IF(!ctx->recipients->cRows, MAPI_E_NOT_FOUND, NULL);
477 + memset(&SPropValue, 0, sizeof(struct SPropValue));
479 SPropTagArray = set_SPropTagArray(mem_ctx, 0x8,
482 diff -up openchange-openchange-2.3-VULCAN/ndr_mapi.c.covscan openchange-openchange-2.3-VULCAN/ndr_mapi.c
483 --- openchange-openchange-2.3-VULCAN/ndr_mapi.c.covscan 2018-07-19 13:53:41.276450703 +0200
484 +++ openchange-openchange-2.3-VULCAN/ndr_mapi.c 2018-07-19 13:53:41.288450703 +0200
485 @@ -1310,8 +1310,11 @@ _PUBLIC_ enum ndr_err_code ndr_pull_EcDo
486 NDR_PULL_ALLOC(ndr, r->out.pulTimeStamp);
487 *r->out.pulTimeStamp = *r->in.pulTimeStamp;
488 NDR_PULL_ALLOC(ndr, r->out.pcbAuxOut);
489 - *r->out.pcbAuxOut = *r->in.pcbAuxOut;
491 + if (r->in.pcbAuxOut)
492 + *r->out.pcbAuxOut = *r->in.pcbAuxOut;
494 + *r->out.pcbAuxOut = 0;
497 if (flags & NDR_OUT) {
498 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
499 diff -up openchange-openchange-2.3-VULCAN/script/makepropslist.py.covscan openchange-openchange-2.3-VULCAN/script/makepropslist.py
500 --- openchange-openchange-2.3-VULCAN/script/makepropslist.py.covscan 2015-05-16 17:22:04.000000000 +0200
501 +++ openchange-openchange-2.3-VULCAN/script/makepropslist.py 2018-07-19 13:53:41.288450703 +0200
502 @@ -992,7 +992,7 @@ def check_duplicate_alternative_names():
503 if previous_alternative_names.has_key(altname):
504 print "\tIn section", entry["OXPROPS_Sect"], ", alternative name:", altname, "duplicates name in section", previous_alternative_names[altname]
505 if previous_canonical_names.has_key(altname):
506 - print "\tIn section", entry["OXPROPS_Sect"], ", alternative name:", altname, "duplicates canonical name in section", previous_alternative_names[altname]
507 + print "\tIn section", entry["OXPROPS_Sect"], ", alternative name:", altname, "duplicates canonical name in section", previous_canonical_names[altname]
508 previous_alternative_names[altname] = (entry["OXPROPS_Sect"])
510 def check_duplicate_propids():
511 diff -up openchange-openchange-2.3-VULCAN/testprogs/test_asyncnotif.c.covscan openchange-openchange-2.3-VULCAN/testprogs/test_asyncnotif.c
512 --- openchange-openchange-2.3-VULCAN/testprogs/test_asyncnotif.c.covscan 2015-05-16 17:22:04.000000000 +0200
513 +++ openchange-openchange-2.3-VULCAN/testprogs/test_asyncnotif.c 2018-07-19 13:53:41.288450703 +0200
514 @@ -109,12 +109,16 @@ static int callback(uint16_t Notificatio
516 case fnevMbit|fnevObjectDeleted:
517 OC_DEBUG(0, "[+] Message deleted");
519 case fnevMbit|fnevObjectModified:
520 OC_DEBUG(0, "[+] Message modified");
522 case fnevMbit|fnevObjectMoved:
523 OC_DEBUG(0, "[+] Message moved");
525 case fnevMbit|fnevObjectCopied:
526 OC_DEBUG(0, "[+] Message copied");
528 case fnevMbit|fnevTableModified:
529 ctable = (struct ContentsTableChange *) NotificationData;
530 switch (ctable->TableEvent) {
531 @@ -143,6 +147,7 @@ static int callback(uint16_t Notificatio
533 case fnevMbit|fnevSbit|fnevObjectModified:
534 OC_DEBUG(0, "[+] A property on a message in a search folder has changed");
536 case fnevMbit|fnevSbit|fnevTableModified:
537 stable = (struct ContentsTableChange *) NotificationData;
538 switch (stable->TableEvent) {
539 @@ -250,6 +255,7 @@ int main(int argc, const char *argv[])
541 retval = MAPIInitialize(&mapi_ctx, opt_profdb);
542 if (retval != MAPI_E_SUCCESS) {
543 + talloc_free(mem_ctx);
544 mapi_errstr("MAPIInitialize", retval);
547 @@ -261,6 +267,10 @@ int main(int argc, const char *argv[])
548 SetMAPIDebugLevel(mapi_ctx, atoi(opt_debug));
551 + mapi_object_init(&obj_store);
552 + mapi_object_init(&obj_inbox);
553 + mapi_object_init(&obj_contentstable);
555 /* if no profile is supplied use the default one */
557 retval = GetDefaultProfile(mapi_ctx, &opt_profname);
558 @@ -280,7 +290,6 @@ int main(int argc, const char *argv[])
561 /* Open the default message store */
562 - mapi_object_init(&obj_store);
564 retval = OpenMsgStore(session, &obj_store);
565 if (retval != MAPI_E_SUCCESS) {
566 @@ -292,11 +301,9 @@ int main(int argc, const char *argv[])
567 retval = GetReceiveFolder(&obj_store, &fid, NULL);
568 MAPI_RETVAL_IF(retval, retval, mem_ctx);
570 - mapi_object_init(&obj_inbox);
571 retval = OpenFolder(&obj_store, fid, &obj_inbox);
572 MAPI_RETVAL_IF(retval, retval, mem_ctx);
574 - mapi_object_init(&obj_contentstable);
575 retval = GetContentsTable(&obj_inbox, &obj_contentstable, 0, &count);
576 printf("mailbox contains %i messages\n", count);
578 diff -up openchange-openchange-2.3-VULCAN/utils/mapipropsdump.c.covscan openchange-openchange-2.3-VULCAN/utils/mapipropsdump.c
579 --- openchange-openchange-2.3-VULCAN/utils/mapipropsdump.c.covscan 2018-07-19 13:53:41.276450703 +0200
580 +++ openchange-openchange-2.3-VULCAN/utils/mapipropsdump.c 2018-07-19 13:53:41.289450703 +0200
585 -static const const struct ndr_interface_table *load_exchange_emsmdb_dso(const char *plugin)
586 +static const struct ndr_interface_table *load_exchange_emsmdb_dso(const char *plugin, void **phandle)
588 const struct ndr_interface_table *p;
591 - handle = dlopen(plugin, RTLD_NOW);
592 - if (handle == NULL) {
593 + *phandle = dlopen(plugin, RTLD_NOW);
594 + if (*phandle == NULL) {
595 printf("%s: Unable to open: %s\n", plugin, dlerror());
599 - p = (const struct ndr_interface_table *) dlsym(handle, "ndr_table_exchange_emsmdb");
600 + p = (const struct ndr_interface_table *) dlsym(*phandle, "ndr_table_exchange_emsmdb");
602 OC_DEBUG(0, "%s: Unable to find DCE/RPC interface table for 'ndr_table_exchange_emsmdb': %s", plugin, dlerror());
609 @@ -409,6 +409,7 @@ int main(int argc, const char *argv[])
610 struct SPropTagArray *s;
611 const char *opt_reqfile = NULL;
612 const char *opt_replfile = NULL;
613 + void *plhandle = NULL;
617 @@ -442,7 +443,7 @@ int main(int argc, const char *argv[])
621 - p = load_exchange_emsmdb_dso(PLUGIN);
622 + p = load_exchange_emsmdb_dso(PLUGIN, &plhandle);
626 @@ -454,6 +455,7 @@ int main(int argc, const char *argv[])
627 s = process_request(mem_ctx, f, opt_reqfile, &opnum, &index);
629 talloc_free(mem_ctx);
634 @@ -461,9 +463,12 @@ int main(int argc, const char *argv[])
635 ret = process_response(mem_ctx, f, opt_replfile, s, opnum, index);
637 talloc_free(mem_ctx);
642 talloc_free(mem_ctx);
647 diff -up openchange-openchange-2.3-VULCAN/utils/openchangeclient.c.covscan openchange-openchange-2.3-VULCAN/utils/openchangeclient.c
648 --- openchange-openchange-2.3-VULCAN/utils/openchangeclient.c.covscan 2018-07-19 13:53:41.277450703 +0200
649 +++ openchange-openchange-2.3-VULCAN/utils/openchangeclient.c 2018-07-19 13:53:41.289450703 +0200
650 @@ -629,6 +629,8 @@ static bool set_external_recipients(TALL
652 struct SPropValue SPropValue;
654 + memset(&SPropValue, 0, sizeof(struct SPropValue));
656 SRowSet->aRow = talloc_realloc(mem_ctx, SRowSet->aRow, struct SRow, SRowSet->cRows + 1);
657 last = SRowSet->cRows;
658 SRowSet->aRow[last].cValues = 0;
659 @@ -821,6 +823,8 @@ static enum MAPISTATUS openchangeclient_
660 mapi_object_init(&obj_outbox);
661 mapi_object_init(&obj_message);
663 + memset(&SPropValue, 0, sizeof(struct SPropValue));
665 if (oclient->pf == true) {
666 retval = openchangeclient_getpfdir(mem_ctx, obj_store, &obj_outbox, oclient->folder);
667 if (retval != MAPI_E_SUCCESS) return retval;