Fixed defects

List of Defects

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1]
libass-0.17.1-build/libass-0.17.1/libass/ass_blur.c: scope_hint: In function 'blur_horz'
libass-0.17.1-build/libass-0.17.1/libass/ass_blur.c:293:45: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*<unknown>'
#  291|                   for (int k = 0; k < STRIPE_WIDTH; k++)
#  292|                       acc[k] += (int16_t) (ptr[k - n - i] - ptr[k - n]) * param[i - 1] +
#  293|->                               (int16_t) (ptr[k - n + i] - ptr[k - n]) * param[i - 1];
#  294|               for (int k = 0; k < STRIPE_WIDTH; k++)
#  295|                   dst[k] = ptr[k - n] + (acc[k] >> 16);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
libass-0.17.1-build/libass-0.17.1/libass/ass_drawing.c: scope_hint: In function 'drawing_tokenize'
libass-0.17.1-build/libass-0.17.1/libass/ass_drawing.c:112:24: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'tail'
libass-0.17.1-build/libass-0.17.1/libass/ass_drawing.c: scope_hint: In function 'drawing_tokenize'
libass-0.17.1-build/libass-0.17.1/libass/ass_drawing.c: scope_hint: In function 'drawing_tokenize'
libass-0.17.1-build/libass-0.17.1/libass/ass_drawing.c: scope_hint: In function 'drawing_tokenize'
#  110|               } else
#  111|                   root = tail = calloc(1, sizeof(ASS_DrawingToken));
#  112|->             tail->type = type;
#  113|               tail->point = point;
#  114|               is_set = 0;

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

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

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