supermin-5.3.5-7.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
supermin-5.3.5/init/init.c:350:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
supermin-5.3.5/init/init.c:109:1: enter_function: entry to ‘main’
supermin-5.3.5/init/init.c:157:6: branch_false: following ‘false’ branch...
supermin-5.3.5/init/init.c:162:8: branch_false: ...to here
supermin-5.3.5/init/init.c:162:8: acquire_resource: opened here
supermin-5.3.5/init/init.c:163:6: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
 branch_false: ...to here
supermin-5.3.5/init/init.c:167:10: branch_true: following ‘true’ branch...
supermin-5.3.5/init/init.c:168:16: branch_true: ...to here
supermin-5.3.5/init/init.c:178:7: call_function: calling ‘insmod’ from ‘main’
#  348|     close (fd);
#  349|   
#  350|->   if (init_module (buf, size, "") != 0) {
#  351|       fprintf (stderr, "insmod: init_module: %s: %s\n", filename, moderror (errno));
#  352|       /* However ignore the error because this can just happen because

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
supermin-5.3.5/init/init.c:350:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
supermin-5.3.5/init/init.c:325:6: branch_false: following ‘false’ branch (when ‘fd != -1’)...
supermin-5.3.5/init/init.c:329:7: branch_false: ...to here
supermin-5.3.5/init/init.c:329:6: branch_false: following ‘false’ branch...
supermin-5.3.5/init/init.c:333:3: branch_false: ...to here
supermin-5.3.5/init/init.c:334:9: acquire_memory: allocated here
supermin-5.3.5/init/init.c:335:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
 branch_false: ...to here
supermin-5.3.5/init/init.c:342:8: branch_false: following ‘false’ branch (when ‘rc != -1’)...
supermin-5.3.5/init/init.c:346:12: branch_false: ...to here
supermin-5.3.5/init/init.c:350:7: danger: ‘buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  348|     close (fd);
#  349|   
#  350|->   if (init_module (buf, size, "") != 0) {
#  351|       fprintf (stderr, "insmod: init_module: %s: %s\n", filename, moderror (errno));
#  352|       /* However ignore the error because this can just happen because

Error: GCC_ANALYZER_WARNING (CWE-775): [#def3]
supermin-5.3.5/init/init.c:597:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
supermin-5.3.5/init/init.c:567:6: branch_false: following ‘false’ branch (when ‘dir’ is non-NULL)...
 branch_false: ...to here
supermin-5.3.5/init/init.c:572:10: branch_true: following ‘true’ branch (when ‘d’ is non-NULL)...
supermin-5.3.5/init/init.c:574:11: branch_true: ...to here
supermin-5.3.5/init/init.c:576:8: branch_false: following ‘false’ branch...
supermin-5.3.5/init/init.c:579:43: branch_false: ...to here
supermin-5.3.5/init/init.c:581:8: branch_false: following ‘false’ branch...
supermin-5.3.5/init/init.c:585:5: branch_false: ...to here
supermin-5.3.5/init/init.c:586:8: branch_false: following ‘false’ branch...
supermin-5.3.5/init/init.c:591:10: branch_false: ...to here
supermin-5.3.5/init/init.c:591:10: acquire_resource: opened here
supermin-5.3.5/init/init.c:592:8: branch_false: following ‘false’ branch (when ‘fd != -1’)...
supermin-5.3.5/init/init.c:597:9: branch_false: ...to here
supermin-5.3.5/init/init.c:597:9: danger: ‘fd’ leaks here; was opened at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  595|       }
#  596|   
#  597|->     if (pread (fd, uuid, sizeof uuid, 0x468) != sizeof uuid) {
#  598|         /*perror ("pread"); - not an error, the device might just be small */
#  599|         goto cont;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
supermin-5.3.5/src/ext2fs-c.c:83:3: warning[-Wanalyzer-malloc-leak]: leak of ‘dirname’
supermin-5.3.5/src/ext2fs-c.c:638:1: enter_function: entry to ‘ext2_copy_file’
supermin-5.3.5/src/ext2fs-c.c:648:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:655:7: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:669:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:682:14: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:683:3: branch_true: following ‘true’ branch (when ‘n <= 4096’)...
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: following ‘true’ branch (when ‘n != 0’)...
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: following ‘false’ branch (when ‘n != 1’)...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:701:19: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:703:6: branch_false: following ‘false’ branch (when ‘dest != p’)...
supermin-5.3.5/src/ext2fs-c.c:708:30: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:708:15: acquire_memory: allocated here
supermin-5.3.5/src/ext2fs-c.c:753:8: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:757:7: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:763:7: call_function: calling ‘ext2_error_to_exception’ from ‘ext2_copy_file’
#   81|   ext2_error_to_exception (const char *fn, errcode_t err, const char *filename)
#   82|   {
#   83|->   fprintf (stderr, "supermin: %s: %s: %s\n",
#   84|   	   fn, filename ? : "(no filename))", error_message (err));
#   85|     caml_failwith (fn);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
supermin-5.3.5/src/ext2fs-c.c:85:3: warning[-Wanalyzer-malloc-leak]: leak of ‘dirname’
supermin-5.3.5/src/ext2fs-c.c:638:1: enter_function: entry to ‘ext2_copy_file’
supermin-5.3.5/src/ext2fs-c.c:648:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:655:7: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:669:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:682:14: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:683:3: branch_true: following ‘true’ branch (when ‘n <= 4096’)...
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: following ‘true’ branch (when ‘n != 0’)...
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: following ‘false’ branch (when ‘n != 1’)...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:701:19: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:703:6: branch_false: following ‘false’ branch (when ‘dest != p’)...
supermin-5.3.5/src/ext2fs-c.c:708:30: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:708:15: acquire_memory: allocated here
supermin-5.3.5/src/ext2fs-c.c:753:8: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:757:7: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:763:7: call_function: calling ‘ext2_error_to_exception’ from ‘ext2_copy_file’
#   83|     fprintf (stderr, "supermin: %s: %s: %s\n",
#   84|   	   fn, filename ? : "(no filename))", error_message (err));
#   85|->   caml_failwith (fn);
#   86|   }
#   87|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def6]
supermin-5.3.5/src/ext2fs-c.c:509:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(src, 0)’
supermin-5.3.5/src/ext2fs-c.c:490:8: acquire_resource: opened here
supermin-5.3.5/src/ext2fs-c.c:491:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:509:9: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:509:9: danger: ‘open(src, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  507|     }
#  508|   
#  509|->   err = ext2fs_file_open2 (fs, ino, NULL, EXT2_FILE_WRITE, &file);
#  510|     if (err != 0)
#  511|       ext2_error_to_exception ("ext2fs_file_open2", err, filename);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
supermin-5.3.5/src/ext2fs-c.c:510:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(src, 0)’
supermin-5.3.5/src/ext2fs-c.c:490:8: acquire_resource: opened here
supermin-5.3.5/src/ext2fs-c.c:491:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:509:9: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:510:6: danger: ‘open(src, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  508|   
#  509|     err = ext2fs_file_open2 (fs, ino, NULL, EXT2_FILE_WRITE, &file);
#  510|->   if (err != 0)
#  511|       ext2_error_to_exception ("ext2fs_file_open2", err, filename);
#  512|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def8]
supermin-5.3.5/src/ext2fs-c.c:514:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(src, 0)’
supermin-5.3.5/src/ext2fs-c.c:490:8: acquire_resource: opened here
supermin-5.3.5/src/ext2fs-c.c:491:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:509:9: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:510:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:513:10: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:514:11: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:514:11: danger: ‘open(src, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  512|   
#  513|     while ((r = read (fd, buf, sizeof buf)) > 0) {
#  514|->     err = ext2fs_file_write (file, buf, r, &written);
#  515|       if (err != 0)
#  516|         ext2_error_to_exception ("ext2fs_file_open2", err, filename);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
supermin-5.3.5/src/ext2fs-c.c:522:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(src, 0)’
supermin-5.3.5/src/ext2fs-c.c:490:8: acquire_resource: opened here
supermin-5.3.5/src/ext2fs-c.c:491:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:509:9: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:510:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:522:6: danger: ‘open(src, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  520|     }
#  521|   
#  522|->   if (r == -1)
#  523|       unix_error (errno, (char *) "read", caml_copy_string (filename));
#  524|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def10]
supermin-5.3.5/src/ext2fs-c.c:525:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(src, 0)’
supermin-5.3.5/src/ext2fs-c.c:490:8: acquire_resource: opened here
supermin-5.3.5/src/ext2fs-c.c:491:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:509:9: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:510:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:522:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:525:7: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:525:6: danger: ‘open(src, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  523|       unix_error (errno, (char *) "read", caml_copy_string (filename));
#  524|   
#  525|->   if (close (fd) == -1)
#  526|       unix_error (errno, (char *) "close", caml_copy_string (filename));
#  527|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def11]
supermin-5.3.5/src/ext2fs-c.c:717:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘dirname’ where non-null expected
supermin-5.3.5/src/ext2fs-c.c:648:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:655:7: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:669:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:682:14: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:683:3: branch_true: following ‘true’ branch (when ‘n <= 4096’)...
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: following ‘true’ branch (when ‘n != 0’)...
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: following ‘false’ branch (when ‘n != 1’)...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:701:19: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:703:6: branch_false: following ‘false’ branch (when ‘dest != p’)...
supermin-5.3.5/src/ext2fs-c.c:708:30: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:708:15: acquire_memory: this call could return NULL
supermin-5.3.5/src/ext2fs-c.c:717:9: danger: argument 1 (‘dirname’) from [(17)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/16) could be NULL where non-null expected
#  715|        */
#  716|       struct stat stat1, stat2;
#  717|->     if (lstat (dirname, &stat1) == 0 && S_ISLNK (stat1.st_mode) &&
#  718|   	stat (dirname, &stat2) == 0 && S_ISDIR (stat2.st_mode)) {
#  719|         char cmd[strlen (dirname) + 100];

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
supermin-5.3.5/src/ext2fs-c.c:732:9: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(__builtin_alloca_with_align(strlen(dirname) + 100, 8), "r")’
supermin-5.3.5/src/ext2fs-c.c:648:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:655:7: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:669:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:682:14: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:683:3: branch_true: following ‘true’ branch (when ‘n <= 4096’)...
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: following ‘true’ branch (when ‘n != 0’)...
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: following ‘false’ branch (when ‘n != 1’)...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:701:19: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:703:6: branch_false: following ‘false’ branch (when ‘dest != p’)...
supermin-5.3.5/src/ext2fs-c.c:708:30: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:717:8: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:717:9: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:718:65: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:726:12: acquire_memory: allocated here
supermin-5.3.5/src/ext2fs-c.c:727:10: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:729:21: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:730:10: branch_true: following ‘true’ branch (when ‘new_dirname’ is NULL)...
supermin-5.3.5/src/ext2fs-c.c:731:9: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:732:9: danger: ‘popen(__builtin_alloca_with_align(strlen(dirname) + 100, 8), "r")’ leaks here; was allocated at [(21)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/20)
#  730|         if (new_dirname == NULL) {
#  731|   	pclose (fp);
#  732|-> 	goto cont;
#  733|         }
#  734|         if (fgets (new_dirname, PATH_MAX, fp) == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
supermin-5.3.5/src/ext2fs-c.c:735:9: warning[-Wanalyzer-malloc-leak]: leak of ‘new_dirname’
supermin-5.3.5/src/ext2fs-c.c:648:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:655:7: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:669:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:682:14: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:683:3: branch_true: following ‘true’ branch (when ‘n <= 4096’)...
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: following ‘true’ branch (when ‘n != 0’)...
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: following ‘false’ branch (when ‘n != 1’)...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:701:19: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:703:6: branch_false: following ‘false’ branch (when ‘dest != p’)...
supermin-5.3.5/src/ext2fs-c.c:708:30: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:717:8: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:717:9: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:718:65: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:727:10: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:729:21: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:729:21: acquire_memory: allocated here
supermin-5.3.5/src/ext2fs-c.c:730:10: branch_false: following ‘false’ branch (when ‘new_dirname’ is non-NULL)...
supermin-5.3.5/src/ext2fs-c.c:734:11: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:734:10: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:735:9: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:735:9: danger: ‘new_dirname’ leaks here; was allocated at [(23)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/22)
#  733|         }
#  734|         if (fgets (new_dirname, PATH_MAX, fp) == NULL) {
#  735|-> 	pclose (fp);
#  736|   	free (new_dirname);
#  737|   	goto cont;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
supermin-5.3.5/src/ext2fs-c.c:736:9: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(__builtin_alloca_with_align(strlen(dirname) + 100, 8), "r")’
supermin-5.3.5/src/ext2fs-c.c:648:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:655:7: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:669:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:682:14: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:683:3: branch_true: following ‘true’ branch (when ‘n <= 4096’)...
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: following ‘true’ branch (when ‘n != 0’)...
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: following ‘false’ branch (when ‘n != 1’)...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:701:19: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:703:6: branch_false: following ‘false’ branch (when ‘dest != p’)...
supermin-5.3.5/src/ext2fs-c.c:708:30: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:717:8: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:717:9: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:718:65: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:726:12: acquire_memory: allocated here
supermin-5.3.5/src/ext2fs-c.c:727:10: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:729:21: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:730:10: branch_false: following ‘false’ branch (when ‘new_dirname’ is non-NULL)...
supermin-5.3.5/src/ext2fs-c.c:734:11: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:734:10: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:735:9: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:736:9: danger: ‘popen(__builtin_alloca_with_align(strlen(dirname) + 100, 8), "r")’ leaks here; was allocated at [(21)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/20)
#  734|         if (fgets (new_dirname, PATH_MAX, fp) == NULL) {
#  735|   	pclose (fp);
#  736|-> 	free (new_dirname);
#  737|   	goto cont;
#  738|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
supermin-5.3.5/src/ext2fs-c.c:739:7: warning[-Wanalyzer-malloc-leak]: leak of ‘new_dirname’
supermin-5.3.5/src/ext2fs-c.c:648:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:655:7: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:669:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:682:14: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:683:3: branch_true: following ‘true’ branch (when ‘n <= 4096’)...
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: following ‘true’ branch (when ‘n != 0’)...
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: following ‘false’ branch (when ‘n != 1’)...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:701:19: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:703:6: branch_false: following ‘false’ branch (when ‘dest != p’)...
supermin-5.3.5/src/ext2fs-c.c:708:30: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:717:8: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:717:9: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:718:65: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:727:10: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:729:21: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:729:21: acquire_memory: allocated here
supermin-5.3.5/src/ext2fs-c.c:730:10: branch_false: following ‘false’ branch (when ‘new_dirname’ is non-NULL)...
supermin-5.3.5/src/ext2fs-c.c:734:11: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:734:10: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:739:7: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:739:7: danger: ‘new_dirname’ leaks here; was allocated at [(23)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/22)
#  737|   	goto cont;
#  738|         }
#  739|->       pclose (fp);
#  740|   
#  741|         len = strlen (new_dirname);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
supermin-5.3.5/src/ext2fs-c.c:741:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(__builtin_alloca_with_align(strlen(dirname) + 100, 8), "r")’
supermin-5.3.5/src/ext2fs-c.c:648:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:655:7: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:669:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:682:14: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:683:3: branch_true: following ‘true’ branch (when ‘n <= 4096’)...
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: following ‘true’ branch (when ‘n != 0’)...
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: following ‘false’ branch (when ‘n != 1’)...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:701:19: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:703:6: branch_false: following ‘false’ branch (when ‘dest != p’)...
supermin-5.3.5/src/ext2fs-c.c:708:30: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:717:8: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:717:9: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:718:65: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:726:12: acquire_memory: allocated here
supermin-5.3.5/src/ext2fs-c.c:727:10: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:729:21: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:730:10: branch_false: following ‘false’ branch (when ‘new_dirname’ is non-NULL)...
supermin-5.3.5/src/ext2fs-c.c:734:11: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:734:10: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:739:7: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:741:13: danger: ‘popen(__builtin_alloca_with_align(strlen(dirname) + 100, 8), "r")’ leaks here; was allocated at [(21)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/20)
#  739|         pclose (fp);
#  740|   
#  741|->       len = strlen (new_dirname);
#  742|         if (len >= 1 &&
#  743|   	  new_dirname[len-1] == '\n')

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
supermin-5.3.5/src/ext2fs-c.c:752:11: warning[-Wanalyzer-malloc-leak]: leak of ‘dirname’
supermin-5.3.5/src/ext2fs-c.c:648:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:655:7: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:669:6: branch_false: following ‘false’ branch...
supermin-5.3.5/src/ext2fs-c.c:682:14: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:683:3: branch_true: following ‘true’ branch (when ‘n <= 4096’)...
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:684:3: branch_true: following ‘true’ branch (when ‘n != 0’)...
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:685:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: following ‘false’ branch (when ‘n != 1’)...
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:686:3: branch_true: following ‘true’ branch...
supermin-5.3.5/src/ext2fs-c.c:701:19: branch_true: ...to here
supermin-5.3.5/src/ext2fs-c.c:703:6: branch_false: following ‘false’ branch (when ‘dest != p’)...
supermin-5.3.5/src/ext2fs-c.c:708:30: branch_false: ...to here
supermin-5.3.5/src/ext2fs-c.c:708:15: acquire_memory: allocated here
supermin-5.3.5/src/ext2fs-c.c:752:11: danger: ‘dirname’ leaks here; was allocated at [(17)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/16)
#  750|   
#  751|       /* Look up the parent directory. */
#  752|->     err = ext2fs_namei (data->fs, EXT2_ROOT_INO, EXT2_ROOT_INO, dirname, &dir_ino);
#  753|       if (err != 0) {
#  754|         /* This is the most popular supermin "WTF" error, so make

Scan Properties

analyzer-version-clippy1.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-232.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-gcc-latest-x86_64
project-namesupermin-5.3.5-7.fc44
store-results-to/tmp/tmpkj6hay3c/supermin-5.3.5-7.fc44.tar.xz
time-created2025-10-28 20:34:27
time-finished2025-10-28 20:36:16
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpkj6hay3c/supermin-5.3.5-7.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpkj6hay3c/supermin-5.3.5-7.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9