libical-3.0.20-2.fc43

List of Findings

Error: COMPILER_WARNING (CWE-686): [#def1]
libical-3.0.20/redhat-linux-build/CMakeFiles/CMakeScratch/TryCompile-3zeXyT/CheckFunctionExists.c:7:3: warning[-Wbuiltin-declaration-mismatch]: conflicting types for built-in function ‘strncasecmp’; expected ‘int(const char *, const char *, long unsigned int)’

Error: COMPILER_WARNING (CWE-686): [#def2]
libical-3.0.20/redhat-linux-build/CMakeFiles/CMakeScratch/TryCompile-7u7sER/CheckFunctionExists.c:7:3: warning[-Wbuiltin-declaration-mismatch]: conflicting types for built-in function ‘strdup’; expected ‘char *(const char *)’

Error: COMPILER_WARNING (CWE-686): [#def3]
libical-3.0.20/redhat-linux-build/CMakeFiles/CMakeScratch/TryCompile-8XqJ0V/CheckFunctionExists.c:7:3: warning[-Wbuiltin-declaration-mismatch]: conflicting types for built-in function ‘strcasecmp’; expected ‘int(const char *, const char *)’

Error: COMPILER_WARNING (CWE-686): [#def4]
libical-3.0.20/redhat-linux-build/CMakeFiles/CMakeScratch/TryCompile-BG6GLi/CheckFunctionExists.c:7:3: warning[-Wbuiltin-declaration-mismatch]: conflicting types for built-in function ‘iswspace’; expected ‘int(unsigned int)’

Error: COMPILER_WARNING: [#def5]
libical-3.0.20/redhat-linux-build/CMakeFiles/CMakeScratch/TryCompile-Cuy4NT/HAVE_PTHREAD_NP_H.c:3:10: warning[fatal error]: pthread_np.h: No such file or directory

Error: COMPILER_WARNING (CWE-686): [#def6]
libical-3.0.20/redhat-linux-build/CMakeFiles/CMakeScratch/TryCompile-KFbDcB/CheckFunctionExists.c:7:3: warning[-Wbuiltin-declaration-mismatch]: conflicting types for built-in function ‘fork’; expected ‘int(void)’

Error: COMPILER_WARNING (CWE-686): [#def7]
libical-3.0.20/redhat-linux-build/CMakeFiles/CMakeScratch/TryCompile-l2v6M5/CheckFunctionExists.c:7:3: warning[-Wbuiltin-declaration-mismatch]: conflicting types for built-in function ‘snprintf’; expected ‘int(char *, long unsigned int,  const char *, ...)’

Error: COMPILER_WARNING (CWE-563): [#def8]
libical-3.0.20/redhat-linux-build/doc/reference/libical-glib/libical-glib-scan.c: scope_hint: In function ‘output_object_actions’
libical-3.0.20/redhat-linux-build/doc/reference/libical-glib/libical-glib-scan.c:599:30: warning[-Wunused-parameter]: unused parameter ‘fp’
#  599 | output_object_actions (FILE *fp, GType object_type)
#      |                        ~~~~~~^~

Error: COMPILER_WARNING (CWE-477): [#def9]
libical-3.0.20/redhat-linux-build/src/libical-glib/i-cal-object.c: scope_hint: In function ‘i_cal_object_class_init’
libical-3.0.20/redhat-linux-build/src/libical-glib/i-cal-object.c:227:5: warning[-Wdeprecated-declarations]: ‘g_type_class_add_private’ is deprecated
#  227 |     g_type_class_add_private(class, sizeof(ICalObjectPrivate));
#      |     ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gobject.h:26: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:31: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
libical-3.0.20/redhat-linux-build/src/libical-glib/i-cal-object.h:26: included_from: Included from here.
libical-3.0.20/redhat-linux-build/src/libical-glib/i-cal-object.c:21: included_from: Included from here.
/usr/include/glib-2.0/gobject/gtype.h:1503:10: note: declared here
# 1503 | void     g_type_class_add_private       (gpointer                    g_class,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~
#  225|       GObjectClass *object_class;
#  226|   
#  227|->     g_type_class_add_private(class, sizeof(ICalObjectPrivate));
#  228|   
#  229|       object_class = G_OBJECT_CLASS(class);

Error: COMPILER_WARNING (CWE-477): [#def10]
libical-3.0.20/redhat-linux-build/src/libical-glib/i-cal-object.c:227:5: warning[-Wdeprecated-declarations]: ‘g_type_class_add_private’ is deprecated
#  225|       GObjectClass *object_class;
#  226|   
#  227|->     g_type_class_add_private(class, sizeof(ICalObjectPrivate));
#  228|   
#  229|       object_class = G_OBJECT_CLASS(class);

Error: COMPILER_WARNING: [#def11]
libical-3.0.20/redhat-linux-build/src/libical-glib/i-cal-object.c:322:21: warning[warning]: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
#  320|   static void i_cal_object_init(ICalObject *iobject)
#  321|   {
#  322|->     iobject->priv = G_TYPE_INSTANCE_GET_PRIVATE(iobject, I_CAL_TYPE_OBJECT, ICalObjectPrivate);
#  323|   
#  324|       g_mutex_init(&iobject->priv->props_lock);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
libical-3.0.20/redhat-linux-build/src/libical/icalderivedvalue.c:1343:5: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(v)’
libical-3.0.20/redhat-linux-build/src/libical/icalderivedvalue.c:1334:5: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
libical-3.0.20/redhat-linux-build/src/libical/icalderivedvalue.c:1336:5: branch_false: ...to here
libical-3.0.20/redhat-linux-build/src/libical/icalderivedvalue.c:1336:5: branch_false: following ‘false’ branch (when ‘v’ is non-NULL)...
libical-3.0.20/redhat-linux-build/src/libical/icalderivedvalue.c:1340:9: branch_false: ...to here
libical-3.0.20/redhat-linux-build/src/libical/icalderivedvalue.c:1343:52: acquire_memory: allocated here
libical-3.0.20/redhat-linux-build/src/libical/icalderivedvalue.c:1343:5: danger: ‘strdup(v)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 1341|           icalattach_unref(impl->data.v_attach);
# 1342|   
# 1343|->     impl->data.v_attach = icalattach_new_from_data(strdup(v), free_icalvalue_attach_data, 0);
# 1344|   }
# 1345|   

Error: GCC_ANALYZER_WARNING (CWE-465): [#def13]
libical-3.0.20/src/libical-glib/tools/generator.c:117:20: warning[-Wanalyzer-deref-before-check]: check of ‘((Parameter)*(void *)*iter_list.data).comment’ for NULL after already dereferencing it
libical-3.0.20/src/libical-glib/tools/generator.c:834:6: enter_function: entry to ‘generate_code_from_template’
libical-3.0.20/src/libical-glib/tools/generator.c:850:12: branch_true: following ‘true’ branch...
libical-3.0.20/src/libical-glib/tools/generator.c:851:12: branch_true: ...to here
libical-3.0.20/src/libical-glib/tools/generator.c:851:12: branch_true: following ‘true’ branch...
libical-3.0.20/src/libical-glib/tools/generator.c:852:22: branch_true: ...to here
libical-3.0.20/src/libical-glib/tools/generator.c:858:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
libical-3.0.20/src/libical-glib/tools/generator.c:886:20: branch_true: following ‘true’ branch...
libical-3.0.20/src/libical-glib/tools/generator.c:887:33: branch_true: ...to here
libical-3.0.20/src/libical-glib/tools/generator.c:887:67: branch_true: following ‘true’ branch (when ‘iter’ is non-NULL)...
libical-3.0.20/src/libical-glib/tools/generator.c:890:74: branch_true: ...to here
libical-3.0.20/src/libical-glib/tools/generator.c:890:29: call_function: calling ‘get_source_method_body’ from ‘generate_code_from_template’
#  115|                   }
#  116|   
#  117|->                 if (para->comment != NULL) {
#  118|                       buffer = g_strconcat(res, ": ", para->comment, NULL);
#  119|                       g_free(res);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def14]
libical-3.0.20/src/libical-glib/tools/generator.c:1830:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘method’
libical-3.0.20/src/libical-glib/tools/generator.c:834:6: enter_function: entry to ‘generate_code_from_template’
libical-3.0.20/src/libical-glib/tools/generator.c:850:12: branch_true: following ‘true’ branch...
libical-3.0.20/src/libical-glib/tools/generator.c:851:12: branch_true: ...to here
libical-3.0.20/src/libical-glib/tools/generator.c:851:12: branch_true: following ‘true’ branch...
libical-3.0.20/src/libical-glib/tools/generator.c:852:22: branch_true: ...to here
libical-3.0.20/src/libical-glib/tools/generator.c:858:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
libical-3.0.20/src/libical-glib/tools/generator.c:886:20: branch_true: following ‘true’ branch...
libical-3.0.20/src/libical-glib/tools/generator.c:887:33: branch_true: ...to here
libical-3.0.20/src/libical-glib/tools/generator.c:887:67: branch_true: following ‘true’ branch (when ‘iter’ is non-NULL)...
libical-3.0.20/src/libical-glib/tools/generator.c:890:74: branch_true: ...to here
libical-3.0.20/src/libical-glib/tools/generator.c:890:29: call_function: calling ‘get_source_method_body’ from ‘generate_code_from_template’
# 1828|   
# 1829|       /* Generate the method return */
# 1830|->     if (method->ret == NULL) {
# 1831|           (void)g_stpcpy(buffer + strlen(buffer), "void");
# 1832|       } else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
libical-3.0.20/src/libical-glib/tools/generator.c:2100:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libical-3.0.20/src/libical-glib/tools/generator.c:834:6: enter_function: entry to ‘generate_code_from_template’
libical-3.0.20/src/libical-glib/tools/generator.c:850:12: branch_true: following ‘true’ branch...
libical-3.0.20/src/libical-glib/tools/generator.c:851:12: branch_true: ...to here
libical-3.0.20/src/libical-glib/tools/generator.c:851:12: branch_true: following ‘true’ branch...
libical-3.0.20/src/libical-glib/tools/generator.c:852:22: branch_true: ...to here
libical-3.0.20/src/libical-glib/tools/generator.c:858:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
libical-3.0.20/src/libical-glib/tools/generator.c:886:20: branch_true: following ‘true’ branch...
libical-3.0.20/src/libical-glib/tools/generator.c:887:33: branch_true: ...to here
libical-3.0.20/src/libical-glib/tools/generator.c:887:67: branch_true: following ‘true’ branch (when ‘iter’ is non-NULL)...
libical-3.0.20/src/libical-glib/tools/generator.c:890:74: branch_true: ...to here
libical-3.0.20/src/libical-glib/tools/generator.c:890:29: call_function: calling ‘get_source_method_body’ from ‘generate_code_from_template’
# 2098|               trueType = get_true_type(parameter->type);
# 2099|               for (i = 0;
# 2100|->                  i < namespace_len && trueType[i] && namespace[i] == trueType[i];
# 2101|                    i++);
# 2102|   

Error: CPPCHECK_WARNING (CWE-476): [#def16]
libical-3.0.20/src/libical/icalerror.c:60: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: _errno
#   58|       if (!_errno) {
#   59|           _errno = malloc(sizeof(icalerrorenum));
#   60|->         *_errno = ICAL_NO_ERROR;
#   61|           pthread_setspecific(icalerrno_key, _errno);
#   62|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
libical-3.0.20/src/libical/icalerror.c:60:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘_errno’
libical-3.0.20/src/libical/icalerror.c:59:18: acquire_memory: this call could return NULL
libical-3.0.20/src/libical/icalerror.c:60:9: danger: ‘_errno’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   58|       if (!_errno) {
#   59|           _errno = malloc(sizeof(icalerrorenum));
#   60|->         *_errno = ICAL_NO_ERROR;
#   61|           pthread_setspecific(icalerrno_key, _errno);
#   62|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def18]
libical-3.0.20/src/libical/icalerror.c:89:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#   87|       /* coverity[var_deref_op] */
#   88|       /* cppcheck-suppress nullPointer */
#   89|->     *p = 1; /*clang-analyzer false positive. we want a crash*/
#   90|   
#   91|       /* cppcheck-suppress nullPointer */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
libical-3.0.20/src/libical/icalerror.c:98:1: warning[-Wanalyzer-malloc-leak]: leak of ‘icalerrno_return()’
libical-3.0.20/src/libical/icalerror.c:95:6: enter_function: entry to ‘icalerror_clear_errno’
libical-3.0.20/src/libical/icalerror.c:97:5: call_function: calling ‘icalerrno_return’ from ‘icalerror_clear_errno’
libical-3.0.20/src/libical/icalerror.c:97:5: return_function: returning to ‘icalerror_clear_errno’ from ‘icalerrno_return’
libical-3.0.20/src/libical/icalerror.c:98:1: danger: ‘icalerrno_return()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/7)
#   96|   {
#   97|       icalerrno = ICAL_NO_ERROR;
#   98|-> }
#   99|   
#  100|   #if ICAL_ERRORS_ARE_FATAL == 1

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
libical-3.0.20/src/libical/icalerror.c:120:9: warning[-Wanalyzer-malloc-leak]: leak of ‘icalerrno_return()’
libical-3.0.20/src/libical/icalerror.c:117:6: enter_function: entry to ‘icalerror_set_errno’
libical-3.0.20/src/libical/icalerror.c:119:5: call_function: calling ‘icalerrno_return’ from ‘icalerror_set_errno’
libical-3.0.20/src/libical/icalerror.c:119:5: return_function: returning to ‘icalerror_set_errno’ from ‘icalerrno_return’
libical-3.0.20/src/libical/icalerror.c:120:9: danger: ‘icalerrno_return()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7)
#  118|   {
#  119|       icalerrno = x;
#  120|->     if (icalerror_get_error_state(x) == ICAL_ERROR_FATAL ||
#  121|           (icalerror_get_error_state(x) == ICAL_ERROR_DEFAULT && icalerror_errors_are_fatal == 1)) {
#  122|           icalerror_warn(icalerror_strerror(x));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
libical-3.0.20/src/libical/icalerror.c:211:12: warning[-Wanalyzer-malloc-leak]: leak of ‘icalerrno_return()’
libical-3.0.20/src/libical/icalerror.c:209:13: enter_function: entry to ‘icalerror_perror’
libical-3.0.20/src/libical/icalerror.c:211:31: call_function: calling ‘icalerrno_return’ from ‘icalerror_perror’
libical-3.0.20/src/libical/icalerror.c:211:31: return_function: returning to ‘icalerror_perror’ from ‘icalerrno_return’
libical-3.0.20/src/libical/icalerror.c:211:12: danger: ‘icalerrno_return()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/7)
#  209|   const char *icalerror_perror(void)
#  210|   {
#  211|->     return icalerror_strerror(icalerrno);
#  212|   }
#  213|   

Error: CPPCHECK_WARNING (CWE-476): [#def22]
libical-3.0.20/src/libical/icalmemory.c:128: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: br
#  126|   
#  127|       for (i = 0; i < BUFFER_RING_SIZE; i++) {
#  128|->         br->ring[i] = 0;
#  129|       }
#  130|       br->pos = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def23]
libical-3.0.20/src/libical/icalmemory.c:130: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: br
#  128|           br->ring[i] = 0;
#  129|       }
#  130|->     br->pos = 0;
#  131|       return (br);
#  132|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def24]
libical-3.0.20/src/libical/icalmemory.c:130:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘br’
libical-3.0.20/src/libical/icalmemory.c:125:26: acquire_memory: this call could return NULL
libical-3.0.20/src/libical/icalmemory.c:127:17: branch_true: following ‘true’ branch (when ‘i != 2500’)...
libical-3.0.20/src/libical/icalmemory.c:128:9: branch_true: ...to here
libical-3.0.20/src/libical/icalmemory.c:130:5: danger: ‘br’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  128|           br->ring[i] = 0;
#  129|       }
#  130|->     br->pos = 0;
#  131|       return (br);
#  132|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
libical-3.0.20/src/libical/icalmemory.c:198:1: warning[-Wanalyzer-malloc-leak]: leak of ‘get_buffer_ring_pthread()’
libical-3.0.20/src/libical/icalmemory.c:182:6: enter_function: entry to ‘icalmemory_add_tmp_buffer’
libical-3.0.20/src/libical/icalmemory.c:184:23: call_function: inlined call to ‘get_buffer_ring’ from ‘icalmemory_add_tmp_buffer’
libical-3.0.20/src/libical/icalmemory.c:184:23: call_function: inlined call to ‘get_buffer_ring’ from ‘icalmemory_add_tmp_buffer’
libical-3.0.20/src/libical/icalmemory.c:187:8: branch_false: following ‘false’ branch...
libical-3.0.20/src/libical/icalmemory.c:192:18: branch_false: ...to here
libical-3.0.20/src/libical/icalmemory.c:198:1: danger: ‘get_buffer_ring_pthread()’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  196|       /* Assign the buffer to a slot */
#  197|       br->ring[br->pos] = buf;
#  198|-> }
#  199|   
#  200|   /*

Error: GCC_ANALYZER_WARNING (CWE-476): [#def26]
libical-3.0.20/src/libical/icalparser.c:142:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘parser’
libical-3.0.20/src/libical/icalparser.c:1393:16: enter_function: entry to ‘icalparser_parse_string’
libical-3.0.20/src/libical/icalparser.c:1404:9: call_function: calling ‘icalparser_new’ from ‘icalparser_parse_string’
libical-3.0.20/src/libical/icalparser.c:1404:9: return_function: returning to ‘icalparser_parse_string’ from ‘icalparser_new’
libical-3.0.20/src/libical/icalparser.c:1405:5: call_function: calling ‘icalparser_set_gen_data’ from ‘icalparser_parse_string’
#  140|   void icalparser_set_gen_data(icalparser *parser, void *data)
#  141|   {
#  142|->     parser->line_gen_data = data;
#  143|   }
#  144|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def27]
libical-3.0.20/src/libical/icalproperty.c:341:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘prop’
libical-3.0.20/src/libical/icalproperty.c:317:20: enter_function: entry to ‘icalproperty_get_value_kind’
libical-3.0.20/src/libical/icalproperty.c:322:9: call_function: calling ‘icalproperty_get_first_parameter’ from ‘icalproperty_get_value_kind’
libical-3.0.20/src/libical/icalproperty.c:322:9: return_function: returning to ‘icalproperty_get_value_kind’ from ‘icalproperty_get_first_parameter’
libical-3.0.20/src/libical/icalproperty.c:324:8: branch_false: following ‘false’ branch...
libical-3.0.20/src/libical/icalproperty.c:329:28: branch_false: ...to here
libical-3.0.20/src/libical/icalproperty.c:329:28: call_function: calling ‘icalproperty_get_value’ from ‘icalproperty_get_value_kind’
libical-3.0.20/src/libical/icalproperty.c:329:28: return_function: returning to ‘icalproperty_get_value_kind’ from ‘icalproperty_get_value’
libical-3.0.20/src/libical/icalproperty.c:341:10: danger: dereference of NULL ‘prop’
#  339|   
#  340|       if (kind != ICAL_NO_VALUE &&
#  341|->         !icalproperty_value_kind_is_default(prop->kind, kind)) {
#  342|           /* Not the default, so it must be specified */
#  343|           kind_string = icalvalue_kind_to_string(kind);

Error: CPPCHECK_WARNING (CWE-476): [#def28]
libical-3.0.20/src/libical/icaltimezone.c:471: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tznames
#  469|           daylight_len = strlen(daylight_tzname);
#  470|           tznames = malloc(standard_len + daylight_len + 2);
#  471|->         strcpy(tznames, standard_tzname);
#  472|           tznames[standard_len] = '/';
#  473|           strcpy(tznames + standard_len + 1, daylight_tzname);

Error: CPPCHECK_WARNING (CWE-476): [#def29]
libical-3.0.20/src/libical/icaltimezone.c:472: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tznames
#  470|           tznames = malloc(standard_len + daylight_len + 2);
#  471|           strcpy(tznames, standard_tzname);
#  472|->         tznames[standard_len] = '/';
#  473|           strcpy(tznames + standard_len + 1, daylight_tzname);
#  474|           return tznames;

Error: CPPCHECK_WARNING (CWE-682): [#def30]
libical-3.0.20/src/libical/icaltimezone.c:473: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  471|           strcpy(tznames, standard_tzname);
#  472|           tznames[standard_len] = '/';
#  473|->         strcpy(tznames + standard_len + 1, daylight_tzname);
#  474|           return tznames;
#  475|       } else {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def31]
libical-3.0.20/src/libical/icaltimezone.c:1387:13: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libical-3.0.20/src/libical/icaltimezone.c:1476:15: enter_function: entry to ‘icaltimezone_get_builtin_timezone_from_tzid’
libical-3.0.20/src/libical/icaltimezone.c:1482:8: branch_false: following ‘false’ branch...
libical-3.0.20/src/libical/icaltimezone.c:1486:16: call_function: calling ‘icaltimezone_get_builtin_timezone’ from ‘icaltimezone_get_builtin_timezone_from_tzid’
# 1385|           zone = icalarray_element_at(builtin_timezones, lower);
# 1386|           zone_location = icaltimezone_get_location(zone);
# 1387|->         if (strcmp(location, zone_location) == 0)
# 1388|               return zone;
# 1389|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def32]
libical-3.0.20/src/libical/icaltimezone.c:1582:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘coord’
libical-3.0.20/src/libical/icaltimezone.c:1588:12: enter_function: entry to ‘fetch_lat_long_from_string’
libical-3.0.20/src/libical/icaltimezone.c:1608:19: acquire_memory: this call could return NULL
libical-3.0.20/src/libical/icaltimezone.c:1644:9: call_function: calling ‘parse_coord’ from ‘fetch_lat_long_from_string’
# 1580|       }
# 1581|   
# 1582|->     if (coord[0] == '-')
# 1583|           *degrees = -*degrees;
# 1584|   

Error: CPPCHECK_WARNING (CWE-476): [#def33]
libical-3.0.20/src/libical/icaltimezone.c:1609: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: lat
# 1607|       len = (ptrdiff_t) (sptr - temp);
# 1608|       lat = (char *)malloc(len + 1);
# 1609|->     memset(lat, '\0', len + 1);
# 1610|       strncpy(lat, temp, len);
# 1611|       lat[len] = '\0';

Error: CPPCHECK_WARNING (CWE-476): [#def34]
libical-3.0.20/src/libical/icaltimezone.c:1610: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: lat
# 1608|       lat = (char *)malloc(len + 1);
# 1609|       memset(lat, '\0', len + 1);
# 1610|->     strncpy(lat, temp, len);
# 1611|       lat[len] = '\0';
# 1612|       while ((*sptr != '\t') && (*sptr != '\0')) {

Error: CPPCHECK_WARNING (CWE-476): [#def35]
libical-3.0.20/src/libical/icaltimezone.c:1611: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: lat
# 1609|       memset(lat, '\0', len + 1);
# 1610|       strncpy(lat, temp, len);
# 1611|->     lat[len] = '\0';
# 1612|       while ((*sptr != '\t') && (*sptr != '\0')) {
# 1613|           sptr++;

Error: CPPCHECK_WARNING (CWE-476): [#def36]
libical-3.0.20/src/libical/icaltz-util.c:194: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  192|       str += idx;
#  193|       ret = (char *)malloc(size + 1);
#  194|->     ret = strncpy(ret, str, size);
#  195|       ret[size] = '\0';
#  196|   

Error: CPPCHECK_WARNING (CWE-476): [#def37]
libical-3.0.20/src/libical/icaltz-util.c:195: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  193|       ret = (char *)malloc(size + 1);
#  194|       ret = strncpy(ret, str, size);
#  195|->     ret[size] = '\0';
#  196|   
#  197|       return ret;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
libical-3.0.20/src/libical/icalvalue.c:474:16: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(str)’
libical-3.0.20/src/libical/icalvalue.c:772:12: enter_function: entry to ‘icalvalue_new_from_string’
libical-3.0.20/src/libical/icalvalue.c:774:12: call_function: calling ‘icalvalue_new_from_string_with_error’ from ‘icalvalue_new_from_string’
#  472|   
#  473|               attach = icalattach_new_from_data(strdup(str), free_icalvalue_attach_data, 0);
#  474|->             if (!attach)
#  475|                 break;
#  476|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def39]
libical-3.0.20/src/libical/icalvalue.c:1419:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libical-3.0.20/src/libical/icalvalue.c:1319:31: enter_function: entry to ‘icalvalue_compare’
libical-3.0.20/src/libical/icalvalue.c:1321:5: branch_false: following ‘false’ branch (when ‘a’ is non-NULL)...
libical-3.0.20/src/libical/icalvalue.c:1322:5: branch_false: ...to here
libical-3.0.20/src/libical/icalvalue.c:1322:5: branch_false: following ‘false’ branch (when ‘b’ is non-NULL)...
libical-3.0.20/src/libical/icalvalue.c:1325:11: branch_false: ...to here
libical-3.0.20/src/libical/icalvalue.c:1325:11: call_function: calling ‘icalvalue_is_time’ from ‘icalvalue_compare’
libical-3.0.20/src/libical/icalvalue.c:1325:11: return_function: returning to ‘icalvalue_compare’ from ‘icalvalue_is_time’
libical-3.0.20/src/libical/icalvalue.c:1325:35: call_function: calling ‘icalvalue_is_time’ from ‘icalvalue_compare’
libical-3.0.20/src/libical/icalvalue.c:1325:35: return_function: returning to ‘icalvalue_compare’ from ‘icalvalue_is_time’
libical-3.0.20/src/libical/icalvalue.c:1329:13: call_function: calling ‘icalvalue_isa’ from ‘icalvalue_compare’
libical-3.0.20/src/libical/icalvalue.c:1329:13: return_function: returning to ‘icalvalue_compare’ from ‘icalvalue_isa’
libical-3.0.20/src/libical/icalvalue.c:1417:21: call_function: calling ‘icalvalue_as_ical_string_r’ from ‘icalvalue_compare’
libical-3.0.20/src/libical/icalvalue.c:1417:21: return_function: returning to ‘icalvalue_compare’ from ‘icalvalue_as_ical_string_r’
libical-3.0.20/src/libical/icalvalue.c:1418:21: call_function: calling ‘icalvalue_as_ical_string_r’ from ‘icalvalue_compare’
libical-3.0.20/src/libical/icalvalue.c:1418:21: return_function: returning to ‘icalvalue_compare’ from ‘icalvalue_as_ical_string_r’
libical-3.0.20/src/libical/icalvalue.c:1419:17: danger: argument 1 (‘icalvalue_as_ical_string_r(a)’) NULL where non-null expected
# 1417|               temp1 = icalvalue_as_ical_string_r(a);
# 1418|               temp2 = icalvalue_as_ical_string_r(b);
# 1419|->             r = strcmp(temp1, temp2);
# 1420|               free(temp1);
# 1421|               free(temp2);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def40]
libical-3.0.20/src/libical/icalvalue.c:1485:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘value’
libical-3.0.20/src/libical/icalvalue.c:772:12: enter_function: entry to ‘icalvalue_new_from_string’
libical-3.0.20/src/libical/icalvalue.c:774:12: call_function: calling ‘icalvalue_new_from_string_with_error’ from ‘icalvalue_new_from_string’
# 1483|   void icalvalue_reset_kind(icalvalue *value)
# 1484|   {
# 1485|->     if ((value->kind == ICAL_DATETIME_VALUE || value->kind == ICAL_DATE_VALUE) &&
# 1486|           !icaltime_is_null_time(value->data.v_time)) {
# 1487|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def41]
libical-3.0.20/src/libical/pvl.c:153:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pvl_new_element(d, *L.head, 0)’
libical-3.0.20/src/libical/pvl.c:317:6: enter_function: entry to ‘pvl_insert_before’
libical-3.0.20/src/libical/pvl.c:323:8: branch_true: following ‘true’ branch (when ‘P’ is NULL)...
libical-3.0.20/src/libical/pvl.c:324:9: branch_true: ...to here
libical-3.0.20/src/libical/pvl.c:324:9: call_function: calling ‘pvl_unshift’ from ‘pvl_insert_before’
#  151|       struct pvl_elem_t *E = pvl_new_element(d, L->head, 0);
#  152|   
#  153|->     if (E->next != 0) {
#  154|           /* Link the head node to it */
#  155|           E->next->prior = E;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def42]
libical-3.0.20/src/libical/pvl.c:301:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘*L.tail’
libical-3.0.20/src/libical/pvl.c:287:6: enter_function: entry to ‘pvl_insert_after’
libical-3.0.20/src/libical/pvl.c:293:8: branch_false: following ‘false’ branch (when ‘P’ is non-NULL)...
libical-3.0.20/src/libical/pvl.c:298:14: branch_false: ...to here
libical-3.0.20/src/libical/pvl.c:298:8: branch_true: following ‘true’ branch...
libical-3.0.20/src/libical/pvl.c:299:13: branch_true: ...to here
libical-3.0.20/src/libical/pvl.c:299:13: call_function: calling ‘pvl_new_element’ from ‘pvl_insert_after’
libical-3.0.20/src/libical/pvl.c:299:13: return_function: returning to ‘pvl_insert_after’ from ‘pvl_new_element’
libical-3.0.20/src/libical/pvl.c:301:9: danger: dereference of NULL ‘pvl_new_element(d, 0,  P)’
#  299|           E = pvl_new_element(d, 0, P);
#  300|           L->tail = E;
#  301|->         E->prior->next = E;
#  302|       } else {
#  303|           E = pvl_new_element(d, P->next, P);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def43]
libical-3.0.20/src/libical/pvl.c:304:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pvl_new_element(d, *P.next,  P)’
libical-3.0.20/src/libical/pvl.c:287:6: enter_function: entry to ‘pvl_insert_after’
libical-3.0.20/src/libical/pvl.c:293:8: branch_false: following ‘false’ branch (when ‘P’ is non-NULL)...
libical-3.0.20/src/libical/pvl.c:298:14: branch_false: ...to here
libical-3.0.20/src/libical/pvl.c:298:8: branch_false: following ‘false’ branch...
libical-3.0.20/src/libical/pvl.c:303:32: branch_false: ...to here
libical-3.0.20/src/libical/pvl.c:303:13: call_function: calling ‘pvl_new_element’ from ‘pvl_insert_after’
libical-3.0.20/src/libical/pvl.c:303:13: return_function: returning to ‘pvl_insert_after’ from ‘pvl_new_element’
libical-3.0.20/src/libical/pvl.c:304:9: danger: dereference of NULL ‘pvl_new_element(d, *P.next,  P)’
#  302|       } else {
#  303|           E = pvl_new_element(d, P->next, P);
#  304|->         E->next->prior = E;
#  305|           E->prior->next = E;
#  306|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def44]
libical-3.0.20/src/libical/pvl.c:330:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pvl_new_element(d,  P, 0)’
libical-3.0.20/src/libical/pvl.c:317:6: enter_function: entry to ‘pvl_insert_before’
libical-3.0.20/src/libical/pvl.c:323:8: branch_false: following ‘false’ branch (when ‘P’ is non-NULL)...
libical-3.0.20/src/libical/pvl.c:328:14: branch_false: ...to here
libical-3.0.20/src/libical/pvl.c:328:8: branch_true: following ‘true’ branch...
libical-3.0.20/src/libical/pvl.c:329:13: branch_true: ...to here
libical-3.0.20/src/libical/pvl.c:329:13: call_function: calling ‘pvl_new_element’ from ‘pvl_insert_before’
libical-3.0.20/src/libical/pvl.c:329:13: return_function: returning to ‘pvl_insert_before’ from ‘pvl_new_element’
libical-3.0.20/src/libical/pvl.c:330:9: danger: dereference of NULL ‘pvl_new_element(d,  P, 0)’
#  328|       if (P == L->head) {
#  329|           E = pvl_new_element(d, P, 0);
#  330|->         E->next->prior = E;
#  331|           L->head = E;
#  332|       } else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def45]
libical-3.0.20/src/libical/pvl.c:334:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pvl_new_element(d,  P, *P.prior)’
libical-3.0.20/src/libical/pvl.c:317:6: enter_function: entry to ‘pvl_insert_before’
libical-3.0.20/src/libical/pvl.c:333:13: call_function: calling ‘pvl_new_element’ from ‘pvl_insert_before’
libical-3.0.20/src/libical/pvl.c:333:13: return_function: returning to ‘pvl_insert_before’ from ‘pvl_new_element’
libical-3.0.20/src/libical/pvl.c:334:9: danger: dereference of NULL ‘pvl_new_element(d,  P, *P.prior)’
#  332|       } else {
#  333|           E = pvl_new_element(d, P, P->prior);
#  334|->         E->prior->next = E;
#  335|           E->next->prior = E;
#  336|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
libical-3.0.20/src/libical/sspm.c:1235:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf.buffer’
libical-3.0.20/src/libical/sspm.c:1524:5: enter_function: entry to ‘sspm_write_mime’
libical-3.0.20/src/libical/sspm.c:1533:18: acquire_memory: allocated here
libical-3.0.20/src/libical/sspm.c:1540:8: branch_true: following ‘true’ branch (when ‘header’ is non-NULL)...
libical-3.0.20/src/libical/sspm.c:1541:9: branch_true: ...to here
libical-3.0.20/src/libical/sspm.c:1541:9: call_function: calling ‘sspm_append_string’ from ‘sspm_write_mime’
libical-3.0.20/src/libical/sspm.c:1541:9: return_function: returning to ‘sspm_write_mime’ from ‘sspm_append_string’
libical-3.0.20/src/libical/sspm.c:1545:8: branch_true: following ‘true’ branch...
libical-3.0.20/src/libical/sspm.c:1546:9: call_function: calling ‘sspm_append_char’ from ‘sspm_write_mime’
# 1233|   
# 1234|           buf->pos = new_pos;
# 1235|->         buf->buffer = new_buf;
# 1236|       }
# 1237|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
libical-3.0.20/src/libical/sspm.c:1264:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf.buffer’
libical-3.0.20/src/libical/sspm.c:1524:5: enter_function: entry to ‘sspm_write_mime’
libical-3.0.20/src/libical/sspm.c:1533:18: acquire_memory: allocated here
libical-3.0.20/src/libical/sspm.c:1540:8: branch_true: following ‘true’ branch (when ‘header’ is non-NULL)...
libical-3.0.20/src/libical/sspm.c:1541:9: branch_true: ...to here
libical-3.0.20/src/libical/sspm.c:1541:9: call_function: calling ‘sspm_append_string’ from ‘sspm_write_mime’
# 1262|   
# 1263|           buf->pos = new_pos;
# 1264|->         buf->buffer = new_buf;
# 1265|       }
# 1266|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def48]
libical-3.0.20/src/libical/sspm.c:1534:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf.buffer’
libical-3.0.20/src/libical/sspm.c:1533:18: acquire_memory: this call could return NULL
libical-3.0.20/src/libical/sspm.c:1534:5: danger: ‘malloc(4096)’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1532|   
# 1533|       buf.buffer = malloc(4096);
# 1534|->     buf.buffer[0] = '\0';
# 1535|       buf.pos = buf.buffer;
# 1536|       buf.buf_size = 10;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def49]
libical-3.0.20/src/libicalss/icalcalendar.c:67:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*impl.dir’ where non-null expected
libical-3.0.20/src/libicalss/icalcalendar.c:86:15: enter_function: entry to ‘icalcalendar_new’
libical-3.0.20/src/libicalss/icalcalendar.c:90:5: branch_false: following ‘false’ branch (when ‘dir’ is non-NULL)...
libical-3.0.20/src/libicalss/icalcalendar.c:92:12: branch_false: ...to here
libical-3.0.20/src/libicalss/icalcalendar.c:92:12: call_function: calling ‘icalcalendar_new_impl’ from ‘icalcalendar_new’
libical-3.0.20/src/libicalss/icalcalendar.c:92:12: return_function: returning to ‘icalcalendar_new’ from ‘icalcalendar_new_impl’
libical-3.0.20/src/libicalss/icalcalendar.c:94:8: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalss/icalcalendar.c:98:17: branch_false: ...to here
libical-3.0.20/src/libicalss/icalcalendar.c:98:17: acquire_memory: this call could return NULL
libical-3.0.20/src/libicalss/icalcalendar.c:104:9: call_function: calling ‘icalcalendar_create’ from ‘icalcalendar_new’
#argument 2 of ‘__builtin_strncpy’ must be non-null
#   65|   
#   66|       path[0] = '\0';
#   67|->     strncpy(path, impl->dir, MAXPATHLEN - 1);
#   68|       strncat(path, "/", MAXPATHLEN - strlen(path) - 1);
#   69|       strncat(path, BOOKED_DIR, MAXPATHLEN - strlen(path) - 1);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def50]
libical-3.0.20/src/libicalss/icalcluster.c:64:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘icalcluster_new_impl()’
libical-3.0.20/src/libicalss/icalcluster.c:60:14: enter_function: entry to ‘icalcluster_new’
libical-3.0.20/src/libicalss/icalcluster.c:62:37: call_function: calling ‘icalcluster_new_impl’ from ‘icalcluster_new’
libical-3.0.20/src/libicalss/icalcluster.c:62:37: return_function: returning to ‘icalcluster_new’ from ‘icalcluster_new_impl’
libical-3.0.20/src/libicalss/icalcluster.c:64:5: danger: dereference of NULL ‘icalcluster_new_impl()’
#   62|       struct icalcluster_impl *impl = icalcluster_new_impl();
#   63|   
#   64|->     assert(impl->data == 0);
#   65|   
#   66|       impl->key = strdup(key);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def51]
libical-3.0.20/src/libicalss/icalcluster.c:93:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘icalcluster_new_impl()’
libical-3.0.20/src/libicalss/icalcluster.c:88:14: enter_function: entry to ‘icalcluster_new_clone’
libical-3.0.20/src/libicalss/icalcluster.c:91:37: call_function: calling ‘icalcluster_new_impl’ from ‘icalcluster_new_clone’
libical-3.0.20/src/libicalss/icalcluster.c:91:37: return_function: returning to ‘icalcluster_new_clone’ from ‘icalcluster_new_impl’
libical-3.0.20/src/libicalss/icalcluster.c:93:5: danger: dereference of NULL ‘icalcluster_new_impl()’
#   91|       struct icalcluster_impl *impl = icalcluster_new_impl();
#   92|   
#   93|->     impl->key = strdup(old->key);
#   94|       impl->data = icalcomponent_new_clone(old->data);
#   95|       impl->changed = 0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def52]
libical-3.0.20/src/libicalss/icalfileset.c:207:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*fset.path’ where non-null expected
libical-3.0.20/src/libicalss/icalfileset.c:71:10: enter_function: entry to ‘icalfileset_init’
libical-3.0.20/src/libicalss/icalfileset.c:80:5: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
libical-3.0.20/src/libicalss/icalfileset.c:81:5: branch_false: ...to here
libical-3.0.20/src/libicalss/icalfileset.c:81:5: branch_false: following ‘false’ branch (when ‘set’ is non-NULL)...
libical-3.0.20/src/libicalss/icalfileset.c:83:18: branch_false: ...to here
libical-3.0.20/src/libicalss/icalfileset.c:83:18: acquire_memory: this call could return NULL
libical-3.0.20/src/libicalss/icalfileset.c:89:25: call_function: calling ‘icalfileset_filesize’ from ‘icalfileset_init’
#  205|       struct stat sbuf;
#  206|   
#  207|->     if (stat(fset->path, &sbuf) != 0) {
#  208|   
#  209|           /* A file by the given name does not exist, or there was

Error: GCC_ANALYZER_WARNING (CWE-688): [#def53]
libical-3.0.20/src/libicalss/icalmessage.c:72:13: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libical-3.0.20/src/libicalss/icalmessage.c:280:16: enter_function: entry to ‘icalmessage_new_error_reply’
libical-3.0.20/src/libicalss/icalmessage.c:289:5: branch_false: following ‘false’ branch (when ‘c’ is non-NULL)...
libical-3.0.20/src/libicalss/icalmessage.c:291:5: branch_false: ...to here
libical-3.0.20/src/libicalss/icalmessage.c:292:13: call_function: calling ‘icalmessage_new_reply_base’ from ‘icalmessage_new_error_reply’
#argument 1 of ‘__builtin_strstr’ must be non-null
#   70|           lattendee = lowercase(icalproperty_get_attendee(p));
#   71|   
#   72|->         if (strstr(lattendee, user) != 0) {
#   73|               free(lattendee);
#   74|               attendee = p;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def54]
libical-3.0.20/src/libicalss/icalmessage.c:72:13: warning[-Wanalyzer-null-argument]: use of NULL ‘user’ where non-null expected
libical-3.0.20/src/libicalss/icalmessage.c:280:16: enter_function: entry to ‘icalmessage_new_error_reply’
libical-3.0.20/src/libicalss/icalmessage.c:289:5: branch_false: following ‘false’ branch (when ‘c’ is non-NULL)...
libical-3.0.20/src/libicalss/icalmessage.c:291:5: branch_false: ...to here
libical-3.0.20/src/libicalss/icalmessage.c:292:13: call_function: calling ‘icalmessage_new_reply_base’ from ‘icalmessage_new_error_reply’
#argument 2 of ‘__builtin_strstr’ must be non-null
#   70|           lattendee = lowercase(icalproperty_get_attendee(p));
#   71|   
#   72|->         if (strstr(lattendee, user) != 0) {
#   73|               free(lattendee);
#   74|               attendee = p;

Error: CPPCHECK_WARNING (CWE-476): [#def55]
libical-3.0.20/src/libicalss/icalsslexer.c:1161: warning[nullPointer]: Possible null pointer dereference: b
# 1159|   
# 1160|                           int yy_c_buf_p_offset =
# 1161|->                                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
# 1162|   
# 1163|                           if ( b->yy_is_our_buffer )

Error: CPPCHECK_WARNING (CWE-476): [#def56]
libical-3.0.20/src/libicalss/icalsslexer.c:1163: warning[nullPointer]: Possible null pointer dereference: b
# 1161|                                   (int) ((yy_c_buf_p) - b->yy_ch_buf);
# 1162|   
# 1163|->                         if ( b->yy_is_our_buffer )
# 1164|                                   {
# 1165|                                   size_t new_size = b->yy_buf_size * 2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
libical-3.0.20/src/libicalss/icalsslexer.c:1172:33: warning[-Wanalyzer-malloc-leak]: leak of ‘*b.yy_ch_buf’
libical-3.0.20/src/libicalss/icalsslexer.c:1105:12: enter_function: entry to ‘yy_get_next_buffer’
libical-3.0.20/src/libicalss/icalsslexer.c:1112:12: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalss/icalsslexer.c:1116:14: branch_false: ...to here
libical-3.0.20/src/libicalss/icalsslexer.c:1116:12: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalss/icalsslexer.c:1138:32: branch_false: ...to here
libical-3.0.20/src/libicalss/icalsslexer.c:1143:12: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalss/icalsslexer.c:1152:25: branch_false: ...to here
libical-3.0.20/src/libicalss/icalsslexer.c:1154:25: branch_true: following ‘true’ branch (when ‘num_to_read == 0’)...
libical-3.0.20/src/libicalss/icalsslexer.c:1158:45: branch_true: ...to here
libical-3.0.20/src/libicalss/icalsslexer.c:1158:45: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalss/icalsslexer.c:1158:41: branch_true: ...to here
libical-3.0.20/src/libicalss/icalsslexer.c:1174:41: call_function: inlined call to ‘ssrealloc’ from ‘yy_get_next_buffer’
libical-3.0.20/src/libicalss/icalsslexer.c:1180:28: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalss/icalsslexer.c:1184:40: branch_false: ...to here
libical-3.0.20/src/libicalss/icalsslexer.c:1154:25: branch_true: following ‘true’ branch (when ‘num_to_read == 0’)...
libical-3.0.20/src/libicalss/icalsslexer.c:1158:45: branch_true: ...to here
libical-3.0.20/src/libicalss/icalsslexer.c:1158:45: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalss/icalsslexer.c:1158:41: branch_true: ...to here
libical-3.0.20/src/libicalss/icalsslexer.c:1163:28: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalss/icalsslexer.c:1165:51: branch_true: ...to here
libical-3.0.20/src/libicalss/icalsslexer.c:1174:41: call_function: inlined call to ‘ssrealloc’ from ‘yy_get_next_buffer’
libical-3.0.20/src/libicalss/icalsslexer.c:1172:33: danger: ‘*b.yy_ch_buf’ leaks here; was allocated at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
# 1170|                                           b->yy_buf_size *= 2;
# 1171|   
# 1172|->                                 b->yy_ch_buf = (char *)
# 1173|                                           /* Include room in for 2 EOB chars. */
# 1174|                                           ssrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
libical-3.0.20/src/libicalss/icalsslexer.c:1481:9: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
libical-3.0.20/src/libicalss/icalsslexer.c:1473:21: enter_function: entry to ‘ss_create_buffer’
libical-3.0.20/src/libicalss/icalsslexer.c:1477:31: call_function: inlined call to ‘ssalloc’ from ‘ss_create_buffer’
libical-3.0.20/src/libicalss/icalsslexer.c:1478:12: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalss/icalsslexer.c:1481:9: branch_false: ...to here
libical-3.0.20/src/libicalss/icalsslexer.c:1481:9: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 1479|                   YY_FATAL_ERROR( "out of dynamic memory in ss_create_buffer()" );
# 1480|   
# 1481|->         b->yy_buf_size = size;
# 1482|   
# 1483|           /* yy_ch_buf has to be 2 characters longer than the size given because

Error: CPPCHECK_WARNING (CWE-476): [#def59]
libical-3.0.20/src/libicalss/icalsslexer.c:1527: warning[nullPointer]: Possible null pointer dereference: b
# 1525|           ss_flush_buffer(b );
# 1526|   
# 1527|->         b->yy_input_file = file;
# 1528|           b->yy_fill_buffer = 1;
# 1529|   

Error: CPPCHECK_WARNING (CWE-476): [#def60]
libical-3.0.20/src/libicalss/icalsslexer.c:1528: warning[nullPointer]: Possible null pointer dereference: b
# 1526|   
# 1527|           b->yy_input_file = file;
# 1528|->         b->yy_fill_buffer = 1;
# 1529|   
# 1530|       /* If b is the current buffer, then ss_init_buffer was _probably_

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
libical-3.0.20/src/libicalss/icalsslexer.c:1742:32: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
libical-3.0.20/src/libicalss/icalsslexer.c:1726:17: enter_function: entry to ‘ss_scan_bytes’
libical-3.0.20/src/libicalss/icalsslexer.c:1735:24: call_function: inlined call to ‘ssalloc’ from ‘ss_scan_bytes’
libical-3.0.20/src/libicalss/icalsslexer.c:1736:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
libical-3.0.20/src/libicalss/icalsslexer.c:1744:13: call_function: calling ‘ss_scan_buffer’ from ‘ss_scan_bytes’
# 1740|                   buf[i] = yybytes[i];
# 1741|   
# 1742|->         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 1743|   
# 1744|           b = ss_scan_buffer(buf,n );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
libical-3.0.20/src/libicalss/icalssyacc.c:1300:29: warning[-Wanalyzer-malloc-leak]: leak of ‘yyptr’
libical-3.0.20/src/libicalss/icalssyacc.c:1259:6: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalss/icalssyacc.c:1325:3: branch_false: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1339:6: branch_false: following ‘false’ branch (when ‘yyn != -10’)...
libical-3.0.20/src/libicalss/icalssyacc.c:1345:7: branch_false: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1345:6: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalss/icalssyacc.c:1347:7: branch_true: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1365:7: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalss/icalssyacc.c:1366:5: branch_true: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1402:6: branch_true: following ‘true’ branch (when ‘yyn == 0’)...
libical-3.0.20/src/libicalss/icalssyacc.c:1403:5: branch_true: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1528:6: branch_true: following ‘true’ branch (when ‘yyerrstatus == 0’)...
libical-3.0.20/src/libicalss/icalssyacc.c:1530:7: branch_true: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1570:6: branch_false: following ‘false’ branch (when ‘yyerrstatus != 3’)...
libical-3.0.20/src/libicalss/icalssyacc.c:1591:3: branch_false: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1625:10: branch_true: following ‘true’ branch (when ‘yyn != -10’)...
libical-3.0.20/src/libicalss/icalssyacc.c:1627:11: branch_true: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1628:14: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalss/icalssyacc.c:1631:18: branch_true: following ‘true’ branch (when ‘yyn != 0’)...
libical-3.0.20/src/libicalss/icalssyacc.c:1648:6: branch_true: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1648:6: branch_false: following ‘false’ branch (when ‘yyn != 6’)...
libical-3.0.20/src/libicalss/icalssyacc.c:1651:3: branch_false: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1259:6: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalss/icalssyacc.c:1262:31: branch_true: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1291:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
libical-3.0.20/src/libicalss/icalssyacc.c:1293:7: branch_false: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1300:29: acquire_memory: allocated here
libical-3.0.20/src/libicalss/icalssyacc.c:1301:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
libical-3.0.20/src/libicalss/icalssyacc.c:1303:9: branch_false: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1307:12: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalss/icalssyacc.c:1313:7: branch_false: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1321:10: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalss/icalssyacc.c:1325:3: branch_false: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1339:6: branch_false: following ‘false’ branch (when ‘yyn != -10’)...
libical-3.0.20/src/libicalss/icalssyacc.c:1345:7: branch_false: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1365:6: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalss/icalssyacc.c:1368:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
libical-3.0.20/src/libicalss/icalssyacc.c:1376:6: branch_false: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1376:6: branch_false: following ‘false’ branch (when ‘yyn != 6’)...
libical-3.0.20/src/libicalss/icalssyacc.c:1381:6: branch_false: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1259:6: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalss/icalssyacc.c:1262:31: branch_true: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1291:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
libical-3.0.20/src/libicalss/icalssyacc.c:1293:7: branch_false: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1300:29: danger: ‘yyptr’ leaks here; was allocated at [(27)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/26)
# 1298|           yytype_int16 *yyss1 = yyss;
# 1299|           union yyalloc *yyptr =
# 1300|->           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
# 1301|           if (! yyptr)
# 1302|             goto yyexhaustedlab;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def63]
libical-3.0.20/src/libicalss/icalssyacc.c:1303:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
libical-3.0.20/src/libicalss/icalssyacc.c:1259:6: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalss/icalssyacc.c:1262:31: branch_true: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1291:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
libical-3.0.20/src/libicalss/icalssyacc.c:1293:7: branch_false: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1301:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
libical-3.0.20/src/libicalss/icalssyacc.c:1303:9: branch_false: ...to here
libical-3.0.20/src/libicalss/icalssyacc.c:1303:9: danger: use of uninitialized value ‘yyss’ here
# 1301|           if (! yyptr)
# 1302|             goto yyexhaustedlab;
# 1303|->         YYSTACK_RELOCATE (yyss);
# 1304|           YYSTACK_RELOCATE (yyvs);
# 1305|   

Error: CPPCHECK_WARNING (CWE-476): [#def64]
libical-3.0.20/src/libicalvcal/icalvcal.c:533: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_url
#  531|   
#  532|                   new_url = malloc(len);
#  533|->                 strcpy(new_url, "file://");
#  534|                   strcat(new_url, url);
#  535|   

Error: CPPCHECK_WARNING (CWE-476): [#def65]
libical-3.0.20/src/libicalvcal/icalvcal.c:534: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_url
#  532|                   new_url = malloc(len);
#  533|                   strcpy(new_url, "file://");
#  534|->                 strcat(new_url, url);
#  535|   
#  536|                   new_attach = icalattach_new_from_url(new_url);

Error: CPPCHECK_WARNING (CWE-476): [#def66]
libical-3.0.20/src/libicalvcal/vcc.c:482: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p2
#  480|                   i = strlen(p1)+strlen(value)+2;
#  481|                   p2 = malloc(i);
#  482|->                 snprintf(p2,i,"%s;%s",p1,value);
#  483|                   deleteStr(p1);
#  484|                   p3 = (wchar_t *) vObjectUStringZValue(curProp);

Error: CPPCHECK_WARNING (CWE-476): [#def67]
libical-3.0.20/src/libicalvcal/vobject.c:102: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
#  100|   {
#  101|       VObject *p = (VObject*)malloc(sizeof(VObject));
#  102|->     p->next = 0;
#  103|       p->id = id;
#  104|       p->prop = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def68]
libical-3.0.20/src/libicalvcal/vobject.c:103: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
#  101|       VObject *p = (VObject*)malloc(sizeof(VObject));
#  102|       p->next = 0;
#  103|->     p->id = id;
#  104|       p->prop = 0;
#  105|       VALUE_TYPE(p) = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def69]
libical-3.0.20/src/libicalvcal/vobject.c:104: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
#  102|       p->next = 0;
#  103|       p->id = id;
#  104|->     p->prop = 0;
#  105|       VALUE_TYPE(p) = 0;
#  106|       ANY_VALUE_OF(p) = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def70]
libical-3.0.20/src/libicalvcal/vobject.c:105: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
#  103|       p->id = id;
#  104|       p->prop = 0;
#  105|->     VALUE_TYPE(p) = 0;
#  106|       ANY_VALUE_OF(p) = 0;
#  107|       return p;

Error: CPPCHECK_WARNING (CWE-476): [#def71]
libical-3.0.20/src/libicalvcal/vobject.c:106: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
#  104|       p->prop = 0;
#  105|       VALUE_TYPE(p) = 0;
#  106|->     ANY_VALUE_OF(p) = 0;
#  107|       return p;
#  108|   }

Error: CPPCHECK_WARNING (CWE-476): [#def72]
libical-3.0.20/src/libicalvcal/vobject.c:151: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
#  149|   {
#  150|       StrItem *p = (StrItem*)malloc(sizeof(StrItem));
#  151|->     p->next = next;
#  152|       p->s = s;
#  153|       p->refCnt = 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def73]
libical-3.0.20/src/libicalvcal/vobject.c:151:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘p’
libical-3.0.20/src/libicalvcal/vobject.c:969:13: enter_function: entry to ‘lookupProp’
libical-3.0.20/src/libicalvcal/vobject.c:981:12: call_function: calling ‘lookupStr’ from ‘lookupProp’
#  149|   {
#  150|       StrItem *p = (StrItem*)malloc(sizeof(StrItem));
#  151|->     p->next = next;
#  152|       p->s = s;
#  153|       p->refCnt = 1;

Error: CPPCHECK_WARNING (CWE-476): [#def74]
libical-3.0.20/src/libicalvcal/vobject.c:152: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
#  150|       StrItem *p = (StrItem*)malloc(sizeof(StrItem));
#  151|       p->next = next;
#  152|->     p->s = s;
#  153|       p->refCnt = 1;
#  154|       return p;

Error: CPPCHECK_WARNING (CWE-476): [#def75]
libical-3.0.20/src/libicalvcal/vobject.c:153: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
#  151|       p->next = next;
#  152|       p->s = s;
#  153|->     p->refCnt = 1;
#  154|       return p;
#  155|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
libical-3.0.20/src/libicalvcal/vobject.c:1072:9: warning[-Wanalyzer-malloc-leak]: leak of ‘*fp.s’
libical-3.0.20/src/libicalvcal/vobject.c:1060:12: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1065:18: branch_false: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1065:17: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1066:25: branch_true: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1068:16: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1068:13: branch_true: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1060:12: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1065:18: branch_false: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1065:17: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1070:13: branch_false: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1070:12: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1072:9: branch_false: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1072:9: danger: ‘*fp.s’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 1070|           if (fp->alloc)
# 1071|               free(fp->s);
# 1072|->         fp->s = 0;
# 1073|           fp->fail = 1;
# 1074|           }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def77]
libical-3.0.20/src/libicalvcal/vobject.c:1437:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pw’
libical-3.0.20/src/libicalvcal/vobject.c:1431:24: acquire_memory: this call could return NULL
libical-3.0.20/src/libicalvcal/vobject.c:1435:12: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1436:12: branch_true: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1436:12: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1437:13: branch_true: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1437:13: danger: ‘pw’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1435|       while (*ps) {
# 1436|           if (*ps == '\n')
# 1437|->             *pw = (wchar_t)0x2028;
# 1438|           else if (*ps == '\r')
# 1439|               *pw = (wchar_t)0x2029;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def78]
libical-3.0.20/src/libicalvcal/vobject.c:1439:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pw’
libical-3.0.20/src/libicalvcal/vobject.c:1431:24: acquire_memory: this call could return NULL
libical-3.0.20/src/libicalvcal/vobject.c:1435:12: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1436:12: branch_true: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1436:12: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1438:17: branch_false: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1438:17: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1439:13: branch_true: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1439:13: danger: ‘pw’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 1437|               *pw = (wchar_t)0x2028;
# 1438|           else if (*ps == '\r')
# 1439|->             *pw = (wchar_t)0x2029;
# 1440|           else
# 1441|               *pw = (wchar_t)(unsigned char)*ps;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def79]
libical-3.0.20/src/libicalvcal/vobject.c:1441:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pw’
libical-3.0.20/src/libicalvcal/vobject.c:1431:24: acquire_memory: this call could return NULL
libical-3.0.20/src/libicalvcal/vobject.c:1435:12: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1436:12: branch_true: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1436:12: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1438:17: branch_false: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1438:17: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1441:28: branch_false: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1441:13: danger: ‘pw’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 1439|               *pw = (wchar_t)0x2029;
# 1440|           else
# 1441|->             *pw = (wchar_t)(unsigned char)*ps;
# 1442|           ps++; pw++;
# 1443|           }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def80]
libical-3.0.20/src/libicalvcal/vobject.c:1444:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pw’
libical-3.0.20/src/libicalvcal/vobject.c:1431:24: acquire_memory: this call could return NULL
libical-3.0.20/src/libicalvcal/vobject.c:1435:12: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1444:5: branch_false: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1444:5: danger: ‘pw’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 1442|           ps++; pw++;
# 1443|           }
# 1444|->     *pw = (wchar_t)0;
# 1445|   
# 1446|       return r;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def81]
libical-3.0.20/src/libicalvcal/vobject.c:1473:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘t’
libical-3.0.20/src/libicalvcal/vobject.c:1461:7: enter_function: entry to ‘fakeCString’
libical-3.0.20/src/libicalvcal/vobject.c:1466:8: branch_false: following ‘false’ branch (when ‘u’ is non-NULL)...
libical-3.0.20/src/libicalvcal/vobject.c:1469:20: branch_false: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1469:20: call_function: calling ‘uStrLen’ from ‘fakeCString’
libical-3.0.20/src/libicalvcal/vobject.c:1469:20: return_function: returning to ‘fakeCString’ from ‘uStrLen’
libical-3.0.20/src/libicalvcal/vobject.c:1470:20: acquire_memory: this call could return NULL
libical-3.0.20/src/libicalvcal/vobject.c:1471:12: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1472:12: branch_true: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1472:12: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1473:13: branch_true: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1473:13: danger: ‘t’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/8)
# 1471|       while (*u) {
# 1472|           if (*u == (wchar_t)0x2028)
# 1473|->             *t = '\n';
# 1474|           else if (*u == (wchar_t)0x2029)
# 1475|               *t = '\r';

Error: GCC_ANALYZER_WARNING (CWE-476): [#def82]
libical-3.0.20/src/libicalvcal/vobject.c:1475:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘t’
libical-3.0.20/src/libicalvcal/vobject.c:1461:7: enter_function: entry to ‘fakeCString’
libical-3.0.20/src/libicalvcal/vobject.c:1466:8: branch_false: following ‘false’ branch (when ‘u’ is non-NULL)...
libical-3.0.20/src/libicalvcal/vobject.c:1469:20: branch_false: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1469:20: call_function: calling ‘uStrLen’ from ‘fakeCString’
libical-3.0.20/src/libicalvcal/vobject.c:1469:20: return_function: returning to ‘fakeCString’ from ‘uStrLen’
libical-3.0.20/src/libicalvcal/vobject.c:1470:20: acquire_memory: this call could return NULL
libical-3.0.20/src/libicalvcal/vobject.c:1471:12: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1472:12: branch_true: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1472:12: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1474:17: branch_false: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1474:17: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1475:13: branch_true: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1475:13: danger: ‘t’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/8)
# 1473|               *t = '\n';
# 1474|           else if (*u == (wchar_t)0x2029)
# 1475|->             *t = '\r';
# 1476|           else
# 1477|               *t = (char)*u;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def83]
libical-3.0.20/src/libicalvcal/vobject.c:1477:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘t’
libical-3.0.20/src/libicalvcal/vobject.c:1461:7: enter_function: entry to ‘fakeCString’
libical-3.0.20/src/libicalvcal/vobject.c:1466:8: branch_false: following ‘false’ branch (when ‘u’ is non-NULL)...
libical-3.0.20/src/libicalvcal/vobject.c:1469:20: branch_false: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1469:20: call_function: calling ‘uStrLen’ from ‘fakeCString’
libical-3.0.20/src/libicalvcal/vobject.c:1469:20: return_function: returning to ‘fakeCString’ from ‘uStrLen’
libical-3.0.20/src/libicalvcal/vobject.c:1470:20: acquire_memory: this call could return NULL
libical-3.0.20/src/libicalvcal/vobject.c:1471:12: branch_true: following ‘true’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1472:12: branch_true: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1472:12: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1474:17: branch_false: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1474:17: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1477:18: branch_false: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1477:13: danger: ‘t’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/8)
# 1475|               *t = '\r';
# 1476|           else
# 1477|->             *t = (char)*u;
# 1478|           u++; t++;
# 1479|           }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def84]
libical-3.0.20/src/libicalvcal/vobject.c:1480:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘t’
libical-3.0.20/src/libicalvcal/vobject.c:1461:7: enter_function: entry to ‘fakeCString’
libical-3.0.20/src/libicalvcal/vobject.c:1466:8: branch_false: following ‘false’ branch (when ‘u’ is non-NULL)...
libical-3.0.20/src/libicalvcal/vobject.c:1469:20: branch_false: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1469:20: call_function: calling ‘uStrLen’ from ‘fakeCString’
libical-3.0.20/src/libicalvcal/vobject.c:1469:20: return_function: returning to ‘fakeCString’ from ‘uStrLen’
libical-3.0.20/src/libicalvcal/vobject.c:1470:20: acquire_memory: this call could return NULL
libical-3.0.20/src/libicalvcal/vobject.c:1471:12: branch_false: following ‘false’ branch...
libical-3.0.20/src/libicalvcal/vobject.c:1480:5: branch_false: ...to here
libical-3.0.20/src/libicalvcal/vobject.c:1480:5: danger: ‘t’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8)
# 1478|           u++; t++;
# 1479|           }
# 1480|->     *t = 0;
# 1481|       return s;
# 1482|   }

Error: GCC_ANALYZER_WARNING (CWE-479): [#def85]
libical-3.0.20/src/test/copycluster.c:36:5: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
libical-3.0.20/src/test/copycluster.c:48:5: enter_function: entry to ‘main’
libical-3.0.20/src/test/copycluster.c:55:8: branch_false: following ‘false’ branch...
libical-3.0.20/src/test/copycluster.c:60:8: branch_false: ...to here
libical-3.0.20/src/test/copycluster.c:32:13: enter_function: entry to ‘sig_alrm’
libical-3.0.20/src/test/copycluster.c:36:5: danger: call to ‘exit’ from within signal handler
#   34|       _unused(i);
#   35|       fprintf(stderr, "Could not get lock on file\n");
#   36|->     exit(1);
#   37|   }
#   38|   

Error: CPPCHECK_WARNING (CWE-476): [#def86]
libical-3.0.20/src/test/icalcomponent_fuzz1.c:54: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#   52|       filesize = sbuf.st_size; //to make fortify compile happy
#   53|       data = malloc(filesize + 1);
#   54|->     memset(data, 0, filesize + 1);
#   55|   
#   56|       r = read(fd, data, filesize);

Error: CPPCHECK_WARNING (CWE-415): [#def87]
libical-3.0.20/src/test/icalcomponent_fuzz1.c:66: error[doubleFree]: Memory pointed to by 'data' is freed twice.
#   64|   
#   65|       comp = icalcomponent_new_from_string(data);
#   66|->     free(data);
#   67|   
#   68|       icalcomponent_normalize(comp);

Error: CPPCHECK_WARNING (CWE-476): [#def88]
libical-3.0.20/src/test/icalcomponent_fuzz2.c:54: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#   52|       filesize = sbuf.st_size; //to make fortify compile happy
#   53|       data = malloc(filesize + 1);
#   54|->     memset(data, 0, filesize + 1);
#   55|   
#   56|       r = read(fd, data, filesize);

Error: CPPCHECK_WARNING (CWE-415): [#def89]
libical-3.0.20/src/test/icalcomponent_fuzz2.c:67: error[doubleFree]: Memory pointed to by 'data' is freed twice.
#   65|       comp1 = icalcomponent_new_from_string(data);
#   66|       comp2 = icalcomponent_new_clone(comp1);
#   67|->     free(data);
#   68|   
#   69|       icalcomponent_normalize(comp2);

Error: CPPCHECK_WARNING (CWE-476): [#def90]
libical-3.0.20/src/test/icalcomponent_timefuzz.c:58: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
#   56|       filesize = sbuf.st_size; //to make fortify compile happy
#   57|       data = malloc(filesize + 1);
#   58|->     memset(data, 0, filesize + 1);
#   59|   
#   60|       r = read(fd, data, filesize);

Error: CPPCHECK_WARNING (CWE-415): [#def91]
libical-3.0.20/src/test/icalcomponent_timefuzz.c:61: error[doubleFree]: Resource handle 'fp' freed twice.
#   59|   
#   60|       r = read(fd, data, filesize);
#   61|->     fclose(fp);
#   62|   
#   63|       if (r < 0) {

Error: CPPCHECK_WARNING (CWE-415): [#def92]
libical-3.0.20/src/test/icalcomponent_timefuzz.c:70: error[doubleFree]: Memory pointed to by 'data' is freed twice.
#   68|   
#   69|       comp = icalcomponent_new_from_string(data);
#   70|->     free(data);
#   71|   
#   72|       if (comp != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-479): [#def93]
libical-3.0.20/src/test/recur.c:39:5: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
libical-3.0.20/src/test/recur.c:52:5: enter_function: entry to ‘main’
libical-3.0.20/src/test/recur.c:35:13: enter_function: entry to ‘sig_alrm’
libical-3.0.20/src/test/recur.c:39:5: danger: call to ‘exit’ from within signal handler
#   37|       _unused(i);
#   38|       fprintf(stderr, "Could not get lock on file\n");
#   39|->     exit(1);
#   40|   }
#   41|   

Error: GCC_ANALYZER_WARNING (CWE-479): [#def94]
libical-3.0.20/src/test/regression-recur.c:36:5: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
libical-3.0.20/src/test/regression-recur.c:78:6: enter_function: entry to ‘test_recur_file’
libical-3.0.20/src/test/regression-recur.c:32:13: enter_function: entry to ‘sig_alrm’
libical-3.0.20/src/test/regression-recur.c:36:5: danger: call to ‘exit’ from within signal handler
#   34|       _unused(i);
#   35|       fprintf(stderr, "Could not get lock on file\n");
#   36|->     exit(1);
#   37|   }
#   38|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
libical-3.0.20/src/test/regression.c:4133:10: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup("foofile")’
libical-3.0.20/src/test/regression.c:4132:39: acquire_memory: allocated here
libical-3.0.20/src/test/regression.c:4133:10: danger: ‘strdup("foofile")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 4131|   
# 4132|       attach = icalattach_new_from_data(strdup("foofile"), test_free_attach_data, &free_been_called);
# 4133|->     ac = icalcomponent_new(ICAL_VALARM_COMPONENT);
# 4134|       ap = icalproperty_new_attach(attach);
# 4135|   

Error: CPPCHECK_WARNING (CWE-682): [#def96]
libical-3.0.20/src/test/regression.c:4536: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
# 4534|       tzidprefix = strdup(icaltimezone_get_tzid (zone));
# 4535|       p = tzidprefix;
# 4536|->     while (p = strchr(p + 1, '/'), p) {
# 4537|           prevprevslash = prevslash;
# 4538|           prevslash = p;

Error: CPPCHECK_WARNING (CWE-476): [#def97]
libical-3.0.20/src/test/regression.c:4548: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: strcomp
# 4546|       len = strlen(strcomp_fmt) + strlen(icaltimezone_get_tzid(zone)) + 2;
# 4547|       strcomp = (char *) malloc(len + 1);
# 4548|->     snprintf(strcomp, len, strcomp_fmt, icaltimezone_get_tzid(zone));
# 4549|   
# 4550|       comp = icalcomponent_new_from_string(strcomp);

Error: CPPCHECK_WARNING (CWE-476): [#def98]
libical-3.0.20/src/test/stow.c:642: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: facspath
#  640|           /* Cut off the last slash to make it just a directory */
#  641|   
#  642|->         p = strrchr(facspath, '/');
#  643|   
#  644|           if (p != 0) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def99]
libical-3.0.20/src/test/stow.c:642:13: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘facspath’ where non-null expected
libical-3.0.20/src/test/stow.c:834:5: enter_function: entry to ‘main’
libical-3.0.20/src/test/stow.c:844:5: call_function: calling ‘get_options’ from ‘main’
#  640|           /* Cut off the last slash to make it just a directory */
#  641|   
#  642|->         p = strrchr(facspath, '/');
#  643|   
#  644|           if (p != 0) {

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-154.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibical-3.0.20-2.fc43
store-results-to/tmp/tmp4j6m1g0d/libical-3.0.20-2.fc43.tar.xz
time-created2025-04-25 14:00:18
time-finished2025-04-25 14:03:48
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp4j6m1g0d/libical-3.0.20-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp4j6m1g0d/libical-3.0.20-2.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9