Fixed defects
List of Defects
Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
libwebp-1.3.2-build/libwebp-1.3.2/examples/cwebp.c: scope_hint: In function ‘DumpPicture’
libwebp-1.3.2-build/libwebp-1.3.2/examples/cwebp.c:322:26: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(PGM_name, "wb")’
libwebp-1.3.2-build/libwebp-1.3.2/examples/cwebp.c:29: included_from: Included from here.
libwebp-1.3.2-build/libwebp-1.3.2/examples/cwebp.c:319:19: note: in expansion of macro ‘WFOPEN’
# 320| if (f == NULL) return 0;
# 321| fprintf(f, "P5\n%d %d\n255\n", stride, height);
# 322|-> for (y = 0; y < picture->height; ++y) {
# 323| if (fwrite(src_y, picture->width, 1, f) != 1) return 0;
# 324| if (picture->width & 1) fputc(0, f); // pad
Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libwebp-1.3.2-build/libwebp-1.3.2/examples/cwebp.c:322:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(PGM_name, "wb")’
libwebp-1.3.2-build/libwebp-1.3.2/examples/cwebp.c:319:19: note: in expansion of macro ‘WFOPEN’
# 320| if (f == NULL) return 0;
# 321| fprintf(f, "P5\n%d %d\n255\n", stride, height);
# 322|-> for (y = 0; y < picture->height; ++y) {
# 323| if (fwrite(src_y, picture->width, 1, f) != 1) return 0;
# 324| if (picture->width & 1) fputc(0, f); // pad
Error: CLANG_WARNING: [#def3]
libwebp-1.3.2-build/libwebp-1.3.2/sharpyuv/sharpyuv.c:190:15: warning[core.CallAndMessage]: 3rd function call argument is an uninitialized value
# 188| while (k-- > 0) { // process each R/G/B segments in turn
# 189| // special boundary case for i==0
# 190|-> out1[0] = Filter2(cur_uv[0], prev_uv[0], best_y[0], bit_depth);
# 191| out2[0] = Filter2(cur_uv[0], next_uv[0], best_y[w], bit_depth);
# 192|
Error: CLANG_WARNING: [#def4]
libwebp-1.3.2-build/libwebp-1.3.2/src/mux/muxedit.c:557:5: warning[deadcode.DeadStores]: Value stored to 'err' is never read
# 555| if (num_frames == 1) {
# 556| WebPMuxImage* frame = NULL;
# 557|-> err = MuxImageGetNth((const WebPMuxImage**)&mux->images_, 1, &frame);
# 558| assert(err == WEBP_MUX_OK); // We know that one frame does exist.
# 559| assert(frame != NULL);
Error: CPPCHECK_WARNING: [#def5]
libwebp-1.3.2-build/libwebp-1.3.2/src/utils/utils.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-457): [#def6]
libwebp-1.3.2-build/libwebp-1.3.2/src/utils/utils.c: scope_hint: In function ‘WebPGetColorPalette’
libwebp-1.3.2-build/libwebp-1.3.2/src/utils/utils.c:288:26: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘colors[key]’
libwebp-1.3.2-build/libwebp-1.3.2/src/utils/utils.c: scope_hint: In function ‘WebPGetColorPalette’
# 286| }
# 287| break;
# 288|-> } else if (colors[key] == last_pix) {
# 289| break; // The color is already there.
# 290| } else {
Scan Properties
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-clang | 18.1.7 |
diffbase-analyzer-version-cppcheck | 2.14.2 |
diffbase-analyzer-version-gcc | 14.1.1 |
diffbase-analyzer-version-gcc-analyzer | 14.1.1 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-enabled-plugins | clang, cppcheck, gcc, shellcheck |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-154.us-west-2.compute.internal |
diffbase-mock-config | fedora-41-x86_64 |
diffbase-project-name | libwebp-1.4.0-1.fc41 |
diffbase-store-results-to | /tmp/tmp3tta3_86/libwebp-1.4.0-1.fc41.tar.xz |
diffbase-time-created | 2024-07-03 16:05:54 |
diffbase-time-finished | 2024-07-03 16:09:19 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp3tta3_86/libwebp-1.4.0-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp3tta3_86/libwebp-1.4.0-1.fc41.src.rpm' |
diffbase-tool-version | csmock-3.5.3-1.el9 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-154.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | libwebp-1.3.2-5.fc40 |
store-results-to | /tmp/tmptv41pfmx/libwebp-1.3.2-5.fc40.tar.xz |
time-created | 2024-07-03 16:01:48 |
time-finished | 2024-07-03 16:05:32 |
title | Fixed defects |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmptv41pfmx/libwebp-1.3.2-5.fc40.tar.xz' '--gcc-analyze' '/tmp/tmptv41pfmx/libwebp-1.3.2-5.fc40.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |