summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '3.0'HEADmasterAllen Winter2023-03-243-5/+21
|\
| * libical-glib: Add get_zone_directory3.0Jan Tojnar2023-03-243-5/+21
| | | | | | | | This will be useful for evolution-data-server to use the same zone directory as libical.
* | Typos a/anДилян Палаузов2022-12-1016-24/+24
| |
* | src/test/icaltm_test.c - minor code styleAllen Winter2022-11-221-2/+2
| |
* | CMAKE option LIBICAL_SYNC_MODE_THREADLOCAL: Allow compiling all global ↵Markus Minichmayr2022-11-229-27/+41
| | | | | | | | variables with thread-local storage, thus avoiding the need for synchronization.
* | Mark mutable global variables as ICAL_GLOBAL_VAR, so we can specify storage ↵Markus Minichmayr2022-11-228-31/+31
| | | | | | | | modifiers (i.e. thread_local) if necessary.
* | Mark read-only static variables as const.Markus Minichmayr2022-11-225-8/+8
| |
* | various - fix strict-prototype warningsAllen Winter2022-11-205-11/+10
| |
* | Merge branch '3.0'Allen Winter2022-11-1320-106/+105
|\ \ | |/
| * misc: Update sources to more modern CMilan Crha2022-11-1320-106/+105
| | | | | | | | | | | | | | | | | | | | The code fails to build when having enabled (gcc) warnings: -Werror=implicit -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=old-style-definition -Werror=strict-prototypes
| * regression-cxx.cpp: fix test by explicitly setting errnoSergei Trofimovich2022-11-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When embedded timezone data is not enabled errors from previous tests set icalerrno to non-default and cause exception handling to throw wrong exception: not ok 1186 - Testing exception handling # test failed: "" # at: /build/libical/src/test/regression-cxx.cpp:170 # got: 0 # expected: 1 The change explicitly drops icalerrno to isolate the test result from other tests.
| * regression: avoid SIGSEGV in test_timezone_from_builtin()Sergei Trofimovich2022-11-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When builtin timezones are not enabled 'regression' test SIGSEGVs due to strdup(NULL) in test_timezone_from_builtin(): ================================================================= ==6477==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7ffff7a1aae6 bp 0x7fffffffb6c0 sp 0x7fffffffae68 T0) ==6477==The signal is caused by a READ memory access. ==6477==Hint: address points to the zero page. #0 0x7ffff7a1aae6 in __sanitizer::internal_strlen(char const*) (...gcc-13.0.0-lib/lib/libasan.so.8+0xebae6) #1 0x7ffff79aceb0 in __interceptor_strdup (...gcc-13.0.0-lib/lib/libasan.so.8+0x7deb0) #2 0x41db71 in test_timezone_from_builtin /build/libical/src/test/regression.c:4682 #3 0x42beff in test_run /build/libical/src/test/regression-utils.c:236 #4 0x40b962 in main /build/libical/src/test/regression.c:5475 #5 0x7ffff6d2858d in __libc_start_call_main (...glibc-2.35-163/lib/libc.so.6+0x2958d) #6 0x7ffff6d28648 in __libc_start_main_impl (...glibc-2.35-163/lib/libc.so.6+0x29648) #7 0x40bc84 in _start (/build/libical/build/src/test/regression+0x40bc84) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (...gcc-13.0.0-lib/lib/libasan.so.8+0xebae6) in __sanitizer::internal_strlen(char const*) The change disables the test if builtin zimezone tables are not enabled.
* | ical_bt(): use free() to free memory, not the libical wrapperSergei Trofimovich2022-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't use local free() as buffer was not allocated by local malloc(): backtrace_symbols() is a glibc function. Noticed when was debugging unrelated test failure under `-fsanitize=address`: ==6354==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf0401578 at pc 0x080765af bp 0xffff5168 sp 0xffff515c READ of size 4 at 0xf0401578 thread T0 #0 0x80765ae in test_free src/test/test-malloc.c:136 #1 0xf729d0e4 in ical_bt src/libical/icalerror.c:272 #2 0xf729d376 in icalerror_set_errno src/libical/icalerror.c:117 #3 0xf72cde81 in icaltimezone_parse_zone_tab src/libical/icaltimezone.c:1692 #4 0xf72d69f4 in icaltimezone_init_builtin_timezones src/libical/icaltimezone.c:1554 #5 0xf72d69f4 in icaltimezone_get_utc_timezone src/libical/icaltimezone.c:1537 #6 0xf72c46d8 in icaltime_from_string src/libical/icaltime.c:359 #7 0xf72bed2d in icalrecurrencetype_from_string src/libical/icalrecur.c:714 #8 0xf72e44e0 in icalvalue_new_from_string_with_error src/libical/icalvalue.c:632 #9 0xf72a3a9e in icalparser_add_line src/libical/icalparser.c:1157 #10 0xf72a59ef in icalparser_parse src/libical/icalparser.c:642 #11 0xf72a5bf0 in icalparser_parse_string src/libical/icalparser.c:1359 #12 0xf72932f7 in icalcomponent_new_from_string src/libical/icalcomponent.c:129 #13 0x8063526 in test_tzid_with_utc_time src/test/regression.c:4496 #14 0x8073f02 in test_run src/test/regression-utils.c:236 #15 0x8051c79 in main src/test/regression.c:5467 #16 0xf6cf12f9 in __libc_start_call_main (...glibc-2.35-163/lib/libc.so.6+0x212f9) #17 0xf6cf13d3 in __libc_start_main_alias_1 (...glibc-2.35-163/lib/libc.so.6+0x213d3) #18 0x805202b in _start (build/src/test/regression+0x805202b) 0xf0401578 is located 8 bytes to the left of 1553-byte region [0xf0401580,0xf0401b91) allocated by thread T0 here: #0 0xf7a6906b in malloc (...gcc-13.0.0-lib/lib/libasan.so.8+0xd706b) #1 0xf6dfd1ae in backtrace_symbols (...glibc-2.35-163/lib/libc.so.6+0x12d1ae) #2 0xf7a1d808 in __interceptor_backtrace_symbols.part.0 (...gcc-13.0.0-lib/lib/libasan.so.8+0x8b808) #3 0xf729d01f in ical_bt src/libical/icalerror.c:264 SUMMARY: AddressSanitizer: heap-buffer-overflow src/test/test-malloc.c:136 in test_free
* | regression-cxx.cpp: fix test by explicitly setting errnoSergei Trofimovich2022-11-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When embedded timezone data is not enabled errors from previous tests set icalerrno to non-default and cause exception handling to throw wrong exception: not ok 1186 - Testing exception handling # test failed: "" # at: /build/libical/src/test/regression-cxx.cpp:170 # got: 0 # expected: 1 The change explicitly drops icalerrno to isolate the test result from other tests.
* | regression: avoid SIGSEGV in test_timezone_from_builtin()Sergei Trofimovich2022-11-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When builtin timezones are not enabled 'regression' test SIGSEGVs due to strdup(NULL) in test_timezone_from_builtin(): ================================================================= ==6477==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7ffff7a1aae6 bp 0x7fffffffb6c0 sp 0x7fffffffae68 T0) ==6477==The signal is caused by a READ memory access. ==6477==Hint: address points to the zero page. #0 0x7ffff7a1aae6 in __sanitizer::internal_strlen(char const*) (...gcc-13.0.0-lib/lib/libasan.so.8+0xebae6) #1 0x7ffff79aceb0 in __interceptor_strdup (...gcc-13.0.0-lib/lib/libasan.so.8+0x7deb0) #2 0x41db71 in test_timezone_from_builtin /build/libical/src/test/regression.c:4682 #3 0x42beff in test_run /build/libical/src/test/regression-utils.c:236 #4 0x40b962 in main /build/libical/src/test/regression.c:5475 #5 0x7ffff6d2858d in __libc_start_call_main (...glibc-2.35-163/lib/libc.so.6+0x2958d) #6 0x7ffff6d28648 in __libc_start_main_impl (...glibc-2.35-163/lib/libc.so.6+0x29648) #7 0x40bc84 in _start (/build/libical/build/src/test/regression+0x40bc84) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (...gcc-13.0.0-lib/lib/libasan.so.8+0xebae6) in __sanitizer::internal_strlen(char const*) The change disables the test if builtin zimezone tables are not enabled.
* | libical-glib/tools/generator.c: memory leakДилян Палаузов2022-11-011-0/+3
| |
* | Merge branch '3.0'Allen Winter2022-10-252-3/+20
|\ \ | |/
| * src/libicalvcal/CMakeLists.txt - minor coding styleAllen Winter2022-10-251-4/+4
| |
| * Escape comma in x-property TEXT valuesRobert Stepanek2022-10-252-1/+18
| | | | | | | | | | | | | | 453689b7678cbc588c2811efb953d513fc8dc90f changed libical to not escape comma in x-property values. While this is a sane choice for x-property values of unknown kind, it is wrong if the value type of the property is TEXT.
| * Fix regression test function name mix-upRobert Stepanek2022-10-251-2/+2
| | | | | | | | | | | | This got introduced in 453689b7678cbc588c2811efb953d513fc8dc90f, where the "test_remove_tzid_from_due" and "test_comma_in_xproperty" function names were swapped.
* | src/libicalvcal/CMakeLists.txt - minor formattingAllen Winter2022-10-241-4/+4
| |
* | Merge branch '3.0'Allen Winter2022-10-245-29/+42
|\ \ | |/
| * disable so versions for Androidheinzchen2022-10-245-29/+42
| |
* | Merge branch '3.0'Allen Winter2022-10-171-6/+2
|\ \ | |/
| * Revert "icalparser.c - add protection against fuzz"Allen Winter2022-10-171-6/+2
| | | | | | | | This reverts commit 2ca167a6077fc1464b1dd3dde93b68c50dc0f720.
* | Merge branch '3.0'Allen Winter2022-10-113-2/+43
|\ \ | |/
| * regrression.c: Extend test_icaltime_as_timet.Markus Minichmayr2022-10-111-0/+32
| |
| * icaltime_as_timet: Support dates staring with year 1902 also for 32-bit ↵Markus Minichmayr2022-10-112-2/+11
| | | | | | | | time_t. Add a range guard for years from 1902 to 10000 also for 64-bit time_t.
| * make sure files end with a newline (end-of-file-fixer)Allen Winter2022-10-1014-15/+1
| |
| * fix trailing-whitespace issuesAllen Winter2022-10-1017-207/+207
| |
* | Merge branch '3.0'Allen Winter2022-10-101-3/+1
|\ \ | |/
| * Revert "src/libical/icalparser.c - fix a fuzz issue for integer overflow"Allen Winter2022-10-101-3/+1
| | | | | | | | This reverts commit ca3e2ad983771b90da259994b7a6d7de1fd1abdc.
* | Merge branch '3.0'Allen Winter2022-10-073-3/+3
|\ \ | |/
| * fix problem found with gcc fortify buildsAllen Winter2022-10-073-3/+3
| | | | | | | | fixes: #603
* | Merge branch '3.0'Allen Winter2022-10-0614-51/+61
|\ \ | |/
| * fix a few resource leaks in the tests and examplesAllen Winter2022-10-062-14/+9
| | | | | | | | as found by Coverity.
| * codespelling fixesAllen Winter2022-10-056-7/+7
| |
| * Ensure all vanew_foo() calls finish with (void*)0 (not 0)Allen Winter2022-10-0511-28/+30
| |
| * icalcomponent_vanew - document passing NULL as final argumentissue585Allen Winter2022-10-053-11/+5
| | | | | | | | fixes: #585
| * Merge branch '3.0' into issue585Allen Winter2022-10-052-6/+0
| |\
| | * ensure compiler warning checks for varargs, where available.Allen Winter2022-10-052-6/+0
| | | | | | | | | | | | | | | -Wvarargs - warn upon questionable usage of the macros used to handle variable arguments like "va_start".
| * | src/test/regression.c - test_icalcomponent_with_lastmodifiedAllen Winter2022-10-051-2/+13
| | |
| * | Merge branch '3.0' into issue585Allen Winter2022-10-048-23/+40
| |\ \ | | |/
| * | regression.c - add test for segfault in icalcomponent_vanew with ↵Allen Winter2022-10-011-2/+18
| | | | | | | | | | | | | | | | | | lastmodified property see issue585
* | | libical-glib/recurrence: Return arrays with the right computed size.Corentin Noël2022-10-042-61/+99
| | | | | | | | | | | | | | | Consumers of this API are expecting the array to already have the right size. Do the work for them and return a well-size array.
* | | src/test/regression.c - suppress Coverity warning for weak_cryptoAllen Winter2022-10-031-0/+1
| | |
* | | src/test/test-malloc.h - remove 'extern'. no neededAllen Winter2022-10-031-6/+6
| | |
* | | Merge branch '3.0'Allen Winter2022-10-036-13/+19
|\ \ \ | | |/ | |/|
| * | add clang diagnostic pragmas to quiet unreachable-code warningsAllen Winter2022-10-032-2/+7
| | | | | | | | | | | | fixes: #486
| * | suppress some coverity issuesAllen Winter2022-10-032-9/+19
| | | | | | | | | | | | supress coverity issues that we can't fix