Task #91318 - added.err

back to task #91318
download
Error: COMPILER_WARNING:
libavif-1.3.0/src/mem.c:12:12: warning[-Walloc-size-larger-than=]: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807
#   12 |     return malloc(size);
#      |            ^
/usr/include/stdlib.h: scope_hint: In member function ‘TestBody’
/usr/include/stdlib.h:676:14: note: in a call to allocation function ‘malloc’ declared here
#  676 | extern void *malloc (size_t __size) __THROW __attribute_malloc__
#      |              ^
#   10|   {
#   11|       assert(size != 0); // Implementation-defined. See https://en.cppreference.com/w/cpp/memory/c/malloc
#   12|->     return malloc(size);
#   13|   }
#   14|   

Error: GCC_ANALYZER_WARNING (CWE-401):
libavif-1.3.0/tests/aviftest.c:80:21: warning[-Wanalyzer-malloc-leak]: leak of ‘nfd.dir’
libavif-1.3.0/tests/aviftest.c:161:12: enter_function: entry to ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:171:8: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:175:5: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:184:29: call_function: calling ‘nextFilename’ from ‘runIOTests’
#   78|   
#   79|       struct dirent * entry;
#   80|->     while ((entry = readdir(nfd->dir)) != NULL) {
#   81|           const char * dot = strrchr(entry->d_name, '.');
#   82|           if (dot) {

Error: GCC_ANALYZER_WARNING (CWE-775):
libavif-1.3.0/tests/aviftest.c:202:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fullFilename, "rb")’
libavif-1.3.0/tests/aviftest.c:161:12: enter_function: entry to ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:171:8: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:175:5: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:184:29: call_function: calling ‘nextFilename’ from ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:184:29: return_function: returning to ‘runIOTests’ from ‘nextFilename’
libavif-1.3.0/tests/aviftest.c:185:12: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
libavif-1.3.0/tests/aviftest.c:187:30: branch_true: ...to here
libavif-1.3.0/tests/aviftest.c:188:12: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:193:9: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:196:20: acquire_resource: opened here
libavif-1.3.0/tests/aviftest.c:197:12: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:202:9: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:202:9: throw: if ‘fseek’ throws an exception...
libavif-1.3.0/tests/aviftest.c:202:9: danger: ‘fopen(&fullFilename, "rb")’ leaks here; was opened at [(20)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/19)
#  200|               break;
#  201|           }
#  202|->         fseek(f, 0, SEEK_END);
#  203|           size_t fileSize = ftell(f);
#  204|           fseek(f, 0, SEEK_SET);

Error: GCC_ANALYZER_WARNING (CWE-401):
libavif-1.3.0/tests/aviftest.c:202:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fullFilename, "rb")’
libavif-1.3.0/tests/aviftest.c:161:12: enter_function: entry to ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:171:8: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:175:5: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:184:29: call_function: calling ‘nextFilename’ from ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:184:29: return_function: returning to ‘runIOTests’ from ‘nextFilename’
libavif-1.3.0/tests/aviftest.c:185:12: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
libavif-1.3.0/tests/aviftest.c:187:30: branch_true: ...to here
libavif-1.3.0/tests/aviftest.c:188:12: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:193:9: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:196:20: acquire_memory: allocated here
libavif-1.3.0/tests/aviftest.c:197:12: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:202:9: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:202:9: throw: if ‘fseek’ throws an exception...
libavif-1.3.0/tests/aviftest.c:202:9: danger: ‘fopen(&fullFilename, "rb")’ leaks here; was allocated at [(20)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/19)
#  200|               break;
#  201|           }
#  202|->         fseek(f, 0, SEEK_END);
#  203|           size_t fileSize = ftell(f);
#  204|           fseek(f, 0, SEEK_SET);

Error: GCC_ANALYZER_WARNING (CWE-775):
libavif-1.3.0/tests/aviftest.c:203:27: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fullFilename, "rb")’
libavif-1.3.0/tests/aviftest.c:161:12: enter_function: entry to ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:171:8: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:175:5: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:184:29: call_function: calling ‘nextFilename’ from ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:184:29: return_function: returning to ‘runIOTests’ from ‘nextFilename’
libavif-1.3.0/tests/aviftest.c:185:12: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
libavif-1.3.0/tests/aviftest.c:187:30: branch_true: ...to here
libavif-1.3.0/tests/aviftest.c:188:12: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:193:9: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:196:20: acquire_resource: opened here
libavif-1.3.0/tests/aviftest.c:197:12: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:202:9: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:203:27: throw: if ‘ftell’ throws an exception...
libavif-1.3.0/tests/aviftest.c:203:27: danger: ‘fopen(&fullFilename, "rb")’ leaks here; was opened at [(20)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/19)
#  201|           }
#  202|           fseek(f, 0, SEEK_END);
#  203|->         size_t fileSize = ftell(f);
#  204|           fseek(f, 0, SEEK_SET);
#  205|           if (avifRWDataRealloc(&fileBuffer, fileSize) != AVIF_RESULT_OK) {

Error: GCC_ANALYZER_WARNING (CWE-401):
libavif-1.3.0/tests/aviftest.c:203:27: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fullFilename, "rb")’
libavif-1.3.0/tests/aviftest.c:161:12: enter_function: entry to ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:171:8: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:175:5: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:184:29: call_function: calling ‘nextFilename’ from ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:184:29: return_function: returning to ‘runIOTests’ from ‘nextFilename’
libavif-1.3.0/tests/aviftest.c:185:12: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
libavif-1.3.0/tests/aviftest.c:187:30: branch_true: ...to here
libavif-1.3.0/tests/aviftest.c:188:12: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:193:9: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:196:20: acquire_memory: allocated here
libavif-1.3.0/tests/aviftest.c:197:12: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:202:9: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:203:27: throw: if ‘ftell’ throws an exception...
libavif-1.3.0/tests/aviftest.c:203:27: danger: ‘fopen(&fullFilename, "rb")’ leaks here; was allocated at [(20)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/19)
#  201|           }
#  202|           fseek(f, 0, SEEK_END);
#  203|->         size_t fileSize = ftell(f);
#  204|           fseek(f, 0, SEEK_SET);
#  205|           if (avifRWDataRealloc(&fileBuffer, fileSize) != AVIF_RESULT_OK) {

Error: GCC_ANALYZER_WARNING (CWE-775):
libavif-1.3.0/tests/aviftest.c:204:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fullFilename, "rb")’
libavif-1.3.0/tests/aviftest.c:161:12: enter_function: entry to ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:171:8: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:175:5: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:184:29: call_function: calling ‘nextFilename’ from ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:184:29: return_function: returning to ‘runIOTests’ from ‘nextFilename’
libavif-1.3.0/tests/aviftest.c:185:12: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
libavif-1.3.0/tests/aviftest.c:187:30: branch_true: ...to here
libavif-1.3.0/tests/aviftest.c:188:12: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:193:9: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:196:20: acquire_resource: opened here
libavif-1.3.0/tests/aviftest.c:197:12: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:202:9: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:204:9: throw: if ‘fseek’ throws an exception...
libavif-1.3.0/tests/aviftest.c:204:9: danger: ‘fopen(&fullFilename, "rb")’ leaks here; was opened at [(20)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/19)
#  202|           fseek(f, 0, SEEK_END);
#  203|           size_t fileSize = ftell(f);
#  204|->         fseek(f, 0, SEEK_SET);
#  205|           if (avifRWDataRealloc(&fileBuffer, fileSize) != AVIF_RESULT_OK) {
#  206|               printf("Out of memory when allocating buffer to read file: %s\n", filename);

Error: GCC_ANALYZER_WARNING (CWE-401):
libavif-1.3.0/tests/aviftest.c:204:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fullFilename, "rb")’
libavif-1.3.0/tests/aviftest.c:161:12: enter_function: entry to ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:171:8: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:175:5: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:184:29: call_function: calling ‘nextFilename’ from ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:184:29: return_function: returning to ‘runIOTests’ from ‘nextFilename’
libavif-1.3.0/tests/aviftest.c:185:12: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
libavif-1.3.0/tests/aviftest.c:187:30: branch_true: ...to here
libavif-1.3.0/tests/aviftest.c:188:12: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:193:9: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:196:20: acquire_memory: allocated here
libavif-1.3.0/tests/aviftest.c:197:12: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:202:9: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:204:9: throw: if ‘fseek’ throws an exception...
libavif-1.3.0/tests/aviftest.c:204:9: danger: ‘fopen(&fullFilename, "rb")’ leaks here; was allocated at [(20)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/19)
#  202|           fseek(f, 0, SEEK_END);
#  203|           size_t fileSize = ftell(f);
#  204|->         fseek(f, 0, SEEK_SET);
#  205|           if (avifRWDataRealloc(&fileBuffer, fileSize) != AVIF_RESULT_OK) {
#  206|               printf("Out of memory when allocating buffer to read file: %s\n", filename);

Error: GCC_ANALYZER_WARNING (CWE-775):
libavif-1.3.0/tests/aviftest.c:205:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&fullFilename, "rb")’
libavif-1.3.0/tests/aviftest.c:161:12: enter_function: entry to ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:171:8: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:175:5: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:184:29: call_function: calling ‘nextFilename’ from ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:184:29: return_function: returning to ‘runIOTests’ from ‘nextFilename’
libavif-1.3.0/tests/aviftest.c:185:12: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
libavif-1.3.0/tests/aviftest.c:187:30: branch_true: ...to here
libavif-1.3.0/tests/aviftest.c:188:12: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:193:9: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:196:20: acquire_resource: opened here
libavif-1.3.0/tests/aviftest.c:197:12: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:202:9: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:205:13: throw: if ‘avifRWDataRealloc’ throws an exception...
libavif-1.3.0/tests/aviftest.c:205:13: danger: ‘fopen(&fullFilename, "rb")’ leaks here; was opened at [(20)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/19)
#  203|           size_t fileSize = ftell(f);
#  204|           fseek(f, 0, SEEK_SET);
#  205|->         if (avifRWDataRealloc(&fileBuffer, fileSize) != AVIF_RESULT_OK) {
#  206|               printf("Out of memory when allocating buffer to read file: %s\n", filename);
#  207|               fclose(f);

Error: GCC_ANALYZER_WARNING (CWE-401):
libavif-1.3.0/tests/aviftest.c:205:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&fullFilename, "rb")’
libavif-1.3.0/tests/aviftest.c:161:12: enter_function: entry to ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:171:8: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:175:5: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:184:29: call_function: calling ‘nextFilename’ from ‘runIOTests’
libavif-1.3.0/tests/aviftest.c:184:29: return_function: returning to ‘runIOTests’ from ‘nextFilename’
libavif-1.3.0/tests/aviftest.c:185:12: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
libavif-1.3.0/tests/aviftest.c:187:30: branch_true: ...to here
libavif-1.3.0/tests/aviftest.c:188:12: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:193:9: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:196:20: acquire_memory: allocated here
libavif-1.3.0/tests/aviftest.c:197:12: branch_false: following ‘false’ branch...
libavif-1.3.0/tests/aviftest.c:202:9: branch_false: ...to here
libavif-1.3.0/tests/aviftest.c:205:13: throw: if ‘avifRWDataRealloc’ throws an exception...
libavif-1.3.0/tests/aviftest.c:205:13: danger: ‘fopen(&fullFilename, "rb")’ leaks here; was allocated at [(20)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/19)
#  203|           size_t fileSize = ftell(f);
#  204|           fseek(f, 0, SEEK_SET);
#  205|->         if (avifRWDataRealloc(&fileBuffer, fileSize) != AVIF_RESULT_OK) {
#  206|               printf("Out of memory when allocating buffer to read file: %s\n", filename);
#  207|               fclose(f);

Error: COMPILER_WARNING:
libavif-1.3.0/tests/gtest/avifincrtest_helpers.cc: scope_hint: In function ‘void avif::testutil::{anonymous}::EncodeAsGrid(const avifImage&, uint32_t, uint32_t, avifRWData*, uint32_t*, uint32_t*)’
libavif-1.3.0/tests/gtest/avifincrtest_helpers.cc:214:26: warning[-Wunused-but-set-variable=]: variable ‘i_cell’ set but not used
#  214 |   for (uint32_t row = 0, i_cell = 0; row < grid_rows; ++row) {
#      |                          ^~~~~~
#  212|     std::vector<ImagePtr> cell_images;
#  213|     cell_images.reserve(grid_cols * grid_rows);
#  214|->   for (uint32_t row = 0, i_cell = 0; row < grid_rows; ++row) {
#  215|       for (uint32_t col = 0; col < grid_cols; ++col, ++i_cell) {
#  216|         avifCropRect cell;