ilbc-3.0.4-12.fc42

List of Findings

Error: COMPILER_WARNING: [#def1]
ilbc-3.0.4-build/libilbc-3.0.4/common_audio/signal_processing/copy_set_operations.c:36:19: warning[-Wstringop-overflow=]: ‘__builtin_memset’ specified bound 18446744073709551576 exceeds maximum object size 9223372036854775807
#   36 |         *arrptr++ = set_value;
#      |                   ^
#   34|       for (j = length; j > 0; j--)
#   35|       {
#   36|->         *arrptr++ = set_value;
#   37|       }
#   38|   }

Error: CPPCHECK_WARNING (CWE-190): [#def2]
ilbc-3.0.4-build/libilbc-3.0.4/common_audio/signal_processing/levinson_durbin.c:155: error[integerOverflow]: Signed integer overflow for expression 'temp3W32-((int32_t)K_hi*65536)'.
#  153|           // Put K on hi and low format
#  154|           K_hi = (int16_t)(temp3W32 >> 16);
#  155|->         K_low = (int16_t)((temp3W32 - ((int32_t)K_hi * 65536)) >> 1);
#  156|   
#  157|           // Store Reflection coefficient in Q15

Error: GCC_ANALYZER_WARNING (CWE-775): [#def3]
ilbc-3.0.4-build/libilbc-3.0.4/iLBC_test2.c: scope_hint: In function ‘main’
ilbc-3.0.4-build/libilbc-3.0.4/iLBC_test2.c:109:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[2], "rb")’
#  107|       fprintf(stderr,"Cannot open input file %s\n", argv[2]);
#  108|       exit(2);}
#  109|->   if ( (efileid=fopen(argv[3],"wb")) == NULL) {
#  110|       fprintf(stderr, "Cannot open encoded file file %s\n",
#  111|               argv[3]); exit(1);}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
ilbc-3.0.4-build/libilbc-3.0.4/iLBC_test2.c:109:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[2], "rb")’
#  107|       fprintf(stderr,"Cannot open input file %s\n", argv[2]);
#  108|       exit(2);}
#  109|->   if ( (efileid=fopen(argv[3],"wb")) == NULL) {
#  110|       fprintf(stderr, "Cannot open encoded file file %s\n",
#  111|               argv[3]); exit(1);}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
ilbc-3.0.4-build/libilbc-3.0.4/iLBC_test2.c:112:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[3], "wb")’
#  110|       fprintf(stderr, "Cannot open encoded file file %s\n",
#  111|               argv[3]); exit(1);}
#  112|->   if ( (ofileid=fopen(argv[4],"wb")) == NULL) {
#  113|       fprintf(stderr, "Cannot open decoded file %s\n",
#  114|               argv[4]); exit(1);}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
ilbc-3.0.4-build/libilbc-3.0.4/iLBC_test2.c:112:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[3], "wb")’
#  110|       fprintf(stderr, "Cannot open encoded file file %s\n",
#  111|               argv[3]); exit(1);}
#  112|->   if ( (ofileid=fopen(argv[4],"wb")) == NULL) {
#  113|       fprintf(stderr, "Cannot open decoded file %s\n",
#  114|               argv[4]); exit(1);}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
ilbc-3.0.4-build/libilbc-3.0.4/iLBC_test2.c:116:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[4], "wb")’
#  114|               argv[4]); exit(1);}
#  115|     if (argc==6) {
#  116|->     if( (cfileid=fopen(argv[5],"rb")) == NULL) {
#  117|         fprintf(stderr, "Cannot open channel file %s\n",
#  118|                 argv[5]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
ilbc-3.0.4-build/libilbc-3.0.4/iLBC_test2.c:116:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[4], "wb")’
#  114|               argv[4]); exit(1);}
#  115|     if (argc==6) {
#  116|->     if( (cfileid=fopen(argv[5],"rb")) == NULL) {
#  117|         fprintf(stderr, "Cannot open channel file %s\n",
#  118|                 argv[5]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
ilbc-3.0.4-build/libilbc-3.0.4/iLBC_test2.c:127:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[4], "wb")’
#  125|     /* print info */
#  126|   
#  127|->   fprintf(stderr, "\n");
#  128|     fprintf(stderr,
#  129|             "*---------------------------------------------------*\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
ilbc-3.0.4-build/libilbc-3.0.4/iLBC_test2.c:127:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[4], "wb")’
#  125|     /* print info */
#  126|   
#  127|->   fprintf(stderr, "\n");
#  128|     fprintf(stderr,
#  129|             "*---------------------------------------------------*\n");

Error: GCC_ANALYZER_WARNING (CWE-617): [#def11]
ilbc-3.0.4-build/libilbc-3.0.4/iLBC_test2.c:178:11: warning[-Wanalyzer-tainted-assertion]: use of attacked-controlled value in condition for assertion
#  176|           if ((pli!=0)&&(pli!=1)) {
#  177|             fprintf(stderr, "Error in channel file\n");
#  178|->           exit(0);
#  179|           }
#  180|           if (pli==0) {

Error: CPPCHECK_WARNING (CWE-457): [#def12]
ilbc-3.0.4-build/libilbc-3.0.4/modules/audio_coding/codecs/ilbc/get_sync_seq.c:92: warning[uninitvar]: Uninitialized variable: plocs2
#   90|       WebRtcIlbcfix_NearestNeighbor(
#   91|           lagBlock + q,
#   92|->         plocs2,
#   93|           blockStartPos[q - 1] + 4 * ENH_BLOCKL_HALF,
#   94|           periodl);

Error: CPPCHECK_WARNING (CWE-190): [#def13]
ilbc-3.0.4-build/libilbc-3.0.4/modules/audio_coding/codecs/ilbc/hp_input.c:86: error[integerOverflow]: Signed integer overflow for expression 'tmpW32-(y[0]<<16)'.
#   84|   
#   85|       y[0] = (int16_t)(tmpW32 >> 16);
#   86|->     y[1] = (int16_t)((tmpW32 - (y[0] << 16)) >> 1);
#   87|     }
#   88|   

Error: CPPCHECK_WARNING (CWE-457): [#def14]
ilbc-3.0.4-build/libilbc-3.0.4/modules/audio_coding/codecs/ilbc/ilbc.c:265: error[uninitvar]: Uninitialized variable: &dummy
#  263|       // that can be bad.
#  264|       int result = WebRtcIlbcfix_DecodeImpl(
#  265|->         &decoded[i * ((IlbcDecoder*)iLBCdec_inst)->blockl], &dummy,
#  266|           (IlbcDecoder*)iLBCdec_inst, 0);
#  267|       RTC_CHECK_EQ(result, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
ilbc-3.0.4-build/libilbc-3.0.4/modules/audio_coding/codecs/ilbc/test/iLBC_test.c: scope_hint: In function ‘main’
ilbc-3.0.4-build/libilbc-3.0.4/modules/audio_coding/codecs/ilbc/test/iLBC_test.c:106:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[2], "rb")’
#  104|       fprintf(stderr,"Cannot open input file %s\n", argv[2]);
#  105|       exit(2);}
#  106|->   if ( (efileid=fopen(argv[3],"wb")) == NULL) {
#  107|       fprintf(stderr, "Cannot open encoded file file %s\n",
#  108|               argv[3]); exit(1);}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
ilbc-3.0.4-build/libilbc-3.0.4/modules/audio_coding/codecs/ilbc/test/iLBC_test.c:106:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[2], "rb")’
#  104|       fprintf(stderr,"Cannot open input file %s\n", argv[2]);
#  105|       exit(2);}
#  106|->   if ( (efileid=fopen(argv[3],"wb")) == NULL) {
#  107|       fprintf(stderr, "Cannot open encoded file file %s\n",
#  108|               argv[3]); exit(1);}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def17]
ilbc-3.0.4-build/libilbc-3.0.4/modules/audio_coding/codecs/ilbc/test/iLBC_test.c:109:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[3], "wb")’
#  107|       fprintf(stderr, "Cannot open encoded file file %s\n",
#  108|               argv[3]); exit(1);}
#  109|->   if ( (ofileid=fopen(argv[4],"wb")) == NULL) {
#  110|       fprintf(stderr, "Cannot open decoded file %s\n",
#  111|               argv[4]); exit(1);}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
ilbc-3.0.4-build/libilbc-3.0.4/modules/audio_coding/codecs/ilbc/test/iLBC_test.c:109:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[3], "wb")’
#  107|       fprintf(stderr, "Cannot open encoded file file %s\n",
#  108|               argv[3]); exit(1);}
#  109|->   if ( (ofileid=fopen(argv[4],"wb")) == NULL) {
#  110|       fprintf(stderr, "Cannot open decoded file %s\n",
#  111|               argv[4]); exit(1);}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def19]
ilbc-3.0.4-build/libilbc-3.0.4/modules/audio_coding/codecs/ilbc/test/iLBC_test.c:113:18: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[4], "wb")’
#  111|               argv[4]); exit(1);}
#  112|     if (argc==6) {
#  113|->     if( (cfileid=fopen(argv[5],"rb")) == NULL) {
#  114|         fprintf(stderr, "Cannot open channel file %s\n",
#  115|                 argv[5]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
ilbc-3.0.4-build/libilbc-3.0.4/modules/audio_coding/codecs/ilbc/test/iLBC_test.c:113:18: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[4], "wb")’
#  111|               argv[4]); exit(1);}
#  112|     if (argc==6) {
#  113|->     if( (cfileid=fopen(argv[5],"rb")) == NULL) {
#  114|         fprintf(stderr, "Cannot open channel file %s\n",
#  115|                 argv[5]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
ilbc-3.0.4-build/libilbc-3.0.4/modules/audio_coding/codecs/ilbc/test/iLBC_test.c:124:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(argv[4], "wb")’
#  122|     /* print info */
#  123|   
#  124|->   fprintf(stderr, "\n");
#  125|     fprintf(stderr,
#  126|             "*---------------------------------------------------*\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
ilbc-3.0.4-build/libilbc-3.0.4/modules/audio_coding/codecs/ilbc/test/iLBC_test.c:124:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(argv[4], "wb")’
#  122|     /* print info */
#  123|   
#  124|->   fprintf(stderr, "\n");
#  125|     fprintf(stderr,
#  126|             "*---------------------------------------------------*\n");

Error: GCC_ANALYZER_WARNING (CWE-617): [#def23]
ilbc-3.0.4-build/libilbc-3.0.4/modules/audio_coding/codecs/ilbc/test/iLBC_test.c:186:11: warning[-Wanalyzer-tainted-assertion]: use of attacked-controlled value in condition for assertion
#  184|           if ((pli!=0)&&(pli!=1)) {
#  185|             fprintf(stderr, "Error in channel file\n");
#  186|->           exit(0);
#  187|           }
#  188|           if (pli==0) {

Error: CPPCHECK_WARNING (CWE-758): [#def24]
ilbc-3.0.4-build/libilbc-3.0.4/modules/audio_coding/codecs/ilbc/xcorr_coef.c:116: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  114|   
#  115|         if (scalediff<0) {
#  116|->         newCrit = ((int32_t)crossCorrSqMod*EnergyMod_Max)>>(-scalediff);
#  117|           maxCrit = ((int32_t)crossCorrSqMod_Max*EnergyMod);
#  118|         } else {

Error: CPPCHECK_WARNING (CWE-758): [#def25]
ilbc-3.0.4-build/libilbc-3.0.4/modules/audio_coding/codecs/ilbc/xcorr_coef.c:120: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  118|         } else {
#  119|           newCrit = ((int32_t)crossCorrSqMod*EnergyMod_Max);
#  120|->         maxCrit = ((int32_t)crossCorrSqMod_Max*EnergyMod)>>scalediff;
#  121|         }
#  122|   

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-166.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-nameilbc-3.0.4-12.fc42
store-results-to/tmp/tmpxj2s_or1/ilbc-3.0.4-12.fc42.tar.xz
time-created2024-11-13 00:19:35
time-finished2024-11-13 00:21:23
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpxj2s_or1/ilbc-3.0.4-12.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpxj2s_or1/ilbc-3.0.4-12.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9