libass-0.17.2-1.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
libass-0.17.2-build/libass-0.17.2/libass/ass.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libass-0.17.2-build/libass-0.17.2/libass/ass.c: scope_hint: In function 'sub_recode'
libass-0.17.2-build/libass-0.17.2/libass/ass.c:1377:8: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open("UTF-8", codepage)'
libass-0.17.2-build/libass-0.17.2/libass/ass_utils.h:28: included_from: Included from here.
libass-0.17.2-build/libass-0.17.2/libass/ass.c:36: included_from: Included from here.
# 1375|       assert(codepage);
# 1376|   
# 1377|->     if ((icdsc = iconv_open(tocp, codepage)) != (iconv_t) (-1)) {
# 1378|           ass_msg(library, MSGL_V, "Opened iconv descriptor");
# 1379|       } else {

Error: CPPCHECK_WARNING: [#def3]
libass-0.17.2-build/libass-0.17.2/libass/ass_bitmap.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def4]
libass-0.17.2-build/libass-0.17.2/libass/ass_blur.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def5]
libass-0.17.2-build/libass-0.17.2/libass/ass_cache.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def6]
libass-0.17.2-build/libass-0.17.2/libass/ass_drawing.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def7]
libass-0.17.2-build/libass-0.17.2/libass/ass_font.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
libass-0.17.2-build/libass-0.17.2/libass/ass_font.c: scope_hint: In function 'convert_unicode_to_mb'
libass-0.17.2-build/libass-0.17.2/libass/ass_font.c:154:12: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open(*encoding_str, "UTF-32LE")'
#  152|       while (*encoding_str) {
#  153|           cd = iconv_open(*encoding_str, "UTF-32LE");
#  154|->         if (cd != (iconv_t) -1) break;
#  155|           ++encoding_str;
#  156|       }

Error: CPPCHECK_WARNING: [#def9]
libass-0.17.2-build/libass-0.17.2/libass/ass_fontconfig.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def10]
libass-0.17.2-build/libass-0.17.2/libass/ass_fontselect.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def11]
libass-0.17.2-build/libass-0.17.2/libass/ass_fontselect.c: scope_hint: In function 'get_font_info'
libass-0.17.2-build/libass-0.17.2/libass/ass_fontselect.c:318:40: warning[-Wcalloc-transposed-args]: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument
#  318 |         info->families = calloc(sizeof(char *), num_family);
#      |                                        ^~~~
libass-0.17.2-build/libass-0.17.2/libass/ass_fontselect.c:318:40: note: earlier argument should specify number of elements, later size of each element
#  316|   
#  317|       if (num_family) {
#  318|->         info->families = calloc(sizeof(char *), num_family);
#  319|           if (info->families == NULL)
#  320|               goto error;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def12]
libass-0.17.2-build/libass-0.17.2/libass/ass_fontselect.c: scope_hint: In function 'get_font_info'
libass-0.17.2-build/libass-0.17.2/libass/ass_fontselect.c:321:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '&families'
#  319|           if (info->families == NULL)
#  320|               goto error;
#  321|->         memcpy(info->families, &families, sizeof(char *) * num_family);
#  322|           info->n_family = num_family;
#  323|       }

Error: COMPILER_WARNING: [#def13]
libass-0.17.2-build/libass-0.17.2/libass/ass_fontselect.c:326:41: warning[-Wcalloc-transposed-args]: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument
#  326 |         info->fullnames = calloc(sizeof(char *), num_fullname);
#      |                                         ^~~~
libass-0.17.2-build/libass-0.17.2/libass/ass_fontselect.c:326:41: note: earlier argument should specify number of elements, later size of each element
#  324|   
#  325|       if (num_fullname) {
#  326|->         info->fullnames = calloc(sizeof(char *), num_fullname);
#  327|           if (info->fullnames == NULL)
#  328|               goto error;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def14]
libass-0.17.2-build/libass-0.17.2/libass/ass_fontselect.c:329:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '&fullnames'
#  327|           if (info->fullnames == NULL)
#  328|               goto error;
#  329|->         memcpy(info->fullnames, &fullnames, sizeof(char *) * num_fullname);
#  330|           info->n_fullname = num_fullname;
#  331|       }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def15]
libass-0.17.2-build/libass-0.17.2/libass/ass_fontselect.c: scope_hint: In function 'ass_font_provider_add_font'
libass-0.17.2-build/libass-0.17.2/libass/ass_fontselect.c:456:5: warning[-Wanalyzer-null-argument]: use of NULL 'info' where non-null expected
libass-0.17.2-build/libass-0.17.2/libass/ass_fontselect.c:39: included_from: Included from here.
libass-0.17.2-build/libass-0.17.2/libass/ass_fontselect.c:449:32: note: in expansion of macro 'FFMAX'
libass-0.17.2-build/libass-0.17.2/libass/ass_fontselect.c:449:32: note: in expansion of macro 'FFMAX'
<built-in>: note: argument 1 of '__builtin_memset' must be non-null
#  454|       // copy over metadata
#  455|       info = selector->font_infos + selector->n_font;
#  456|->     memset(info, 0, sizeof(ASS_FontInfo));
#  457|   
#  458|       // set uid

Error: CPPCHECK_WARNING: [#def16]
libass-0.17.2-build/libass-0.17.2/libass/ass_outline.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def17]
libass-0.17.2-build/libass-0.17.2/libass/ass_parse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def18]
libass-0.17.2-build/libass-0.17.2/libass/ass_rasterizer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def19]
libass-0.17.2-build/libass-0.17.2/libass/ass_render.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def20]
libass-0.17.2-build/libass-0.17.2/libass/ass_shaper.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def21]
libass-0.17.2-build/libass-0.17.2/libass/ass_shaper.c: scope_hint: In function 'init_features'
libass-0.17.2-build/libass-0.17.2/libass/ass_shaper.c:153:38: warning[-Wcalloc-transposed-args]: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument
#  153 |     shaper->features = calloc(sizeof(hb_feature_t), NUM_FEATURES);
#      |                                      ^~~~~~~~~~~~
libass-0.17.2-build/libass-0.17.2/libass/ass_shaper.c:153:38: note: earlier argument should specify number of elements, later size of each element
#  151|   static bool init_features(ASS_Shaper *shaper)
#  152|   {
#  153|->     shaper->features = calloc(sizeof(hb_feature_t), NUM_FEATURES);
#  154|       if (!shaper->features)
#  155|           return false;

Error: COMPILER_WARNING: [#def22]
libass-0.17.2-build/libass-0.17.2/libass/ass_shaper.c: scope_hint: In function 'get_hb_font'
libass-0.17.2-build/libass-0.17.2/libass/ass_shaper.c:463:61: warning[-Wcalloc-transposed-args]: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument
#  463 |     struct ass_shaper_metrics_data *metrics = calloc(sizeof(struct ass_shaper_metrics_data), 1);
#      |                                                             ^~~~~~
libass-0.17.2-build/libass-0.17.2/libass/ass_shaper.c:463:61: note: earlier argument should specify number of elements, later size of each element
#  461|   
#  462|       // set up cached metrics access
#  463|->     struct ass_shaper_metrics_data *metrics = calloc(sizeof(struct ass_shaper_metrics_data), 1);
#  464|       if (!metrics)
#  465|           return NULL;

Error: COMPILER_WARNING: [#def23]
libass-0.17.2-build/libass-0.17.2/libass/ass_shaper.c: scope_hint: In function 'shape_fribidi'
libass-0.17.2-build/libass-0.17.2/libass/ass_shaper.c:765:46: warning[-Wcalloc-transposed-args]: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument
#  765 |     FriBidiJoiningType *joins = calloc(sizeof(*joins), len);
#      |                                              ^
libass-0.17.2-build/libass-0.17.2/libass/ass_shaper.c:765:46: note: earlier argument should specify number of elements, later size of each element
#  763|   {
#  764|       int i;
#  765|->     FriBidiJoiningType *joins = calloc(sizeof(*joins), len);
#  766|   
#  767|       // shape on codepoint level

Error: COMPILER_WARNING: [#def24]
libass-0.17.2-build/libass-0.17.2/libass/ass_shaper.c: scope_hint: In function 'ass_shaper_new'
libass-0.17.2-build/libass-0.17.2/libass/ass_shaper.c:1004:39: warning[-Wcalloc-transposed-args]: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument
# 1004 |     ASS_Shaper *shaper = calloc(sizeof(*shaper), 1);
#      |                                       ^
libass-0.17.2-build/libass-0.17.2/libass/ass_shaper.c:1004:39: note: earlier argument should specify number of elements, later size of each element
# 1002|       assert(metrics_cache);
# 1003|   
# 1004|->     ASS_Shaper *shaper = calloc(sizeof(*shaper), 1);
# 1005|       if (!shaper)
# 1006|           return NULL;

Error: CPPCHECK_WARNING: [#def25]
libass-0.17.2-build/libass-0.17.2/libass/ass_strtod.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-457): [#def26]
libass-0.17.2-build/libass-0.17.2/libass/c/c_blur.c:72: included_from: Included from here.
libass-0.17.2-build/libass-0.17.2/libass/c/blur_template.h: scope_hint: In function 'blur_horz32_c'
libass-0.17.2-build/libass-0.17.2/libass/c/blur_template.h:229:45: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*<unknown>'
libass-0.17.2-build/libass-0.17.2/libass/c/c_blur.c:71:23: note: in definition of macro 'SUFFIX'
libass-0.17.2-build/libass-0.17.2/libass/c/c_blur.c:71:23: note: in definition of macro 'SUFFIX'
libass-0.17.2-build/libass-0.17.2/libass/c/c_blur.c:71:23: note: in definition of macro 'SUFFIX'
#  227|                   for (int k = 0; k < STRIPE_WIDTH; k++)
#  228|                       acc[k] += (int16_t) (ptr[k - n - i] - ptr[k - n]) * param[i - 1] +
#  229|->                               (int16_t) (ptr[k - n + i] - ptr[k - n]) * param[i - 1];
#  230|               for (int k = 0; k < STRIPE_WIDTH; k++)
#  231|                   dst[k] = ptr[k - n] + (acc[k] >> 16);

Error: CPPCHECK_WARNING: [#def27]
libass-0.17.2-build/libass-0.17.2/libass/c/c_blur.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def28]
libass-0.17.2-build/libass-0.17.2/libass/c/c_rasterizer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-37.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelibass-0.17.2-1.fc41
store-results-to/tmp/tmpitxs6rwf/libass-0.17.2-1.fc41.tar.xz
time-created2024-07-03 14:32:08
time-finished2024-07-03 14:33:44
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpitxs6rwf/libass-0.17.2-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpitxs6rwf/libass-0.17.2-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9