fribidi-1.0.16-1.fc42

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1]
fribidi-1.0.16-build/fribidi-1.0.16/bin/fribidi-benchmark.c: scope_hint: In function ‘benchmark’
fribidi-1.0.16-build/fribidi-1.0.16/bin/fribidi-benchmark.c:204:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘us[j]’
#  202|   	else
#  203|   	  us[j++] = S_[i];
#  204|-> 	if (us[j] >= 'A' && us[j] <= 'F')
#  205|   	  us[j] += FRIBIDI_CHAR_ARABIC_ALEF - 'A';
#  206|   	else if (us[j] >= 'G' && us[j] <= 'Z')

Error: CPPCHECK_WARNING (CWE-457): [#def2]
fribidi-1.0.16-build/fribidi-1.0.16/bin/fribidi-benchmark.c:222: warning[uninitvar]: Uninitialized variable: us
#  220|         base = FRIBIDI_PAR_ON;
#  221|   FRIBIDI_BEGIN_IGNORE_DEPRECATIONS
#  222|->       if (!fribidi_log2vis (us, len, &base,
#  223|   			    /* output */
#  224|   			    out_us, positionVtoL, positionLtoV,

Error: CPPCHECK_WARNING (CWE-457): [#def3]
fribidi-1.0.16-build/fribidi-1.0.16/bin/fribidi-caprtl2utf8.c:31: error[uninitvar]: Uninitialized variable: eol
#   29|   
#   30|         buf[len] = 0;
#   31|->       printf ("%s%s", buf, eol);
#   32|       }
#   33|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi.h:34: included_from: Included from here.
fribidi-1.0.16-build/fribidi-1.0.16/bin/fribidi-main.c:32: included_from: Included from here.
fribidi-1.0.16-build/fribidi-1.0.16/bin/fribidi-main.c: scope_hint: In function ‘main’
fribidi-1.0.16-build/fribidi-1.0.16/bin/fribidi-main.c:465:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘visual’
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-bidi-types.h:323:11: note: in definition of macro ‘FRIBIDI_IS_EXPLICIT_OR_ISOLATE_OR_BN_OR_NSM’
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-bidi-types.h:323:11: note: in definition of macro ‘FRIBIDI_IS_EXPLICIT_OR_ISOLATE_OR_BN_OR_NSM’
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-bidi-types.h:323:11: note: in definition of macro ‘FRIBIDI_IS_EXPLICIT_OR_ISOLATE_OR_BN_OR_NSM’
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-bidi-types.h:323:11: note: in definition of macro ‘FRIBIDI_IS_EXPLICIT_OR_ISOLATE_OR_BN_OR_NSM’
#  463|   				  wid -=
#  464|   				    FRIBIDI_IS_EXPLICIT_OR_ISOLATE_OR_BN_OR_NSM
#  465|-> 				    (fribidi_get_bidi_type (visual[idx])) ? 0
#  466|   				    : 1;
#  467|   				  idx++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
fribidi-1.0.16-build/fribidi-1.0.16/bin/fribidi-main.c:513:52: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ltov’
#  511|   		      printf ("%s", nl_found);
#  512|   		      for (i = 0; i < len; i++)
#  513|-> 			printf ("%ld ", (long) ltov[i]);
#  514|   		      nl_found = "\n";
#  515|   		    }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
fribidi-1.0.16-build/fribidi-1.0.16/bin/fribidi-main.c:522:52: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ltov’
#  520|   		      printf ("%s", nl_found);
#  521|   		      for (i = 0; i < len; i++)
#  522|-> 			printf ("%ld ", (long) vtol[i]);
#  523|   		      nl_found = "\n";
#  524|   		    }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
fribidi-1.0.16-build/fribidi-1.0.16/bin/fribidi-main.c:531:52: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘levels’
#  529|   		      printf ("%s", nl_found);
#  530|   		      for (i = 0; i < len; i++)
#  531|-> 			printf ("%d ", (int) levels[i]);
#  532|   		      nl_found = "\n";
#  533|   		    }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def8]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-arabic-shaping-tab.c: scope_hint: In function ‘read_data’
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-arabic-shaping-tab.c:218:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*data_file_name, "rt")’
#  216|   	die2 ("error: cannot open `%s' for reading", data_file_name[0]);
#  217|   
#  218|->       if (!strcmp (data_file_type[0], "UnicodeData.txt"))
#  219|   	read_unicode_data_txt (f);
#  220|         else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-arabic-shaping-tab.c:218:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*data_file_name, "rt")’
#  216|   	die2 ("error: cannot open `%s' for reading", data_file_name[0]);
#  217|   
#  218|->       if (!strcmp (data_file_type[0], "UnicodeData.txt"))
#  219|   	read_unicode_data_txt (f);
#  220|         else

Error: COMPILER_WARNING: [#def10]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-arabic-shaping-tab.c: scope_hint: In function ‘main’
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-arabic-shaping-tab.c:278:1: warning[-Wformat-overflow=]: ‘%s’ directive argument is null
#  278 | main (
#      | ^~~~
#  276|   
#  277|   int
#  278|-> main (
#  279|     int argc,
#  280|     const char **argv

Error: GCC_ANALYZER_WARNING (CWE-775): [#def11]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-bidi-type-tab.c: scope_hint: In function ‘read_data’
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-bidi-type-tab.c:304:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(data_file_name, "rt")’
#  302|     if (!strcmp (data_file_type, "UnicodeData.txt"))
#  303|       read_unicode_data_txt (f);
#  304|->   else if (!strcmp (data_file_type, "DerivedBidiClass.txt"))
#  305|       read_derived_bidi_class_txt (f);
#  306|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-bidi-type-tab.c:304:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(data_file_name, "rt")’
#  302|     if (!strcmp (data_file_type, "UnicodeData.txt"))
#  303|       read_unicode_data_txt (f);
#  304|->   else if (!strcmp (data_file_type, "DerivedBidiClass.txt"))
#  305|       read_derived_bidi_class_txt (f);
#  306|     else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def13]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-tab.c: scope_hint: In function ‘read_unicode_data_txt_equivalence’
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-tab.c:203:1: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(uni_datafile_name, "rt")’
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-tab.c: scope_hint: In function ‘read_unicode_data_txt_equivalence’
#  201|         equiv_table[c] = ce;
#  202|       }
#  203|-> }
#  204|   
#  205|   static void

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-tab.c:203:1: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(uni_datafile_name, "rt")’
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-tab.c: scope_hint: In function ‘read_unicode_data_txt_equivalence’
#  201|         equiv_table[c] = ce;
#  202|       }
#  203|-> }
#  204|   
#  205|   static void

Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-tab.c: scope_hint: In function ‘read_data’
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-tab.c:268:6: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(uni_datafile_name, "rt")’
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-tab.c: scope_hint: In function ‘read_data’
#  266|       die2 ("error: cannot open `%s' for reading", bracket_datafile_name);
#  267|   
#  268|->   if (!strcmp (uni_datafile_type, "UnicodeData.txt"))
#  269|       read_unicode_data_txt_equivalence (f);
#  270|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-tab.c:268:6: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(uni_datafile_name, "rt")’
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-tab.c: scope_hint: In function ‘read_data’
#  266|       die2 ("error: cannot open `%s' for reading", bracket_datafile_name);
#  267|   
#  268|->   if (!strcmp (uni_datafile_type, "UnicodeData.txt"))
#  269|       read_unicode_data_txt_equivalence (f);
#  270|     else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def17]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-tab.c:277:6: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(bracket_datafile_name, "rt")’
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-tab.c: scope_hint: In function ‘read_data’
#  275|       die2 ("error: cannot open `%s' for reading", bracket_datafile_name);
#  276|   
#  277|->   if (!strcmp (bracket_datafile_type, "BidiBrackets.txt"))
#  278|       read_bidi_brackets_txt (f);
#  279|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-tab.c:277:6: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(bracket_datafile_name, "rt")’
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-tab.c: scope_hint: In function ‘read_data’
#  275|       die2 ("error: cannot open `%s' for reading", bracket_datafile_name);
#  276|   
#  277|->   if (!strcmp (bracket_datafile_type, "BidiBrackets.txt"))
#  278|       read_bidi_brackets_txt (f);
#  279|     else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def19]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-type-tab.c: scope_hint: In function ‘read_data’
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-type-tab.c:174:6: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(data_file_name, "rt")’
#  172|       die2 ("error: cannot open `%s' for reading", data_file_name);
#  173|   
#  174|->   if (!strcmp (data_file_type, "BidiBrackets.txt"))
#  175|       read_bidi_brackets_type_txt (f);
#  176|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-brackets-type-tab.c:174:6: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(data_file_name, "rt")’
#  172|       die2 ("error: cannot open `%s' for reading", data_file_name);
#  173|   
#  174|->   if (!strcmp (data_file_type, "BidiBrackets.txt"))
#  175|       read_bidi_brackets_type_txt (f);
#  176|     else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-joining-type-tab.c: scope_hint: In function ‘read_data’
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-joining-type-tab.c:294:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*data_file_name, "rt")’
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-joining-type-tab.c: scope_hint: In function ‘read_data’
#  292|   	die2 ("error: cannot open `%s' for reading", data_file_name[0]);
#  293|   
#  294|->       if (!strcmp (data_file_type[0], "UnicodeData.txt"))
#  295|   	read_unicode_data_txt (f);
#  296|         else if (!strcmp (data_file_type[0], "ArabicShaping.txt"))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-joining-type-tab.c:294:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*data_file_name, "rt")’
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-joining-type-tab.c: scope_hint: In function ‘read_data’
#  292|   	die2 ("error: cannot open `%s' for reading", data_file_name[0]);
#  293|   
#  294|->       if (!strcmp (data_file_type[0], "UnicodeData.txt"))
#  295|   	read_unicode_data_txt (f);
#  296|         else if (!strcmp (data_file_type[0], "ArabicShaping.txt"))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def23]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-mirroring-tab.c: scope_hint: In function ‘read_data’
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-mirroring-tab.c:177:6: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(data_file_name, "rt")’
#  175|       die2 ("error: cannot open `%s' for reading", data_file_name);
#  176|   
#  177|->   if (!strcmp (data_file_type, "BidiMirroring.txt"))
#  178|       read_bidi_mirroring_txt (f);
#  179|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-mirroring-tab.c:177:6: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(data_file_name, "rt")’
#  175|       die2 ("error: cannot open `%s' for reading", data_file_name);
#  176|   
#  177|->   if (!strcmp (data_file_type, "BidiMirroring.txt"))
#  178|       read_bidi_mirroring_txt (f);
#  179|     else

Error: CPPCHECK_WARNING (CWE-457): [#def25]
fribidi-1.0.16-build/fribidi-1.0.16/gen.tab/gen-unicode-version.c:192: warning[uninitvar]: Uninitialized variable: data_file_type
#  190|       if (!found)
#  191|         die ("error: version not found");
#  192|->     gen_unicode_version (data_file_type);
#  193|     }
#  194|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def26]
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-char-sets-cap-rtl.c: scope_hint: In function ‘init_cap_rtl’
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-char-sets-cap-rtl.c:92:30: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘caprtl_to_unicode’
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-char-sets-cap-rtl.c:30: included_from: Included from here.
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-char-sets-cap-rtl.c:87:21: note: in expansion of macro ‘fribidi_malloc’
#   90|       if (CapRTLCharTypes[i] == fribidi_get_bidi_type (i))
#   91|         {
#   92|-> 	caprtl_to_unicode[i] = i;
#   93|   	mark[i] = 1;
#   94|         }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def27]
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-char-sets-cap-rtl.c:99:30: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘caprtl_to_unicode’
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-char-sets-cap-rtl.c:87:21: note: in expansion of macro ‘fribidi_malloc’
#   97|   	int j;
#   98|   
#   99|-> 	caprtl_to_unicode[i] = FRIBIDI_UNICODE_CHARS;
#  100|   	mark[i] = 0;
#  101|   	if (fribidi_get_mirror_char (i, NULL))

Error: GCC_ANALYZER_WARNING (CWE-688): [#def28]
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-char-sets-cap-rtl.c: scope_hint: In function ‘fribidi_char_set_desc_cap_rtl’
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-char-sets-cap-rtl.c:336:8: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘s’ where non-null expected
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-char-sets-cap-rtl.c:334:16: note: in expansion of macro ‘fribidi_malloc’
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-char-sets-cap-rtl.c:334:16: note: in expansion of macro ‘fribidi_malloc’
<built-in>: note: argument 1 of ‘__builtin_sprintf’ must be non-null
#  334|     s = (char *) fribidi_malloc (l);
#  335|     i = 0;
#  336|->   i += sprintf (s + i,		/*l - i, */
#  337|   		"CapRTL is a character set for testing with the reference\n"
#  338|   		"implementation, with explicit marks escape strings, and\n"

Error: GCC_ANALYZER_WARNING (CWE-457): [#def29]
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-run.c: scope_hint: In function ‘run_list_encode_bidi_types’
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-run.c:135:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*last.bracket_type’
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-run.c:30: included_from: Included from here.
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-run.c:44:9: note: in expansion of macro ‘fribidi_malloc’
fribidi-1.0.16-build/fribidi-1.0.16/lib/common.h:99:43: note: in expansion of macro ‘FRIBIDI_BOOLEAN_EXPR’
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-run.c:46:6: note: in expansion of macro ‘LIKELY’
fribidi-1.0.16-build/fribidi-1.0.16/lib/common.h:99:43: note: in expansion of macro ‘FRIBIDI_BOOLEAN_EXPR’
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-run.c:64:6: note: in expansion of macro ‘LIKELY’
fribidi-1.0.16-build/fribidi-1.0.16/lib/common.h:100:45: note: in expansion of macro ‘FRIBIDI_BOOLEAN_EXPR’
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi-run.c:121:6: note: in expansion of macro ‘UNLIKELY’
#  133|         if (char_type != last->type
#  134|             || bracket_type != FRIBIDI_NO_BRACKET /* Always separate bracket into single char runs! */
#  135|->           || last->bracket_type != FRIBIDI_NO_BRACKET
#  136|             || FRIBIDI_IS_ISOLATE(char_type)
#  137|             )

Error: COMPILER_WARNING: [#def30]
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi.c: scope_hint: In function ‘fribidi_log2vis’
fribidi-1.0.16-build/fribidi-1.0.16/lib/fribidi.c:245:7: warning[-Wstringop-overflow=]: ‘memcpy’ specified bound between 18446744065119617024 and 18446744073709551612 exceeds maximum object size 9223372036854775807
#  243|   	visual_str[i] = str[i];
#  244|         */
#  245|->       memcpy (visual_str, str, len * sizeof (*visual_str));
#  246|   
#  247|         /* Arabic joining */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def31]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c: scope_hint: In function ‘new_int_array’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c:49:12: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘arr’
#   47|   {
#   48|     int_array_t *arr = (int_array_t*)malloc(sizeof(int_array_t));
#   49|->   arr->len = 0;
#   50|     arr->capacity = ARRAY_CHUNK_SIZE;
#   51|     arr->data = (int*)malloc(arr->capacity * sizeof(int));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def32]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c: scope_hint: In function ‘int_array_add’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c:63:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*arr.data + (long unsigned int)*arr.len * 4’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c: scope_hint: In function ‘int_array_add’
#   61|         arr->data = (int*)realloc(arr->data, arr->capacity*sizeof(int));
#   62|       }
#   63|->   arr->data[arr->len++] = val;
#   64|   }
#   65|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def33]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c: scope_hint: In function ‘new_char_array’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c:80:12: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘arr’
#   78|   {
#   79|     char_array_t *arr = (char_array_t*)malloc(sizeof(char_array_t));
#   80|->   arr->len = 0;
#   81|     arr->capacity = ARRAY_CHUNK_SIZE;
#   82|     arr->data = (char*)malloc(arr->capacity);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c: scope_hint: In function ‘char_array_add’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c:94:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*arr.data + (sizetype)*arr.len’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c:26: included_from: Included from here.
#   92|         arr->data = (char*)realloc(arr->data, arr->capacity * sizeof(char));
#   93|       }
#   94|->   arr->data[arr->len++] = val;
#   95|   }
#   96|   

Error: CPPCHECK_WARNING (CWE-664): [#def35]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c:115: error[va_end_missing]: va_list 'ap' was opened but not closed by va_end().
#  113|     vfprintf(stderr, fmt, ap);
#  114|     exit(-1);
#  115|-> }
#  116|   
#  117|   static

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c: scope_hint: In function ‘parse_test_line’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c:164:6: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  162|     *code_points = (FriBidiChar *) int_array_free (code_points_array, FALSE);
#  163|   
#  164|->   if (*line == ';')
#  165|       line++;
#  166|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c:176:6: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  174|     line = end;
#  175|   
#  176|->   if (*line == ';')
#  177|       line++;
#  178|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c:188:6: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  186|     line = end;
#  187|   
#  188|->   if (*line == ';')
#  189|       line++;
#  190|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c:218:10: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  216|           }
#  217|   
#  218|->       if (*line == ';')
#  219|           break;
#  220|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c:224:6: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  222|       }
#  223|   
#  224|->   if (levels_array->len != *code_points_len)
#  225|       die("Oops! Different lengths for levels and codepoints at line %d!\n", line_no);
#  226|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def41]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c: scope_hint: In function ‘main’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c:291:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
#  289|   	die ("Failed opening %s\n", filename);
#  290|   
#  291|->     while (!feof(channel)) {
#  292|         int len;
#  293|         fgets(line, LINE_SIZE, channel);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c:291:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
#  289|   	die ("Failed opening %s\n", filename);
#  290|   
#  291|->     while (!feof(channel)) {
#  292|         int len;
#  293|         fgets(line, LINE_SIZE, channel);

Error: COMPILER_WARNING (CWE-252): [#def43]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c: scope_hint: In function ‘main’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c:293:7: warning[-Wunused-result]: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’
#  293 |       fgets(line, LINE_SIZE, channel);
#      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  291|       while (!feof(channel)) {
#  292|         int len;
#  293|->       fgets(line, LINE_SIZE, channel);
#  294|         len = strlen(line);
#  295|         if (len == LINE_SIZE-1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def44]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c:295:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
#  293|         fgets(line, LINE_SIZE, channel);
#  294|         len = strlen(line);
#  295|->       if (len == LINE_SIZE-1)
#  296|           die("LINE_SIZE=%d too small at line %d!\n", LINE_SIZE, line_no);
#  297|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiCharacterTest.c:295:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
#  293|         fgets(line, LINE_SIZE, channel);
#  294|         len = strlen(line);
#  295|->       if (len == LINE_SIZE-1)
#  296|           die("LINE_SIZE=%d too small at line %d!\n", LINE_SIZE, line_no);
#  297|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def46]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c: scope_hint: In function ‘new_int_array’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:50:12: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘arr’
#   48|   {
#   49|     int_array_t *arr = (int_array_t*)malloc(sizeof(int_array_t));
#   50|->   arr->len = 0;
#   51|     arr->capacity = ARRAY_CHUNK_SIZE;
#   52|     arr->data = (int*)malloc(arr->capacity * sizeof(int));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c: scope_hint: In function ‘int_array_add’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:62:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#   60|       {
#   61|         arr->capacity += ARRAY_CHUNK_SIZE;
#   62|->       arr->data = (int*)realloc(arr->data, arr->capacity*sizeof(int));
#   63|       }
#   64|     arr->data[arr->len++] = val;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def48]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:64:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*arr.data + (long unsigned int)*arr.len * 4’
#   62|         arr->data = (int*)realloc(arr->data, arr->capacity*sizeof(int));
#   63|       }
#   64|->   arr->data[arr->len++] = val;
#   65|   }
#   66|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def49]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c: scope_hint: In function ‘new_char_array’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:81:12: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘arr’
#   79|   {
#   80|     char_array_t *arr = (char_array_t*)malloc(sizeof(char_array_t));
#   81|->   arr->len = 0;
#   82|     arr->capacity = ARRAY_CHUNK_SIZE;
#   83|     arr->data = (char*)malloc(arr->capacity);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c: scope_hint: In function ‘char_array_add’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:93:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:26: included_from: Included from here.
#   91|       {
#   92|         arr->capacity += ARRAY_CHUNK_SIZE;
#   93|->       arr->data = (char*)realloc(arr->data, arr->capacity * sizeof(char));
#   94|       }
#   95|     arr->data[arr->len++] = val;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def51]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:95:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*arr.data + (sizetype)*arr.len’
#   93|         arr->data = (char*)realloc(arr->data, arr->capacity * sizeof(char));
#   94|       }
#   95|->   arr->data[arr->len++] = val;
#   96|   }
#   97|   

Error: CPPCHECK_WARNING (CWE-664): [#def52]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:116: error[va_end_missing]: va_list 'ap' was opened but not closed by va_end().
#  114|       vfprintf(stderr, fmt, ap);
#  115|       exit(-1);
#  116|-> }
#  117|   
#  118|   static FriBidiCharType

Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c: scope_hint: In function ‘main’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:163:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
#  161|       levels = new_char_array ();
#  162|   
#  163|->     while (*line)
#  164|       {
#  165|   	FriBidiLevel l;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:163:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
#  161|       levels = new_char_array ();
#  162|   
#  163|->     while (*line)
#  164|       {
#  165|   	FriBidiLevel l;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c: scope_hint: In function ‘parse_levels_line’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:163:12: warning[-Wanalyzer-malloc-leak]: leak of ‘new_char_array()’
#  161|       levels = new_char_array ();
#  162|   
#  163|->     while (*line)
#  164|       {
#  165|   	FriBidiLevel l;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c: scope_hint: In function ‘parse_levels_line’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:187:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  185|   	}
#  186|   
#  187|-> 	if (!*line)
#  188|   	  break;
#  189|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def57]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c: scope_hint: In function ‘main’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:214:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
#  212|       }
#  213|   
#  214|->     *len = map->len;
#  215|       return (FriBidiStrIndex *) int_array_free (map, FALSE);
#  216|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:214:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
#  212|       }
#  213|   
#  214|->     *len = map->len;
#  215|       return (FriBidiStrIndex *) int_array_free (map, FALSE);
#  216|   }

Error: COMPILER_WARNING (CWE-252): [#def59]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c: scope_hint: In function ‘main’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:292:9: warning[-Wunused-result]: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’
#  292 |         fgets(line, LINE_SIZE, channel);
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  290|       while (!feof(channel)) {
#  291|           int len;
#  292|->         fgets(line, LINE_SIZE, channel);
#  293|           len = strlen(line);
#  294|           if (len == LINE_SIZE-1)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:294:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
#  292|           fgets(line, LINE_SIZE, channel);
#  293|           len = strlen(line);
#  294|->         if (len == LINE_SIZE-1)
#  295|             die("LINE_SIZE too small at line %d!\n", line_no);
#  296|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:294:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
#  292|           fgets(line, LINE_SIZE, channel);
#  293|           len = strlen(line);
#  294|->         if (len == LINE_SIZE-1)
#  295|             die("LINE_SIZE too small at line %d!\n", line_no);
#  296|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def62]
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:353:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ltor’
fribidi-1.0.16-build/fribidi-1.0.16/test/unicode-conformance/BidiTest.c:27: included_from: Included from here.
#  351|   
#  352|   	    for (i = 0; i < types_len; i++)
#  353|-> 	        ltor[i] = i;
#  354|   
#  355|   	    if (fribidi_reorder_line (0 /*FRIBIDI_FLAG_REORDER_NSM*/,

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-55.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namefribidi-1.0.16-1.fc42
store-results-to/tmp/tmpb10e_trg/fribidi-1.0.16-1.fc42.tar.xz
time-created2024-11-13 00:00:48
time-finished2024-11-13 00:02:12
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpb10e_trg/fribidi-1.0.16-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpb10e_trg/fribidi-1.0.16-1.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9