Error: GCC_ANALYZER_WARNING (CWE-476): [#def1] lv2-1.18.8-build/lv2-1.18.8/include/lv2/atom/util.h:59:43: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘handle’ lv2-1.18.8-build/lv2-1.18.8/plugins/eg-sampler.lv2/sampler.c: scope_hint: In function ‘atom_sink’ lv2-1.18.8-build/lv2-1.18.8/plugins/eg-sampler.lv2/sampler.c:28: included_from: Included from here. lv2-1.18.8-build/lv2-1.18.8/include/lv2/core/lv2_util.h: scope_hint: In function ‘atom_sink’ lv2-1.18.8-build/lv2-1.18.8/include/lv2/core/lv2_util.h: scope_hint: In function ‘atom_sink’ lv2-1.18.8-build/lv2-1.18.8/include/lv2/core/lv2_util.h: scope_hint: In function ‘atom_sink’ lv2-1.18.8-build/lv2-1.18.8/include/lv2/core/lv2_util.h: scope_hint: In function ‘atom_sink’ lv2-1.18.8-build/lv2-1.18.8/plugins/eg-sampler.lv2/sampler.c:30: included_from: Included from here. lv2-1.18.8-build/lv2-1.18.8/plugins/eg-sampler.lv2/sampler.c:22: included_from: Included from here. # 57| lv2_atom_total_size(const LV2_Atom* atom) # 58| { # 59|-> return (uint32_t)sizeof(LV2_Atom) + atom->size; # 60| } # 61| Error: GCC_ANALYZER_WARNING (CWE-476): [#def2] lv2-1.18.8-build/lv2-1.18.8/plugins/eg-sampler.lv2/sampler.c: scope_hint: In function ‘load_sample’ lv2-1.18.8-build/lv2-1.18.8/plugins/eg-sampler.lv2/sampler.c:135:24: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘sample’ lv2-1.18.8-build/lv2-1.18.8/include/lv2/core/lv2_util.h: scope_hint: In function ‘load_sample’ lv2-1.18.8-build/lv2-1.18.8/include/lv2/core/lv2_util.h: scope_hint: In function ‘load_sample’ # 133| float* data = NULL; # 134| bool error = true; # 135|-> if (!sndfile || !info->frames) { # 136| lv2_log_error(logger, "Failed to open %s\n", path); # 137| } else if (!(data = (float*)malloc(sizeof(float) * info->frames * Error: GCC_ANALYZER_WARNING: [#def3] lv2-1.18.8-build/lv2-1.18.8/plugins/eg-sampler.lv2/sampler.c:169:42: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results lv2-1.18.8-build/lv2-1.18.8/include/lv2/core/lv2_util.h: scope_hint: In function ‘load_sample’ lv2-1.18.8-build/lv2-1.18.8/include/lv2/core/lv2_util.h: scope_hint: In function ‘load_sample’ lv2-1.18.8-build/lv2-1.18.8/include/lv2/core/lv2_util.h: scope_hint: In function ‘load_sample’ lv2-1.18.8-build/lv2-1.18.8/include/lv2/core/lv2_util.h: scope_hint: In function ‘load_sample’ lv2-1.18.8-build/lv2-1.18.8/plugins/eg-sampler.lv2/sampler.c:169:42: note: only use operands of an integer type inside the size argument # 167| const double output_length = ceil((double)info->frames * src_ratio); # 168| const long output_frames = (long)output_length; # 169|-> float* const output_buffer = (float*)malloc(sizeof(float) * output_frames); # 170| # 171| SRC_DATA src_data = { Error: GCC_ANALYZER_WARNING (CWE-688): [#def4] lv2-1.18.8-build/lv2-1.18.8/plugins/eg-sampler.lv2/sampler.c:200:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc(path_len + 1)’ where non-null expected lv2-1.18.8-build/lv2-1.18.8/include/lv2/core/lv2_util.h: scope_hint: In function ‘load_sample’ lv2-1.18.8-build/lv2-1.18.8/include/lv2/core/lv2_util.h: scope_hint: In function ‘load_sample’ lv2-1.18.8-build/lv2-1.18.8/include/lv2/core/lv2_util.h: scope_hint: In function ‘load_sample’ lv2-1.18.8-build/lv2-1.18.8/include/lv2/core/lv2_util.h: scope_hint: In function ‘load_sample’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 198| sample->path = (char*)malloc(path_len + 1); # 199| sample->path_len = (uint32_t)path_len; # 200|-> memcpy(sample->path, path, path_len + 1); # 201| # 202| return sample;
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
diffbase-analyzer-version-clippy | 1.82.0 |
diffbase-analyzer-version-cppcheck | 2.16.0 |
diffbase-analyzer-version-gcc | 14.2.1 |
diffbase-analyzer-version-gcc-analyzer | 15.0.0 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-unicontrol | 0.0.2 |
diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-141.us-west-2.compute.internal |
diffbase-mock-config | fedora-rawhide-gcc-latest-x86_64 |
diffbase-project-name | lv2-1.18.10-1.fc42 |
diffbase-store-results-to | /tmp/tmp1qapcz4y/lv2-1.18.10-1.fc42.tar.xz |
diffbase-time-created | 2024-11-13 01:56:28 |
diffbase-time-finished | 2024-11-13 01:57:57 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp1qapcz4y/lv2-1.18.10-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp1qapcz4y/lv2-1.18.10-1.fc42.src.rpm' |
diffbase-tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-141.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | lv2-1.18.8-9.fc41 |
store-results-to | /tmp/tmp772p1v8d/lv2-1.18.8-9.fc41.tar.xz |
time-created | 2024-11-13 01:54:05 |
time-finished | 2024-11-13 01:56:08 |
title | Fixed findings |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp772p1v8d/lv2-1.18.8-9.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp772p1v8d/lv2-1.18.8-9.fc41.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |