Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:110:64: warning[-Wanalyzer-malloc-leak]: leak of ‘addEccAndInterleaveReference(pureData, version, (enum qrcodegen_Ecc)ecl)’ gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:160:13: enter_function: entry to ‘testAddEccAndInterleave’ gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:161:31: branch_true: following ‘true’ branch (when ‘version != 41’)... gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:161:31: branch_true: ...to here gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:162:35: branch_true: following ‘true’ branch (when ‘ecl != 4’)... gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:163:50: branch_true: ...to here gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:165:28: branch_false: following ‘false’ branch (when ‘pureData’ is non-NULL)... gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:165:28: branch_false: ...to here gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:169:44: branch_false: following ‘false’ branch (when ‘i >= dataLen’)... gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:171:49: branch_false: ...to here gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:171:49: call_function: calling ‘addEccAndInterleaveReference’ from ‘testAddEccAndInterleave’ gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:171:49: return_function: returning to ‘testAddEccAndInterleave’ from ‘addEccAndInterleaveReference’ gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:110:64: danger: ‘addEccAndInterleaveReference(pureData, version, (enum qrcodegen_Ecc)ecl)’ leaks here; was allocated at [(18)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/17) # 108| static uint8_t *addEccAndInterleaveReference(const uint8_t *data, int version, enum qrcodegen_Ecc ecl) { # 109| // Calculate parameter numbers # 110|-> size_t numBlocks = (size_t)NUM_ERROR_CORRECTION_BLOCKS[(int)ecl][version]; # 111| size_t blockEccLen = (size_t)ECC_CODEWORDS_PER_BLOCK[(int)ecl][version]; # 112| size_t rawCodewords = (size_t)getNumRawDataModules(version) / 8; Error: GCC_ANALYZER_WARNING (CWE-457): [#def2] gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:131:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘data + k’ gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:160:13: enter_function: entry to ‘testAddEccAndInterleave’ gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:161:31: branch_true: following ‘true’ branch (when ‘version != 41’)... gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:161:31: branch_true: ...to here gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:162:35: branch_true: following ‘true’ branch (when ‘ecl != 4’)... gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:163:50: branch_true: ...to here gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:165:28: branch_false: following ‘false’ branch (when ‘pureData’ is non-NULL)... gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:165:28: branch_false: ...to here gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:169:44: branch_false: following ‘false’ branch (when ‘i >= dataLen’)... gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:171:49: branch_false: ...to here gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:171:49: call_function: calling ‘addEccAndInterleaveReference’ from ‘testAddEccAndInterleave’ # 129| } # 130| size_t datLen = shortBlockLen - blockEccLen + (i < numShortBlocks ? 0 : 1); # 131|-> memcpy(block, &data[k], datLen * sizeof(uint8_t)); # 132| reedSolomonComputeRemainder(&data[k], (int)datLen, generator, (int)blockEccLen, &block[shortBlockLen + 1 - blockEccLen]); # 133| k += datLen; Error: GCC_ANALYZER_WARNING (CWE-457): [#def3] gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:179:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pureData’ gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:160:13: enter_function: entry to ‘testAddEccAndInterleave’ gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:161:31: branch_true: following ‘true’ branch (when ‘version != 41’)... gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:161:31: branch_true: ...to here gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:162:35: branch_true: following ‘true’ branch (when ‘ecl != 4’)... gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:163:50: branch_true: ...to here gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:165:28: branch_false: following ‘false’ branch (when ‘pureData’ is non-NULL)... gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:165:28: branch_false: ...to here gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:169:44: branch_false: following ‘false’ branch (when ‘i >= dataLen’)... gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:171:49: branch_false: ...to here gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:171:49: call_function: calling ‘addEccAndInterleaveReference’ from ‘testAddEccAndInterleave’ gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:171:49: return_function: returning to ‘testAddEccAndInterleave’ from ‘addEccAndInterleaveReference’ gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:175:28: branch_false: following ‘false’ branch (when ‘paddedData’ is non-NULL)... gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:179:25: branch_false: ...to here gnome-desktop-51.alpha/subprojects/qrcodegen/c/qrcodegen-test.c:179:25: danger: use of uninitialized value ‘pureData’ here # 177| exit(EXIT_FAILURE); # 178| } # 179|-> memcpy(paddedData, pureData, dataLen * sizeof(uint8_t)); # 180| uint8_t *actualOutput = malloc(dataAndEccLen * sizeof(uint8_t)); # 181| if (actualOutput == NULL) {
| analyzer-version-clippy | 1.97.1 |
| analyzer-version-cppcheck | 2.21.1 |
| analyzer-version-gcc | 16.1.1 |
| analyzer-version-gcc-analyzer | 16.1.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.97.1 |
| diffbase-analyzer-version-cppcheck | 2.21.1 |
| diffbase-analyzer-version-gcc | 16.1.1 |
| diffbase-analyzer-version-gcc-analyzer | 16.1.1 |
| diffbase-analyzer-version-shellcheck | 0.11.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-130.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | gnome-desktop3-44.5-1.fc44 |
| diffbase-store-results-to | /tmp/tmpt3t16efw/gnome-desktop3-44.5-1.fc44.tar.xz |
| diffbase-time-created | 2026-08-03 14:40:26 |
| diffbase-time-finished | 2026-08-03 14:44:14 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpt3t16efw/gnome-desktop3-44.5-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpt3t16efw/gnome-desktop3-44.5-1.fc44.src.rpm' |
| diffbase-tool-version | csmock-3.8.7.HEAD-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-130.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | gnome-desktop3-51~alpha-2.fc45 |
| store-results-to | /tmp/tmp6sy5z0lk/gnome-desktop3-51~alpha-2.fc45.tar.xz |
| time-created | 2026-08-03 14:44:23 |
| time-finished | 2026-08-03 14:46:15 |
| title | Newly introduced findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmp6sy5z0lk/gnome-desktop3-51~alpha-2.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp6sy5z0lk/gnome-desktop3-51~alpha-2.fc45.src.rpm' |
| tool-version | csmock-3.8.7.HEAD-1.el9 |