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 @@ -267,6 +267,7 @@ struct icaltimetype get_icaldate_from_tm
49 @@ -292,7 +293,7 @@ struct tm *get_tm_from_FILETIME(const st
51 struct icaltimetype get_icaltime_from_FILETIME(const struct FILETIME *ft)
53 - struct icaltimetype tt;
54 + struct icaltimetype tt = icaltime_null_time ();
56 struct timeval temp_timeval;
58 @@ -317,7 +318,7 @@ struct icaltimetype get_icaltime_from_FI
60 struct icaltimetype get_icaltime_from_FILETIME_UTC(const struct FILETIME *ft)
62 - struct icaltimetype tt;
63 + struct icaltimetype tt = icaltime_null_time ();
65 struct timeval temp_timeval;
67 @@ -342,7 +343,7 @@ struct icaltimetype get_icaltime_from_FI
69 struct icaltimetype get_icaldate_from_FILETIME(const struct FILETIME *ft)
71 - struct icaltimetype tt;
72 + struct icaltimetype tt = icaltime_null_time ();
74 struct timeval temp_timeval;
76 @@ -373,7 +374,7 @@ struct icaltimetype get_icaldate_from_FI
78 struct icaltimetype get_icaldate_from_GlobalObjectId(struct GlobalObjectId *GlobalObjectId)
80 - struct icaltimetype tt;
81 + struct icaltimetype tt = icaltime_null_time ();
82 tt.year = GlobalObjectId->YH;
83 tt.year = tt.year <<8;
84 tt.year |= GlobalObjectId->YL;
85 @@ -513,7 +514,10 @@ uint32_t get_minutes_from_icaltimetype(i
91 + if (icaltime_is_null_time(icaltime) || !icaltime_is_valid_time(icaltime))
94 tm.tm_year = icaltime.year - 1900;
95 tm.tm_mon = icaltime.month - 1;
96 tm.tm_mday = icaltime.day;
97 diff -up openchange-openchange-2.3-VULCAN/libexchange2ical/ical2exchange_property.c.covscan openchange-openchange-2.3-VULCAN/libexchange2ical/ical2exchange_property.c
98 --- openchange-openchange-2.3-VULCAN/libexchange2ical/ical2exchange_property.c.covscan 2015-05-16 17:22:04.000000000 +0200
99 +++ openchange-openchange-2.3-VULCAN/libexchange2ical/ical2exchange_property.c 2018-07-19 13:53:41.286450703 +0200
100 @@ -147,7 +147,6 @@ void ical2exchange_property_CATEGORIES(s
101 struct StringArray_r *sArray;
102 char **stringArray = NULL;
106 icalproperty *categoriesProp;
108 @@ -160,8 +159,10 @@ void ical2exchange_property_CATEGORIES(s
109 categoriesProp = icalcomponent_get_first_property(ical2exchange->categoriesEvent, ICAL_CATEGORIES_PROPERTY);
111 while(categoriesProp){
113 - value = strdup(icalproperty_get_categories(categoriesProp));
114 + const char *categories = icalproperty_get_categories(categoriesProp);
117 + value = strdup(categories ? categories : "");
118 tok = strtok(value, ",");
121 @@ -185,6 +186,7 @@ void ical2exchange_property_CATEGORIES(s
123 categoriesProp = icalcomponent_get_next_property(ical2exchange->categoriesEvent, ICAL_CATEGORIES_PROPERTY);
127 sArray->lppszA= (const char **) stringArray;
129 @@ -519,6 +521,7 @@ void ical2exchange_property_RRULE_EXDATE
131 ritr = icalrecur_iterator_new(irt,dtstart);
132 next=icalrecur_iterator_next(ritr);
133 + last = icaltime_null_time();
135 while (!icaltime_is_null_time(next)){
137 diff -up openchange-openchange-2.3-VULCAN/libmapi++/examples/foldertree.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/examples/foldertree.cpp
138 --- openchange-openchange-2.3-VULCAN/libmapi++/examples/foldertree.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
139 +++ openchange-openchange-2.3-VULCAN/libmapi++/examples/foldertree.cpp 2018-07-19 13:53:41.286450703 +0200
140 @@ -65,12 +65,12 @@ int main ()
144 - catch (libmapipp::mapi_exception e) // Catch any MAPI exceptions
145 + catch (libmapipp::mapi_exception &e) // Catch any MAPI exceptions
147 std::cout << "MAPI Exception in main: " << e.what()
150 - catch (std::runtime_error e) // Catch any other runtime exceptions
151 + catch (std::runtime_error &e) // Catch any other runtime exceptions
153 std::cout << "std::runtime_error exception in main: "
154 << e.what() << std::endl;
155 diff -up openchange-openchange-2.3-VULCAN/libmapi++/examples/messages.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/examples/messages.cpp
156 --- openchange-openchange-2.3-VULCAN/libmapi++/examples/messages.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
157 +++ openchange-openchange-2.3-VULCAN/libmapi++/examples/messages.cpp 2018-07-19 13:53:41.286450703 +0200
158 @@ -61,12 +61,12 @@ int main ()
162 - catch (libmapipp::mapi_exception e) // Catch any MAPI exceptions
163 + catch (libmapipp::mapi_exception &e) // Catch any MAPI exceptions
165 std::cout << "MAPI Exception in main: " << e.what()
168 - catch (std::runtime_error e) // Catch any other runtime exceptions
169 + catch (std::runtime_error &e) // Catch any other runtime exceptions
171 std::cout << "std::runtime_error exception in main: "
172 << e.what() << std::endl;
173 diff -up openchange-openchange-2.3-VULCAN/libmapi/FXICS.c.covscan openchange-openchange-2.3-VULCAN/libmapi/FXICS.c
174 --- openchange-openchange-2.3-VULCAN/libmapi/FXICS.c.covscan 2015-05-16 17:22:04.000000000 +0200
175 +++ openchange-openchange-2.3-VULCAN/libmapi/FXICS.c 2018-07-19 13:53:41.286450703 +0200
176 @@ -800,6 +800,7 @@ _PUBLIC_ enum MAPISTATUS FXGetBuffer(map
177 if ((retval = mapi_object_get_logon_id(obj_source_context, &logon_id)) != MAPI_E_SUCCESS)
180 + memset(&request, 0, sizeof(struct FastTransferSourceGetBuffer_req));
181 mem_ctx = talloc_named(session, 0, "FXGetBuffer");
184 diff -up openchange-openchange-2.3-VULCAN/libmapi/idset.c.covscan openchange-openchange-2.3-VULCAN/libmapi/idset.c
185 --- openchange-openchange-2.3-VULCAN/libmapi/idset.c.covscan 2015-05-16 17:22:04.000000000 +0200
186 +++ openchange-openchange-2.3-VULCAN/libmapi/idset.c 2018-07-19 13:53:41.286450703 +0200
187 @@ -383,6 +383,7 @@ _PUBLIC_ struct idset *IDSET_parse(TALLO
192 globset.length = buffer.length - 16;
193 globset.data = (uint8_t *) buffer.data + 16;
194 idset->ranges = GLOBSET_parse(idset, globset, &idset->range_count, &byte_count);
195 @@ -1182,7 +1183,8 @@ _PUBLIC_ void RAWIDSET_push_eid(struct r
198 glob_idset = RAWIDSET_make(rawidset->mem_ctx, true, rawidset->single);
199 - last_glob_idset->next = glob_idset;
200 + if (last_glob_idset)
201 + last_glob_idset->next = glob_idset;
203 glob_idset->repl.id = eid_id;
205 diff -up openchange-openchange-2.3-VULCAN/libmapi/IMAPIProp.c.covscan openchange-openchange-2.3-VULCAN/libmapi/IMAPIProp.c
206 --- openchange-openchange-2.3-VULCAN/libmapi/IMAPIProp.c.covscan 2015-05-16 17:22:04.000000000 +0200
207 +++ openchange-openchange-2.3-VULCAN/libmapi/IMAPIProp.c 2018-07-19 13:53:41.287450703 +0200
208 @@ -1122,6 +1122,7 @@ _PUBLIC_ enum MAPISTATUS QueryNamedPrope
212 + memset(&request, 0, sizeof(struct QueryNamedProperties_req));
213 mem_ctx = talloc_named(session, 0, "QueryNamesFromIDs");
216 diff -up openchange-openchange-2.3-VULCAN/libmapi/IMAPISupport.c.covscan openchange-openchange-2.3-VULCAN/libmapi/IMAPISupport.c
217 --- openchange-openchange-2.3-VULCAN/libmapi/IMAPISupport.c.covscan 2015-05-16 17:22:04.000000000 +0200
218 +++ openchange-openchange-2.3-VULCAN/libmapi/IMAPISupport.c 2018-07-19 13:53:41.287450703 +0200
219 @@ -101,6 +101,7 @@ _PUBLIC_ enum MAPISTATUS Subscribe(mapi_
220 if ((retval = mapi_object_get_logon_id(obj, &logon_id)) != MAPI_E_SUCCESS)
223 + memset(&request, 0, sizeof(struct RegisterNotification_req));
224 mem_ctx = talloc_named(session, 0, "Subscribe");
226 /* Fill the Subscribe operation */
227 diff -up openchange-openchange-2.3-VULCAN/libmapi/IMessage.c.covscan openchange-openchange-2.3-VULCAN/libmapi/IMessage.c
228 --- openchange-openchange-2.3-VULCAN/libmapi/IMessage.c.covscan 2015-05-16 17:22:04.000000000 +0200
229 +++ openchange-openchange-2.3-VULCAN/libmapi/IMessage.c 2018-07-19 13:53:41.287450703 +0200
230 @@ -499,6 +499,8 @@ _PUBLIC_ enum MAPISTATUS SetRecipientTyp
231 enum MAPISTATUS retval;
232 struct SPropValue lpProp;
234 + memset(&lpProp, 0, sizeof(struct SPropValue));
236 lpProp.ulPropTag = PR_RECIPIENT_TYPE;
237 lpProp.value.l = RecipClass;
239 @@ -1648,6 +1650,7 @@ _PUBLIC_ enum MAPISTATUS OpenEmbeddedMes
240 if ((retval = mapi_object_get_logon_id(obj_attach, &logon_id)) != MAPI_E_SUCCESS)
243 + memset(&lpProp, 0, sizeof(struct SPropValue));
244 mem_ctx = talloc_named(session, 0, "OpenEmbeddedMessage");
246 /* Fill the OpenEmbeddedMessage request */
247 diff -up openchange-openchange-2.3-VULCAN/libmapi/IStoreFolder.c.covscan openchange-openchange-2.3-VULCAN/libmapi/IStoreFolder.c
248 --- openchange-openchange-2.3-VULCAN/libmapi/IStoreFolder.c.covscan 2015-05-16 17:22:04.000000000 +0200
249 +++ openchange-openchange-2.3-VULCAN/libmapi/IStoreFolder.c 2018-07-19 13:53:41.287450703 +0200
250 @@ -93,6 +93,7 @@ _PUBLIC_ enum MAPISTATUS OpenMessage(map
251 if ((retval = mapi_object_get_logon_id(obj_store, &logon_id)) != MAPI_E_SUCCESS)
254 + memset(&lpProp, 0, sizeof(struct SPropValue));
255 mem_ctx = talloc_named(session, 0, "OpenMessage");
257 /* Fill the OpenMessage operation */
258 @@ -232,6 +233,7 @@ _PUBLIC_ enum MAPISTATUS ReloadCachedInf
259 if ((retval = mapi_object_get_logon_id(obj_message, &logon_id)) != MAPI_E_SUCCESS)
262 + memset(&lpProp, 0, sizeof(struct SPropValue));
263 mem_ctx = talloc_named(session, 0, "ReloadCachedInformation");
265 /* Fill the ReloadCachedInformation operation */
266 diff -up openchange-openchange-2.3-VULCAN/libmapi/IStream.c.covscan openchange-openchange-2.3-VULCAN/libmapi/IStream.c
267 --- openchange-openchange-2.3-VULCAN/libmapi/IStream.c.covscan 2015-05-16 17:22:04.000000000 +0200
268 +++ openchange-openchange-2.3-VULCAN/libmapi/IStream.c 2018-07-19 13:53:41.287450703 +0200
269 @@ -183,6 +183,7 @@ _PUBLIC_ enum MAPISTATUS ReadStream(mapi
270 if ((retval = mapi_object_get_logon_id(obj_stream, &logon_id)) != MAPI_E_SUCCESS)
273 + memset(&request, 0, sizeof(struct ReadStream_req));
274 mem_ctx = talloc_named(session, 0, "ReadStream");
277 diff -up openchange-openchange-2.3-VULCAN/libmapi++/src/folder.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/src/folder.cpp
278 --- openchange-openchange-2.3-VULCAN/libmapi++/src/folder.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
279 +++ openchange-openchange-2.3-VULCAN/libmapi++/src/folder.cpp 2018-07-19 13:53:41.287450703 +0200
280 @@ -57,7 +57,7 @@ folder::message_container_type folder::f
281 message_container.push_back(message_shared_ptr(new message(m_session,
283 row_set.aRow[i].lpProps[1].value.d)));
284 - } catch(mapi_exception e) {
285 + } catch(mapi_exception &e) {
286 mapi_object_release(&contents_table);
289 @@ -102,7 +102,7 @@ folder::hierarchy_container_type folder:
291 hierarchy_container.push_back(folder_shared_ptr(new folder(*this,
292 row_set.aRow[i].lpProps[0].value.d)));
293 - } catch(mapi_exception e) {
294 + } catch(mapi_exception &e) {
295 mapi_object_release(&hierarchy_table);
298 diff -up openchange-openchange-2.3-VULCAN/libmapi++/src/message.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/src/message.cpp
299 --- openchange-openchange-2.3-VULCAN/libmapi++/src/message.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
300 +++ openchange-openchange-2.3-VULCAN/libmapi++/src/message.cpp 2018-07-19 13:53:41.287450703 +0200
301 @@ -50,7 +50,7 @@ message::attachment_container_type messa
303 attachment_container.push_back(attachment_shared_ptr(new attachment(*this, row_set.aRow[i].lpProps[0].value.l)));
305 - catch(mapi_exception e) {
306 + catch(mapi_exception &e) {
307 mapi_object_release(&attachment_table);
310 diff -up openchange-openchange-2.3-VULCAN/libmapi++/src/session.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/src/session.cpp
311 --- openchange-openchange-2.3-VULCAN/libmapi++/src/session.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
312 +++ openchange-openchange-2.3-VULCAN/libmapi++/src/session.cpp 2018-07-19 13:53:41.287450703 +0200
313 @@ -61,7 +61,7 @@ void session::login(const std::string& p
314 if (m_profile_name == "") { // if profile is not set, try to get default profile
316 m_profile_name = profile_database().get_default_profile_name();
317 - } catch(mapi_exception e) {
318 + } catch(mapi_exception &e) {
322 @@ -74,7 +74,7 @@ void session::login(const std::string& p
325 m_message_store->open(m_session);
326 - } catch (mapi_exception e) {
327 + } catch (mapi_exception &e) {
331 diff -up openchange-openchange-2.3-VULCAN/libmapi++/tests/attach_test.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/tests/attach_test.cpp
332 --- openchange-openchange-2.3-VULCAN/libmapi++/tests/attach_test.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
333 +++ openchange-openchange-2.3-VULCAN/libmapi++/tests/attach_test.cpp 2018-07-19 13:53:41.287450703 +0200
334 @@ -84,11 +84,11 @@ int main()
336 print_folder_tree(top_folder, mapi_session);
338 - catch (mapi_exception e) // Catch any mapi exceptions
339 + catch (mapi_exception &e) // Catch any mapi exceptions
341 cout << "MAPI Exception @ main: " << e.what() << endl;
343 - catch (std::runtime_error e) // Catch runtime exceptions
344 + catch (std::runtime_error &e) // Catch runtime exceptions
346 cout << "std::runtime_error exception @ main: " << e.what() << endl;
348 diff -up openchange-openchange-2.3-VULCAN/libmapi++/tests/exception_test.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/tests/exception_test.cpp
349 --- openchange-openchange-2.3-VULCAN/libmapi++/tests/exception_test.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
350 +++ openchange-openchange-2.3-VULCAN/libmapi++/tests/exception_test.cpp 2018-07-19 13:53:41.287450703 +0200
351 @@ -12,7 +12,7 @@ int main()
355 - catch (libmapipp::mapi_exception e) {
356 + catch (libmapipp::mapi_exception &e) {
357 std::cout << e.what() << std::endl;
360 diff -up openchange-openchange-2.3-VULCAN/libmapi++/tests/profile_test.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/tests/profile_test.cpp
361 --- openchange-openchange-2.3-VULCAN/libmapi++/tests/profile_test.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
362 +++ openchange-openchange-2.3-VULCAN/libmapi++/tests/profile_test.cpp 2018-07-19 13:53:41.287450703 +0200
364 #define PROFILEDB_NAME_TEMPLATE "/tmp/mapidbXXXXXX"
367 + char *tmpname = NULL, *tmpname2 = NULL;
370 libmapipp::profile_database db;
372 std::cout << "default profile name: " << db.get_default_profile_name() << std::endl;
375 - char *tmpname = (char*) calloc(sizeof(PROFILEDB_NAME_TEMPLATE) + 1, sizeof(char));
376 - strncpy(tmpname, PROFILEDB_NAME_TEMPLATE, sizeof(PROFILEDB_NAME_TEMPLATE));
377 - int ret = mkstemp(tmpname);
380 + tmpname = strdup(PROFILEDB_NAME_TEMPLATE);
381 + ret = mkstemp(tmpname);
383 std::cout << "failed to create temporary file: " << strerror(errno) << std::endl;
385 @@ -45,12 +48,15 @@ int main ()
386 std::cout << "failed to create a temporary profile store" << std::endl;
394 - char *tmpname2 = (char*) calloc(sizeof(PROFILEDB_NAME_TEMPLATE) + 1, sizeof(char));
395 - strncpy(tmpname2, PROFILEDB_NAME_TEMPLATE, sizeof(PROFILEDB_NAME_TEMPLATE));
396 - int ret = mkstemp(tmpname2);
399 + tmpname2 = strdup(PROFILEDB_NAME_TEMPLATE);
400 + ret = mkstemp(tmpname2);
402 std::cout << "failed to create temporary file: " << strerror(errno) << std::endl;
404 @@ -60,19 +66,33 @@ int main ()
405 std::cout << "failed to create a temporary profile store with std::string" << std::endl;
412 std::cout << "finished profile and profile database tests" << std::endl;
414 - catch (libmapipp::mapi_exception e) // Catch any mapi exceptions
415 + catch (libmapipp::mapi_exception &e) // Catch any mapi exceptions
417 std::cout << "MAPI Exception @ main: " << e.what() << std::endl;
419 - catch (std::runtime_error e) // Catch runtime exceptions
420 + catch (std::runtime_error &e) // Catch runtime exceptions
422 std::cout << "std::runtime_error exception @ main: " << e.what() << std::endl;
440 diff -up openchange-openchange-2.3-VULCAN/libmapi++/tests/test.cpp.covscan openchange-openchange-2.3-VULCAN/libmapi++/tests/test.cpp
441 --- openchange-openchange-2.3-VULCAN/libmapi++/tests/test.cpp.covscan 2015-05-16 17:22:04.000000000 +0200
442 +++ openchange-openchange-2.3-VULCAN/libmapi++/tests/test.cpp 2018-07-19 13:53:41.288450703 +0200
443 @@ -126,11 +126,11 @@ int main ()
445 cout << "finished session" << endl;
447 - catch (mapi_exception e) // Catch any mapi exceptions
448 + catch (mapi_exception &e) // Catch any mapi exceptions
450 cout << "MAPI Exception @ main: " << e.what() << endl;
452 - catch (std::runtime_error e) // Catch runtime exceptions
453 + catch (std::runtime_error &e) // Catch runtime exceptions
455 cout << "std::runtime_error exception @ main: " << e.what() << endl;
457 diff -up openchange-openchange-2.3-VULCAN/libocpf/ocpf_api.c.covscan openchange-openchange-2.3-VULCAN/libocpf/ocpf_api.c
458 --- openchange-openchange-2.3-VULCAN/libocpf/ocpf_api.c.covscan 2015-05-16 17:22:04.000000000 +0200
459 +++ openchange-openchange-2.3-VULCAN/libocpf/ocpf_api.c 2018-07-19 13:53:41.288450703 +0200
460 @@ -316,6 +316,8 @@ int ocpf_propvalue(struct ocpf_context *
461 if (!ocpf || !ocpf->mem_ctx) return OCPF_ERROR;
462 if (!ctx) return OCPF_ERROR;
464 + memset(&lpProps, 0, sizeof(struct SPropValue));
468 /* Sanity check: do not insert the same property twice */
469 diff -up openchange-openchange-2.3-VULCAN/libocpf/ocpf_public.c.covscan openchange-openchange-2.3-VULCAN/libocpf/ocpf_public.c
470 --- openchange-openchange-2.3-VULCAN/libocpf/ocpf_public.c.covscan 2015-05-16 17:22:04.000000000 +0200
471 +++ openchange-openchange-2.3-VULCAN/libocpf/ocpf_public.c 2018-07-19 13:53:41.288450703 +0200
472 @@ -537,6 +537,8 @@ static bool set_external_recipients(TALL
474 struct SPropValue SPropValue;
476 + memset(&SPropValue, 0, sizeof(struct SPropValue));
478 SRowSet->aRow = talloc_realloc(mem_ctx, SRowSet->aRow, struct SRow, SRowSet->cRows + 2);
479 last = SRowSet->cRows;
480 SRowSet->aRow[last].cValues = 0;
481 @@ -626,6 +628,8 @@ _PUBLIC_ enum MAPISTATUS ocpf_set_Recipi
483 MAPI_RETVAL_IF(!ctx->recipients->cRows, MAPI_E_NOT_FOUND, NULL);
485 + memset(&SPropValue, 0, sizeof(struct SPropValue));
487 SPropTagArray = set_SPropTagArray(mem_ctx, 0x8,
490 diff -up openchange-openchange-2.3-VULCAN/ndr_mapi.c.covscan openchange-openchange-2.3-VULCAN/ndr_mapi.c
491 --- openchange-openchange-2.3-VULCAN/ndr_mapi.c.covscan 2018-07-19 13:53:41.276450703 +0200
492 +++ openchange-openchange-2.3-VULCAN/ndr_mapi.c 2018-07-19 13:53:41.288450703 +0200
493 @@ -1310,8 +1310,11 @@ _PUBLIC_ enum ndr_err_code ndr_pull_EcDo
494 NDR_PULL_ALLOC(ndr, r->out.pulTimeStamp);
495 *r->out.pulTimeStamp = *r->in.pulTimeStamp;
496 NDR_PULL_ALLOC(ndr, r->out.pcbAuxOut);
497 - *r->out.pcbAuxOut = *r->in.pcbAuxOut;
499 + if (r->in.pcbAuxOut)
500 + *r->out.pcbAuxOut = *r->in.pcbAuxOut;
502 + *r->out.pcbAuxOut = 0;
505 if (flags & NDR_OUT) {
506 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
507 diff -up openchange-openchange-2.3-VULCAN/script/makepropslist.py.covscan openchange-openchange-2.3-VULCAN/script/makepropslist.py
508 --- openchange-openchange-2.3-VULCAN/script/makepropslist.py.covscan 2015-05-16 17:22:04.000000000 +0200
509 +++ openchange-openchange-2.3-VULCAN/script/makepropslist.py 2018-07-19 13:53:41.288450703 +0200
510 @@ -992,7 +992,7 @@ def check_duplicate_alternative_names():
511 if previous_alternative_names.has_key(altname):
512 print "\tIn section", entry["OXPROPS_Sect"], ", alternative name:", altname, "duplicates name in section", previous_alternative_names[altname]
513 if previous_canonical_names.has_key(altname):
514 - print "\tIn section", entry["OXPROPS_Sect"], ", alternative name:", altname, "duplicates canonical name in section", previous_alternative_names[altname]
515 + print "\tIn section", entry["OXPROPS_Sect"], ", alternative name:", altname, "duplicates canonical name in section", previous_canonical_names[altname]
516 previous_alternative_names[altname] = (entry["OXPROPS_Sect"])
518 def check_duplicate_propids():
519 diff -up openchange-openchange-2.3-VULCAN/testprogs/test_asyncnotif.c.covscan openchange-openchange-2.3-VULCAN/testprogs/test_asyncnotif.c
520 --- openchange-openchange-2.3-VULCAN/testprogs/test_asyncnotif.c.covscan 2015-05-16 17:22:04.000000000 +0200
521 +++ openchange-openchange-2.3-VULCAN/testprogs/test_asyncnotif.c 2018-07-19 13:53:41.288450703 +0200
522 @@ -109,12 +109,16 @@ static int callback(uint16_t Notificatio
524 case fnevMbit|fnevObjectDeleted:
525 OC_DEBUG(0, "[+] Message deleted");
527 case fnevMbit|fnevObjectModified:
528 OC_DEBUG(0, "[+] Message modified");
530 case fnevMbit|fnevObjectMoved:
531 OC_DEBUG(0, "[+] Message moved");
533 case fnevMbit|fnevObjectCopied:
534 OC_DEBUG(0, "[+] Message copied");
536 case fnevMbit|fnevTableModified:
537 ctable = (struct ContentsTableChange *) NotificationData;
538 switch (ctable->TableEvent) {
539 @@ -143,6 +147,7 @@ static int callback(uint16_t Notificatio
541 case fnevMbit|fnevSbit|fnevObjectModified:
542 OC_DEBUG(0, "[+] A property on a message in a search folder has changed");
544 case fnevMbit|fnevSbit|fnevTableModified:
545 stable = (struct ContentsTableChange *) NotificationData;
546 switch (stable->TableEvent) {
547 @@ -250,6 +255,7 @@ int main(int argc, const char *argv[])
549 retval = MAPIInitialize(&mapi_ctx, opt_profdb);
550 if (retval != MAPI_E_SUCCESS) {
551 + talloc_free(mem_ctx);
552 mapi_errstr("MAPIInitialize", retval);
555 @@ -261,6 +267,10 @@ int main(int argc, const char *argv[])
556 SetMAPIDebugLevel(mapi_ctx, atoi(opt_debug));
559 + mapi_object_init(&obj_store);
560 + mapi_object_init(&obj_inbox);
561 + mapi_object_init(&obj_contentstable);
563 /* if no profile is supplied use the default one */
565 retval = GetDefaultProfile(mapi_ctx, &opt_profname);
566 @@ -280,7 +290,6 @@ int main(int argc, const char *argv[])
569 /* Open the default message store */
570 - mapi_object_init(&obj_store);
572 retval = OpenMsgStore(session, &obj_store);
573 if (retval != MAPI_E_SUCCESS) {
574 @@ -292,11 +301,9 @@ int main(int argc, const char *argv[])
575 retval = GetReceiveFolder(&obj_store, &fid, NULL);
576 MAPI_RETVAL_IF(retval, retval, mem_ctx);
578 - mapi_object_init(&obj_inbox);
579 retval = OpenFolder(&obj_store, fid, &obj_inbox);
580 MAPI_RETVAL_IF(retval, retval, mem_ctx);
582 - mapi_object_init(&obj_contentstable);
583 retval = GetContentsTable(&obj_inbox, &obj_contentstable, 0, &count);
584 printf("mailbox contains %i messages\n", count);
586 diff -up openchange-openchange-2.3-VULCAN/utils/mapipropsdump.c.covscan openchange-openchange-2.3-VULCAN/utils/mapipropsdump.c
587 --- openchange-openchange-2.3-VULCAN/utils/mapipropsdump.c.covscan 2018-07-19 13:53:41.276450703 +0200
588 +++ openchange-openchange-2.3-VULCAN/utils/mapipropsdump.c 2018-07-19 13:53:41.289450703 +0200
593 -static const const struct ndr_interface_table *load_exchange_emsmdb_dso(const char *plugin)
594 +static const struct ndr_interface_table *load_exchange_emsmdb_dso(const char *plugin, void **phandle)
596 const struct ndr_interface_table *p;
599 - handle = dlopen(plugin, RTLD_NOW);
600 - if (handle == NULL) {
601 + *phandle = dlopen(plugin, RTLD_NOW);
602 + if (*phandle == NULL) {
603 printf("%s: Unable to open: %s\n", plugin, dlerror());
607 - p = (const struct ndr_interface_table *) dlsym(handle, "ndr_table_exchange_emsmdb");
608 + p = (const struct ndr_interface_table *) dlsym(*phandle, "ndr_table_exchange_emsmdb");
610 OC_DEBUG(0, "%s: Unable to find DCE/RPC interface table for 'ndr_table_exchange_emsmdb': %s", plugin, dlerror());
617 @@ -409,6 +409,7 @@ int main(int argc, const char *argv[])
618 struct SPropTagArray *s;
619 const char *opt_reqfile = NULL;
620 const char *opt_replfile = NULL;
621 + void *plhandle = NULL;
625 @@ -442,7 +443,7 @@ int main(int argc, const char *argv[])
629 - p = load_exchange_emsmdb_dso(PLUGIN);
630 + p = load_exchange_emsmdb_dso(PLUGIN, &plhandle);
634 @@ -454,6 +455,7 @@ int main(int argc, const char *argv[])
635 s = process_request(mem_ctx, f, opt_reqfile, &opnum, &index);
637 talloc_free(mem_ctx);
642 @@ -461,9 +463,12 @@ int main(int argc, const char *argv[])
643 ret = process_response(mem_ctx, f, opt_replfile, s, opnum, index);
645 talloc_free(mem_ctx);
650 talloc_free(mem_ctx);
655 diff -up openchange-openchange-2.3-VULCAN/utils/openchangeclient.c.covscan openchange-openchange-2.3-VULCAN/utils/openchangeclient.c
656 --- openchange-openchange-2.3-VULCAN/utils/openchangeclient.c.covscan 2018-07-19 13:53:41.277450703 +0200
657 +++ openchange-openchange-2.3-VULCAN/utils/openchangeclient.c 2018-07-19 13:53:41.289450703 +0200
658 @@ -629,6 +629,8 @@ static bool set_external_recipients(TALL
660 struct SPropValue SPropValue;
662 + memset(&SPropValue, 0, sizeof(struct SPropValue));
664 SRowSet->aRow = talloc_realloc(mem_ctx, SRowSet->aRow, struct SRow, SRowSet->cRows + 1);
665 last = SRowSet->cRows;
666 SRowSet->aRow[last].cValues = 0;
667 @@ -821,6 +823,8 @@ static enum MAPISTATUS openchangeclient_
668 mapi_object_init(&obj_outbox);
669 mapi_object_init(&obj_message);
671 + memset(&SPropValue, 0, sizeof(struct SPropValue));
673 if (oclient->pf == true) {
674 retval = openchangeclient_getpfdir(mem_ctx, obj_store, &obj_outbox, oclient->folder);
675 if (retval != MAPI_E_SUCCESS) return retval;