cdrkit-1.1.11-59.fc43

List of Findings

Error: SHELLCHECK_WARNING (CWE-156): [#def1]
/usr/bin/cdda2ogg:65:15: warning[SC2046]: Quote this to prevent word splitting.
#   63|   fi
#   64|   
#   65|-> echo Fetching `echo $LIST | wc -w` tracks from $CDDA_DEVICE, encoding with $MP_CODER.
#   66|   echo Cancel with Ctrl-C, watch out for error messages.
#   67|   

Error: SHELLCHECK_WARNING (CWE-149): [#def2]
/usr/bin/pitchplay:31:44: warning[SC2027]: The surrounding quotes actually unquote this. Remove or escape them.
#   29|       RES=$?
#   30|       if [ $RES -ne 0 ]; then
#   31|->       echo "$CDDA2WAV error, return value "$RES". Aborted." >&2
#   32|         break
#   33|       fi

Error: SHELLCHECK_WARNING (CWE-149): [#def3]
/usr/bin/readmult:23:44: warning[SC2027]: The surrounding quotes actually unquote this. Remove or escape them.
#   21|       RES=$?
#   22|       if [ $RES -ne 0 ]; then
#   23|->       echo "$CDDA2WAV error, return value "$RES". Aborted." >&2
#   24|         break
#   25|       fi

Error: COMPILER_WARNING: [#def4]
cdrkit-1.1.11/genisoimage/apple.c: scope_hint: In function ‘set_ct’
cdrkit-1.1.11/genisoimage/apple.c:243:9: warning[-Wstringop-truncation]: ‘strncpy’ specified bound depends on the length of the source argument
#  243 |         strncpy(hfs_ent->u.file.type, t, MIN(CT_SIZE, strlen(t)));
#      |         ^
cdrkit-1.1.11/include/dirdefs.h:80: included_from: Included from here.
cdrkit-1.1.11/genisoimage/genisoimage.h:48: included_from: Included from here.
cdrkit-1.1.11/genisoimage/apple.c:51: included_from: Included from here.
cdrkit-1.1.11/genisoimage/apple.c:243:55: note: length computed here
#  243 |         strncpy(hfs_ent->u.file.type, t, MIN(CT_SIZE, strlen(t)));
#      |                                                       ^
#  241|   	memset(hfs_ent->u.file.creator, ' ', CT_SIZE);
#  242|   
#  243|-> 	strncpy(hfs_ent->u.file.type, t, MIN(CT_SIZE, strlen(t)));
#  244|   	strncpy(hfs_ent->u.file.creator, c, MIN(CT_SIZE, strlen(c)));
#  245|   

Error: COMPILER_WARNING: [#def5]
cdrkit-1.1.11/genisoimage/apple.c:244:9: warning[-Wstringop-truncation]: ‘strncpy’ specified bound depends on the length of the source argument
#  244 |         strncpy(hfs_ent->u.file.creator, c, MIN(CT_SIZE, strlen(c)));
#      |         ^
cdrkit-1.1.11/genisoimage/apple.c:244:58: note: length computed here
#  244 |         strncpy(hfs_ent->u.file.creator, c, MIN(CT_SIZE, strlen(c)));
#      |                                                          ^
#  242|   
#  243|   	strncpy(hfs_ent->u.file.type, t, MIN(CT_SIZE, strlen(t)));
#  244|-> 	strncpy(hfs_ent->u.file.creator, c, MIN(CT_SIZE, strlen(c)));
#  245|   
#  246|   	hfs_ent->u.file.type[CT_SIZE] = '\0';

Error: COMPILER_WARNING (CWE-697): [#def6]
cdrkit-1.1.11/genisoimage/apple.c: scope_hint: In function ‘get_es_info’
cdrkit-1.1.11/genisoimage/apple.c:708:21: warning[-Waddress]: the comparison will always evaluate as ‘true’ for the address of ‘ctime’ will never be NULL
#  708 |                 if (uinfo->ctime)
#      |                     ^~~~~
cdrkit-1.1.11/genisoimage/apple.c:57: included_from: Included from here.
cdrkit-1.1.11/genisoimage/apple.h:223:25: note: ‘ctime’ declared here
#  223 |         dword           ctime;                  /* mac file create time [44]*/
#      |                         ^~~~~
#  706|   
#  707|   		/* set create and modified date - if they exist */
#  708|-> 		if (uinfo->ctime)
#  709|   			hfs_ent->crdate =
#  710|   				d_getl(uinfo->ctime);

Error: COMPILER_WARNING (CWE-697): [#def7]
cdrkit-1.1.11/genisoimage/apple.c:712:21: warning[-Waddress]: the comparison will always evaluate as ‘true’ for the address of ‘mtime’ will never be NULL
#  712 |                 if (uinfo->mtime)
#      |                     ^~~~~
cdrkit-1.1.11/genisoimage/apple.h:225:25: note: ‘mtime’ declared here
#  225 |         dword           mtime;                  /* mac file modify time [56]*/
#      |                         ^~~~~
#  710|   				d_getl(uinfo->ctime);
#  711|   
#  712|-> 		if (uinfo->mtime)
#  713|   			hfs_ent->mddate =
#  714|   				d_getl(uinfo->mtime);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def8]
cdrkit-1.1.11/genisoimage/apple.c:1394:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(name, "rb")’
cdrkit-1.1.11/genisoimage/apple.c:1585:1: enter_function: entry to ‘get_fe_info’
cdrkit-1.1.11/genisoimage/apple.c:1597:12: branch_true: following ‘true’ branch (when ‘hfs_info’ is NULL)...
cdrkit-1.1.11/genisoimage/apple.c:1598:33: branch_true: ...to here
cdrkit-1.1.11/genisoimage/apple.c:1598:33: call_function: calling ‘get_hfs_fe_info’ from ‘get_fe_info’
# 1392|   	 * - rely on command line parameter
# 1393|   	 */
# 1394|-> 	if (afe_size <= 0)
# 1395|   		return (NULL);
# 1396|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
cdrkit-1.1.11/genisoimage/apple.c:1394:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(name, "rb")’
cdrkit-1.1.11/genisoimage/apple.c:1585:1: enter_function: entry to ‘get_fe_info’
cdrkit-1.1.11/genisoimage/apple.c:1597:12: branch_true: following ‘true’ branch (when ‘hfs_info’ is NULL)...
cdrkit-1.1.11/genisoimage/apple.c:1598:33: branch_true: ...to here
cdrkit-1.1.11/genisoimage/apple.c:1598:33: call_function: calling ‘get_hfs_fe_info’ from ‘get_fe_info’
# 1392|   	 * - rely on command line parameter
# 1393|   	 */
# 1394|-> 	if (afe_size <= 0)
# 1395|   		return (NULL);
# 1396|   

Error: CPPCHECK_WARNING (CWE-404): [#def10]
cdrkit-1.1.11/genisoimage/apple.c:1395: error[resourceLeak]: Resource leak: fp
# 1393|   	 */
# 1394|   	if (afe_size <= 0)
# 1395|-> 		return (NULL);
# 1396|   
# 1397|   	fe_num = afe_size / FE_SIZE;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def11]
cdrkit-1.1.11/genisoimage/apple.c:2463:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(name, "r")’
cdrkit-1.1.11/genisoimage/apple.c:2453:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/apple.c:2457:19: branch_false: ...to here
cdrkit-1.1.11/genisoimage/apple.c:2457:19: acquire_resource: opened here
cdrkit-1.1.11/genisoimage/apple.c:2457:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/apple.c:2460:27: branch_false: ...to here
cdrkit-1.1.11/genisoimage/apple.c:2463:16: danger: ‘fopen(name, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 2461|   
# 2462|   	/* read afpfile line by line */
# 2463|-> 	while (fgets(buf, PATH_MAX, fp) != NULL) {
# 2464|   		/* ignore any comment lines */
# 2465|   		c = tmp;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
cdrkit-1.1.11/genisoimage/apple.c:2463:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(name, "r")’
cdrkit-1.1.11/genisoimage/apple.c:2453:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/apple.c:2457:19: branch_false: ...to here
cdrkit-1.1.11/genisoimage/apple.c:2457:19: acquire_memory: allocated here
cdrkit-1.1.11/genisoimage/apple.c:2457:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/apple.c:2460:27: branch_false: ...to here
cdrkit-1.1.11/genisoimage/apple.c:2463:16: danger: ‘fopen(name, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 2461|   
# 2462|   	/* read afpfile line by line */
# 2463|-> 	while (fgets(buf, PATH_MAX, fp) != NULL) {
# 2464|   		/* ignore any comment lines */
# 2465|   		c = tmp;

Error: COMPILER_WARNING (CWE-563): [#def13]
cdrkit-1.1.11/genisoimage/apple.c: scope_hint: In function ‘map_ext’
cdrkit-1.1.11/genisoimage/apple.c:2577:26: warning[-Wunused-variable]: unused variable ‘ret’
# 2577 |         const char      *ret;
#      |                          ^~~
# 2575|   	int	len;		/* filename length */
# 2576|   	afpmap	*amap;		/* mapping entry */
# 2577|-> 	const char	*ret;
# 2578|   
# 2579|   	/* we don't take fdflags from the map or magic file */

Error: CPPCHECK_WARNING (CWE-476): [#def14]
cdrkit-1.1.11/genisoimage/boot-hppa.c:80: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ptr
#   78|       hppa_cmdline = strdup(cmdline);
#   79|       ptr = hppa_cmdline;
#   80|->     while (*ptr)
#   81|       {
#   82|           if (',' == *ptr)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
cdrkit-1.1.11/genisoimage/boot-hppa.c:80:12: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ptr’
cdrkit-1.1.11/genisoimage/boot-hppa.c:78:20: acquire_memory: this call could return NULL
cdrkit-1.1.11/genisoimage/boot-hppa.c:80:12: danger: ‘ptr’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   78|       hppa_cmdline = strdup(cmdline);
#   79|       ptr = hppa_cmdline;
#   80|->     while (*ptr)
#   81|       {
#   82|           if (',' == *ptr)

Error: COMPILER_WARNING (CWE-563): [#def16]
cdrkit-1.1.11/genisoimage/boot-hppa.c: scope_hint: In function ‘boot_hppa_write’
cdrkit-1.1.11/genisoimage/boot-hppa.c:139:9: warning[-Wunused-variable]: unused variable ‘i’
#  139 |     int i = 0;
#      |         ^
#  137|       unsigned long extent = 0;
#  138|       unsigned char *boot_sector = (unsigned char *) alpha_hppa_boot_sector;
#  139|->     int i = 0;
#  140|   
#  141|       if (!boot_sector_initialized) {

Error: COMPILER_WARNING: [#def17]
cdrkit-1.1.11/genisoimage/boot-mips.c: scope_hint: In function ‘boot_mips_write’
cdrkit-1.1.11/genisoimage/boot-mips.c:313:9: warning[-Wstringop-truncation]: ‘strncpy’ specified bound depends on the length of the source argument
#  313 |         strncpy((char *)vh.vh_vd[i].vd_name, filename, MIN(VDNAMESIZE, strlen(filename)));
#      |         ^
cdrkit-1.1.11/include/dirdefs.h:80: included_from: Included from here.
cdrkit-1.1.11/genisoimage/genisoimage.h:48: included_from: Included from here.
cdrkit-1.1.11/genisoimage/boot-mips.c:191: included_from: Included from here.
cdrkit-1.1.11/genisoimage/boot-mips.c:313:72: note: length computed here
#  313 |         strncpy((char *)vh.vh_vd[i].vd_name, filename, MIN(VDNAMESIZE, strlen(filename)));
#      |                                                                        ^
#  311|           filename = file_base_name(boot_mips_filename[i]);
#  312|   
#  313|->         strncpy((char *)vh.vh_vd[i].vd_name, filename, MIN(VDNAMESIZE, strlen(filename)));
#  314|           write_be32(extent, (unsigned char *)&vh.vh_vd[i].vd_lbn);
#  315|           write_be32(length, (unsigned char *)&vh.vh_vd[i].vd_nbytes);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def18]
cdrkit-1.1.11/genisoimage/boot-mipsel.c:106:47: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
cdrkit-1.1.11/genisoimage/boot-mipsel.c:150:14: acquire_resource: opened here
cdrkit-1.1.11/genisoimage/boot-mipsel.c:151:8: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/boot-mipsel.c:154:13: branch_false: ...to here
cdrkit-1.1.11/genisoimage/boot-mipsel.c:155:8: branch_false: following ‘false’ branch (when ‘error == 1’)...
cdrkit-1.1.11/genisoimage/boot-mipsel.c:158:5: branch_false: ...to here
cdrkit-1.1.11/genisoimage/boot-mipsel.c:106:47: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  104|   static void swap_in_elf32_ehdr(Elf32_Ehdr *ehdr)
#  105|   {
#  106|->     ehdr->e_type = read_le16((unsigned char *)&ehdr->e_type);
#  107|       ehdr->e_machine = read_le16((unsigned char *)&ehdr->e_machine);
#  108|       ehdr->e_version = read_le32((unsigned char *)&ehdr->e_version);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
cdrkit-1.1.11/genisoimage/boot-mipsel.c:106:47: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
cdrkit-1.1.11/genisoimage/boot-mipsel.c:150:14: acquire_memory: allocated here
cdrkit-1.1.11/genisoimage/boot-mipsel.c:151:8: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/boot-mipsel.c:154:13: branch_false: ...to here
cdrkit-1.1.11/genisoimage/boot-mipsel.c:155:8: branch_false: following ‘false’ branch (when ‘error == 1’)...
cdrkit-1.1.11/genisoimage/boot-mipsel.c:158:5: branch_false: ...to here
cdrkit-1.1.11/genisoimage/boot-mipsel.c:106:47: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  104|   static void swap_in_elf32_ehdr(Elf32_Ehdr *ehdr)
#  105|   {
#  106|->     ehdr->e_type = read_le16((unsigned char *)&ehdr->e_type);
#  107|       ehdr->e_machine = read_le16((unsigned char *)&ehdr->e_machine);
#  108|       ehdr->e_version = read_le32((unsigned char *)&ehdr->e_version);

Error: COMPILER_WARNING (CWE-1164): [#def20]
cdrkit-1.1.11/genisoimage/boot-mipsel.c:121:13: warning[-Wunused-function]: ‘swap_in_elf32_phdr’ defined but not used
#  121 | static void swap_in_elf32_phdr(Elf32_Phdr *phdr)
#      |             ^~~~~~~~~~~~~~~~~~
#  119|   }
#  120|   
#  121|-> static void swap_in_elf32_phdr(Elf32_Phdr *phdr)
#  122|   {
#  123|       phdr->p_type = read_le32((unsigned char *)&phdr->p_type);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
cdrkit-1.1.11/genisoimage/boot-mipsel.c:155:8: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
cdrkit-1.1.11/genisoimage/boot-mipsel.c:150:14: acquire_resource: opened here
cdrkit-1.1.11/genisoimage/boot-mipsel.c:151:8: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/boot-mipsel.c:154:13: branch_false: ...to here
cdrkit-1.1.11/genisoimage/boot-mipsel.c:155:8: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#  153|       
#  154|       error = fread(&ehdr, sizeof(ehdr), 1, loader);
#  155|->     if (1 != error)
#  156|           return EIO;
#  157|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
cdrkit-1.1.11/genisoimage/boot-mipsel.c:155:8: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
cdrkit-1.1.11/genisoimage/boot-mipsel.c:150:14: acquire_memory: allocated here
cdrkit-1.1.11/genisoimage/boot-mipsel.c:151:8: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/boot-mipsel.c:154:13: branch_false: ...to here
cdrkit-1.1.11/genisoimage/boot-mipsel.c:155:8: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#  153|       
#  154|       error = fread(&ehdr, sizeof(ehdr), 1, loader);
#  155|->     if (1 != error)
#  156|           return EIO;
#  157|   

Error: CPPCHECK_WARNING (CWE-404): [#def23]
cdrkit-1.1.11/genisoimage/boot-mipsel.c:156: error[resourceLeak]: Resource leak: loader
#  154|       error = fread(&ehdr, sizeof(ehdr), 1, loader);
#  155|       if (1 != error)
#  156|->         return EIO;
#  157|   
#  158|       swap_in_elf32_ehdr(&ehdr);

Error: CPPCHECK_WARNING (CWE-404): [#def24]
cdrkit-1.1.11/genisoimage/boot-mipsel.c:171: error[resourceLeak]: Resource leak: loader
#  169|       {
#  170|           fprintf(stderr, "Sorry, %s is not a MIPS ELF32 little endian file", filename);        
#  171|->         return EINVAL;
#  172|       }
#  173|       if (ehdr.e_phnum != 1)

Error: CPPCHECK_WARNING (CWE-404): [#def25]
cdrkit-1.1.11/genisoimage/boot-mipsel.c:176: error[resourceLeak]: Resource leak: loader
#  174|       {
#  175|           fprintf(stderr, "Sorry, %s has more than one ELF segment", filename);
#  176|->         return EINVAL;
#  177|       }
#  178|       fseek(loader, ehdr.e_phoff, SEEK_SET);

Error: COMPILER_WARNING (CWE-563): [#def26]
cdrkit-1.1.11/genisoimage/boot.c: scope_hint: In function ‘make_sunx86_label’
cdrkit-1.1.11/genisoimage/boot.c:280:18: warning[-Wunused-but-set-variable]: variable ‘p’ set but not used
#  280 |         char    *p;
#      |                  ^
#  278|   	int	i;
#  279|   	int	partoff = 1;	/* The offset of the Solaris 0x82 partition */
#  280|-> 	char	*p;
#  281|   
#  282|   	/*

Error: GCC_ANALYZER_WARNING: [#def27]
cdrkit-1.1.11/genisoimage/boot.c:406:29: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘open(p, 0)’
cdrkit-1.1.11/genisoimage/boot.c:385:16: branch_true: following ‘true’ branch (when ‘i != 8’)...
cdrkit-1.1.11/genisoimage/boot.c:386:21: branch_true: ...to here
cdrkit-1.1.11/genisoimage/boot.c:391:21: branch_false: following ‘false’ branch (when the strings are non-equal)...
cdrkit-1.1.11/genisoimage/boot.c:393:20: branch_false: ...to here
cdrkit-1.1.11/genisoimage/boot.c:400:26: acquire_resource: opened here
cdrkit-1.1.11/genisoimage/boot.c:406:29: danger: ‘open(p, 0)’ could be invalid: unchecked value from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  404|   		for (n = 0; n < amt; n++) {
#  405|   			memset(buffer, 0, sizeof (buffer));
#  406|-> 			if (read(f, buffer, SECTOR_SIZE) < 0)
#  407|   				comerr("Read error on '%s'.\n", boot_files[i]);
#  408|   			jtwrite(buffer, SECTOR_SIZE, 1, 0, FALSE);

Error: GCC_ANALYZER_WARNING: [#def28]
cdrkit-1.1.11/genisoimage/boot.c:452:21: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘open(genboot_image, 0)’
cdrkit-1.1.11/genisoimage/boot.c:448:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/boot.c:449:26: branch_true: ...to here
cdrkit-1.1.11/genisoimage/boot.c:449:26: acquire_resource: opened here
cdrkit-1.1.11/genisoimage/boot.c:449:20: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/boot.c:450:25: branch_true: ...to here
cdrkit-1.1.11/genisoimage/boot.c:452:21: danger: ‘open(genboot_image, 0)’ could be invalid: unchecked value from [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  450|   			comerr("Cannot open '%s'.\n", genboot_image);
#  451|   
#  452|-> 		if (read(f, buffer, SECTOR_SIZE) < 0)
#  453|   			comerr("Read error on '%s'.\n", genboot_image);
#  454|   		close(f);

Error: GCC_ANALYZER_WARNING: [#def29]
cdrkit-1.1.11/genisoimage/boot.c:522:21: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘open(genboot_image, 0)’
cdrkit-1.1.11/genisoimage/boot.c:517:18: acquire_resource: opened here
cdrkit-1.1.11/genisoimage/boot.c:517:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/boot.c:518:17: branch_true: ...to here
cdrkit-1.1.11/genisoimage/boot.c:520:21: branch_true: following ‘true’ branch (when ‘i != 16’)...
cdrkit-1.1.11/genisoimage/boot.c:521:17: branch_true: ...to here
cdrkit-1.1.11/genisoimage/boot.c:522:21: danger: ‘open(genboot_image, 0)’ could be invalid: unchecked value from [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  520|   	for (i = 0; i < 16; i++) {
#  521|   		memset(buffer, 0, sizeof (buffer));
#  522|-> 		if (read(f, buffer, SECTOR_SIZE) < 0)
#  523|   			comerr("Read error on '%s'.\n", genboot_image);
#  524|   

Error: COMPILER_WARNING (CWE-563): [#def30]
cdrkit-1.1.11/genisoimage/checksum.c: scope_hint: In function ‘checksum_final’
cdrkit-1.1.11/genisoimage/checksum.c:381:11: warning[-Wunused-variable]: unused variable ‘thread_ret’
#  381 |     void *thread_ret;
#      |           ^~~~~~~~~~
#  379|       
#  380|   #ifdef THREADED_CHECKSUMS
#  381|->     void *thread_ret;
#  382|       /* Clean up the threads */
#  383|       c->threads_running = c->threads_desired;    

Error: COMPILER_WARNING (CWE-563): [#def31]
cdrkit-1.1.11/genisoimage/checksum.c: scope_hint: In function ‘parse_checksum_algo’
cdrkit-1.1.11/genisoimage/checksum.c:449:9: warning[-Wunused-variable]: unused variable ‘error’
#  449 |     int error = 0;
#      |         ^~~~~
#  447|   int parse_checksum_algo(char *arg, int *algo)
#  448|   {
#  449|->     int error = 0;
#  450|       int i = 0;
#  451|       char *start_ptr = arg;

Error: COMPILER_WARNING (CWE-563): [#def32]
cdrkit-1.1.11/genisoimage/diag/dump.c: scope_hint: In function ‘main’
cdrkit-1.1.11/genisoimage/diag/dump.c:371:24: warning[-Wunused-but-set-variable]: variable ‘ret’ set but not used
#  371 |                 do{int ret;ret=read(STDIN_FILENO, &c, 1);}while(0); /* FIXME: check return value */
#      |                        ^~~
#  369|   		if (file_addr < (off_t)0) file_addr = (off_t)0;
#  370|   		showblock(1);
#  371|-> 		do{int ret;ret=read(STDIN_FILENO, &c, 1);}while(0); /* FIXME: check return value */
#  372|   		if (c == 'a')
#  373|   			file_addr -= PAGE;

Error: COMPILER_WARNING (CWE-563): [#def33]
cdrkit-1.1.11/genisoimage/diag/dump.c:381:40: warning[-Wunused-but-set-variable]: variable ‘ret’ set but not used
#  381 |                                 do{int ret;ret=scanf("%llx", &ll);}while(0); /* FIXME: check return value */
#      |                                        ^~~
#  379|   			if (sizeof (file_addr) > sizeof (long)) {
#  380|   				Llong	ll;
#  381|-> 				do{int ret;ret=scanf("%llx", &ll);}while(0); /* FIXME: check return value */
#  382|   				file_addr = (off_t)ll;
#  383|   			} else {

Error: COMPILER_WARNING (CWE-563): [#def34]
cdrkit-1.1.11/genisoimage/diag/dump.c:385:40: warning[-Wunused-but-set-variable]: variable ‘ret’ set but not used
#  385 |                                 do{int ret;ret=scanf("%lx", &l);}while(0); /* FIXME: check return value */
#      |                                        ^~~
#  383|   			} else {
#  384|   				long	l;
#  385|-> 				do{int ret;ret=scanf("%lx", &l);}while(0); /* FIXME: check return value */
#  386|   				file_addr = (off_t)l;
#  387|   			}

Error: COMPILER_WARNING (CWE-563): [#def35]
cdrkit-1.1.11/genisoimage/diag/dump.c:395:34: warning[-Wunused-but-set-variable]: variable ‘ret’ set but not used
#  395 |                         do{char *ret;ret=fgets((char *)search, sizeof (search), stdin);}while(0); /* FIXME: check return value */
#      |                                  ^~~
#  393|   			crsr2(20, 1);
#  394|   			printf("Enter new search string:");
#  395|-> 			do{char *ret;ret=fgets((char *)search, sizeof (search), stdin);}while(0); /* FIXME: check return value */
#  396|   			while (search[strlen((char *)search)-1] == '\n')
#  397|   				search[strlen((char *)search)-1] = 0;

Error: COMPILER_WARNING (CWE-563): [#def36]
cdrkit-1.1.11/genisoimage/diag/isodebug.c:143:42: warning[-Wunused-but-set-variable]: variable ‘vp’ set but not used
#  143 |         struct iso9660_pr_voldesc       *vp;
#      |                                          ^~
#  141|   {
#  142|   static	struct iso9660_voldesc		vd;
#  143|-> 	struct iso9660_pr_voldesc	*vp;
#  144|   #ifndef	USE_SCG
#  145|   	struct stat			sb;

Error: COMPILER_WARNING (CWE-563): [#def37]
cdrkit-1.1.11/genisoimage/diag/isodebug.c: scope_hint: In function ‘isodinfo’
cdrkit-1.1.11/genisoimage/diag/isodebug.c:148:41: warning[-Wunused-but-set-variable]: variable ‘found’ set but not used
#  148 |         BOOL                            found = FALSE;
#      |                                         ^~~~~
#  146|   	mode_t				mode;
#  147|   #endif
#  148|-> 	BOOL				found = FALSE;
#  149|   	off_t				sec_off = 16L;
#  150|   

Error: COMPILER_WARNING (CWE-1164): [#def38]
cdrkit-1.1.11/genisoimage/diag/isodump.c: scope_hint: At top level
cdrkit-1.1.11/genisoimage/diag/isodump.c:138:17: warning[-Wunused-function]: ‘isonum_72’ declared ‘static’ but never defined
#  138 | static int      isonum_72(char * p);
#      |                 ^~~~~~~~~
#  136|   
#  137|   static int	isonum_731(char * p);
#  138|-> static int	isonum_72(char * p);
#  139|   static int	isonum_723(char * p);
#  140|   static int	isonum_733(unsigned char * p);

Error: COMPILER_WARNING (CWE-563): [#def39]
cdrkit-1.1.11/genisoimage/diag/isodump.c: scope_hint: In function ‘main’
cdrkit-1.1.11/genisoimage/diag/isodump.c:658:24: warning[-Wunused-but-set-variable]: variable ‘ret’ set but not used
#  658 |                 do{int ret;ret=read(STDIN_FILENO, &c, 1);}while(0); /* FIXME: check return value */
#      |                        ^~~
#  656|   			file_addr = (off_t)0;
#  657|   		showblock(1);
#  658|-> 		do{int ret;ret=read(STDIN_FILENO, &c, 1);}while(0); /* FIXME: check return value */
#  659|   		if (c == 'a')
#  660|   			file_addr -= blocksize;

Error: COMPILER_WARNING (CWE-563): [#def40]
cdrkit-1.1.11/genisoimage/diag/isodump.c:668:40: warning[-Wunused-but-set-variable]: variable ‘ret’ set but not used
#  668 |                                 do{int ret;ret=scanf("%llx", &ll);}while(0); /* FIXME: check return value */
#      |                                        ^~~
#  666|   			if (sizeof (file_addr) > sizeof (long)) {
#  667|   				Llong	ll;
#  668|-> 				do{int ret;ret=scanf("%llx", &ll);}while(0); /* FIXME: check return value */
#  669|   				file_addr = (off_t)ll;
#  670|   			} else {

Error: COMPILER_WARNING (CWE-563): [#def41]
cdrkit-1.1.11/genisoimage/diag/isodump.c:672:40: warning[-Wunused-but-set-variable]: variable ‘ret’ set but not used
#  672 |                                 do{int ret;ret=scanf("%lx", &l);}while(0); /* FIXME: check return value */
#      |                                        ^~~
#  670|   			} else {
#  671|   				long	l;
#  672|-> 				do{int ret;ret=scanf("%lx", &l);}while(0); /* FIXME: check return value */
#  673|   				file_addr = (off_t)l;
#  674|   			}

Error: COMPILER_WARNING (CWE-563): [#def42]
cdrkit-1.1.11/genisoimage/diag/isodump.c:682:34: warning[-Wunused-but-set-variable]: variable ‘ret’ set but not used
#  682 |                         do{char *ret;ret=fgets((char *)search, sizeof (search), stdin);}while(0); /* FIXME: check return value */
#      |                                  ^~~
#  680|   			crsr2(20, 1);
#  681|   			printf("Enter new search string:");
#  682|-> 			do{char *ret;ret=fgets((char *)search, sizeof (search), stdin);}while(0); /* FIXME: check return value */
#  683|   			while (search[strlen((char *)search)-1] == '\n')
#  684|   				search[strlen((char *)search)-1] = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def43]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:315: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  313|   	idx = 1;
#  314|   	while (offset < size) {
#  315|-> 		len    = buf[offset];
#  316|   		extent = isonum_731((char *)buf + offset + 2);
#  317|   		pindex  = isonum_721((char *)buf + offset + 6);

Error: CPPCHECK_WARNING (CWE-682): [#def44]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:316: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
#  314|   	while (offset < size) {
#  315|   		len    = buf[offset];
#  316|-> 		extent = isonum_731((char *)buf + offset + 2);
#  317|   		pindex  = isonum_721((char *)buf + offset + 6);
#  318|   		switch (ucs_level) {

Error: CPPCHECK_WARNING (CWE-682): [#def45]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:317: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
#  315|   		len    = buf[offset];
#  316|   		extent = isonum_731((char *)buf + offset + 2);
#  317|-> 		pindex  = isonum_721((char *)buf + offset + 6);
#  318|   		switch (ucs_level) {
#  319|   		case 3:

Error: COMPILER_WARNING (CWE-563): [#def46]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:360:13: warning[-Wunused-but-set-variable]: variable ‘extent’ set but not used
#  360 |         int extent;
#      |             ^~~~~~
#  358|   	int xlen;
#  359|   	int ncount;
#  360|-> 	int extent;
#  361|   	int cont_extent, cont_offset, cont_size;
#  362|   	int flag1, flag2;

Error: COMPILER_WARNING (CWE-563): [#def47]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:362:13: warning[-Wunused-but-set-variable]: variable ‘flag1’ set but not used
#  362 |         int flag1, flag2;
#      |             ^~~~~
#  360|   	int extent;
#  361|   	int cont_extent, cont_offset, cont_size;
#  362|-> 	int flag1, flag2;
#  363|   	unsigned char *pnts;
#  364|   	char symlinkname[1024];

Error: COMPILER_WARNING (CWE-563): [#def48]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c: scope_hint: In function ‘parse_rr’
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:425:33: warning[-Wunused-but-set-variable]: variable ‘cflag’ set but not used
#  425 |                         int     cflag;
#      |                                 ^~~~~
#  423|   
#  424|   		if (strncmp((char *)pnt, "SL", 2) == 0) {		/* Symlink */
#  425|-> 			int	cflag;
#  426|   
#  427|   			cflag = pnt[4];

Error: CPPCHECK_WARNING (CWE-457): [#def49]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:455: error[uninitvar]: Uninitialized variable: goof
#  453|   				default:
#  454|   					printf("Reserved bit setting in symlink");
#  455|-> 					goof++;
#  456|   					break;
#  457|   				}

Error: COMPILER_WARNING (CWE-563): [#def50]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c: scope_hint: In function ‘extract_file’
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:654:24: warning[-Wunused-but-set-variable]: variable ‘ret’ set but not used
#  654 |                 do{int ret;ret=write(STDOUT_FILENO, buff, tlen);}while(0); /* FIXME: check return value */
#      |                        ^~~
#  652|   		len -= tlen;
#  653|   		extent++;
#  654|-> 		do{int ret;ret=write(STDOUT_FILENO, buff, tlen);}while(0); /* FIXME: check return value */
#  655|   	}
#  656|   }

Error: CPPCHECK_WARNING (CWE-119): [#def51]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:739: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: idr->date
#  737|   				}
#  738|   			}
#  739|-> 			memcpy(date_buf, idr->date, 9);
#  740|   			if (use_rock)
#  741|   				dump_rr(idr);

Error: CPPCHECK_WARNING (CWE-476): [#def52]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:757: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: td
#  755|   					todo_idr = td = (struct todo *) malloc(sizeof (*td));
#  756|   				}
#  757|-> 				td->next = NULL;
#  758|   				td->extent = isonum_733((unsigned char *)idr->extent);
#  759|   				td->length = isonum_733((unsigned char *)idr->size);

Error: CPPCHECK_WARNING (CWE-476): [#def53]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:758: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: td
#  756|   				}
#  757|   				td->next = NULL;
#  758|-> 				td->extent = isonum_733((unsigned char *)idr->extent);
#  759|   				td->length = isonum_733((unsigned char *)idr->size);
#  760|   				td->name = (char *) malloc(strlen(rootname)

Error: CPPCHECK_WARNING (CWE-476): [#def54]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:759: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: td
#  757|   				td->next = NULL;
#  758|   				td->extent = isonum_733((unsigned char *)idr->extent);
#  759|-> 				td->length = isonum_733((unsigned char *)idr->size);
#  760|   				td->name = (char *) malloc(strlen(rootname)
#  761|   								+ strlen(name_buf) + 2);

Error: CPPCHECK_WARNING (CWE-476): [#def55]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:760: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: td
#  758|   				td->extent = isonum_733((unsigned char *)idr->extent);
#  759|   				td->length = isonum_733((unsigned char *)idr->size);
#  760|-> 				td->name = (char *) malloc(strlen(rootname)
#  761|   								+ strlen(name_buf) + 2);
#  762|   				strcpy(td->name, rootname);

Error: CPPCHECK_WARNING (CWE-476): [#def56]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:762: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: td
#  760|   				td->name = (char *) malloc(strlen(rootname)
#  761|   								+ strlen(name_buf) + 2);
#  762|-> 				strcpy(td->name, rootname);
#  763|   				strcat(td->name, name_buf);
#  764|   				strcat(td->name, "/");

Error: CPPCHECK_WARNING (CWE-476): [#def57]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:763: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: td
#  761|   								+ strlen(name_buf) + 2);
#  762|   				strcpy(td->name, rootname);
#  763|-> 				strcat(td->name, name_buf);
#  764|   				strcat(td->name, "/");
#  765|   			} else {

Error: CPPCHECK_WARNING (CWE-476): [#def58]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:764: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: td
#  762|   				strcpy(td->name, rootname);
#  763|   				strcat(td->name, name_buf);
#  764|-> 				strcat(td->name, "/");
#  765|   			} else {
#  766|   				strcpy(testname, rootname);

Error: COMPILER_WARNING (CWE-483): [#def59]
cdrkit-1.1.11/genisoimage/diag/isoinfo.c: scope_hint: In function ‘main’
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:1036:33: warning[-Wmisleading-indentation]: this ‘if’ clause does not guard...
# 1036 |                                 if (debug && (Uchar) jpd.type[0] == ISO_VD_SUPPLEMENTARY)
#      |                                 ^~
cdrkit-1.1.11/genisoimage/diag/isoinfo.c:1045:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
# 1045 |                                         if (jpd.escape_sequences[0] == '%' &&
#      |                                         ^~
# 1034|   			while ((Uchar)jpd.type[0] != ISO_VD_END) {
# 1035|   
# 1036|-> 				if (debug && (Uchar) jpd.type[0] == ISO_VD_SUPPLEMENTARY)
# 1037|   					fprintf(stderr, "Joliet escape sequence 0: '%c' 1: '%c' 2: '%c' 3: '%c'\n",
# 1038|   						jpd.escape_sequences[0],

Error: COMPILER_WARNING (CWE-1164): [#def60]
cdrkit-1.1.11/genisoimage/diag/isovfy.c: scope_hint: At top level
cdrkit-1.1.11/genisoimage/diag/isovfy.c:579:1: warning[-Wunused-function]: ‘check_path_tables’ defined but not used
#  579 | check_path_tables(int typel_extent, int typem_extent, int path_table_size)
#      | ^~~~~~~~~~~~~~~~~
#  577|   
#  578|   static void
#  579|-> check_path_tables(int typel_extent, int typem_extent, int path_table_size)
#  580|   {
#  581|   	int	count;

Error: COMPILER_WARNING (CWE-563): [#def61]
cdrkit-1.1.11/genisoimage/diag/isovfy.c: scope_hint: In function ‘check_path_tables’
cdrkit-1.1.11/genisoimage/diag/isovfy.c:598:16: warning[-Wunused-but-set-variable]: variable ‘ret’ set but not used
#  598 |         do{int ret;ret=read(fileno(infile), typem, path_table_size);}while(0); /* FIXME: check return value */
#      |                ^~~
#  596|   	typem = (char *) malloc(path_table_size);
#  597|   	lseek(fileno(infile), (off_t)((off_t)typem_extent) * blocksize, SEEK_SET);
#  598|-> 	do{int ret;ret=read(fileno(infile), typem, path_table_size);}while(0); /* FIXME: check return value */
#  599|   
#  600|   	j = path_table_size;

Error: CPPCHECK_WARNING (CWE-682): [#def62]
cdrkit-1.1.11/genisoimage/diag/isovfy.c:609: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  607|   		char	name[32];
#  608|   
#  609|-> 		namelen = *pnt++; pnt++;
#  610|   		extent = isonum_731(pnt);
#  611|   		pnt += 4;

Error: CPPCHECK_WARNING (CWE-476): [#def63]
cdrkit-1.1.11/genisoimage/diag/isovfy.c:609: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pnt++
#  607|   		char	name[32];
#  608|   
#  609|-> 		namelen = *pnt++; pnt++;
#  610|   		extent = isonum_731(pnt);
#  611|   		pnt += 4;

Error: COMPILER_WARNING (CWE-563): [#def64]
cdrkit-1.1.11/genisoimage/diag/isovfy.c:683:17: warning[-Wunused-but-set-variable]: variable ‘typel_extent’ set but not used
#  683 |         int     typel_extent;
#      |                 ^~~~~~~~~~~~
#  681|   	struct iso_primary_descriptor	ipd;
#  682|   	struct iso_directory_record	*idr;
#  683|-> 	int	typel_extent;
#  684|   	int	typem_extent;
#  685|   	int	path_table_size;

Error: COMPILER_WARNING (CWE-563): [#def65]
cdrkit-1.1.11/genisoimage/diag/isovfy.c:684:17: warning[-Wunused-but-set-variable]: variable ‘typem_extent’ set but not used
#  684 |         int     typem_extent;
#      |                 ^~~~~~~~~~~~
#  682|   	struct iso_directory_record	*idr;
#  683|   	int	typel_extent;
#  684|-> 	int	typem_extent;
#  685|   	int	path_table_size;
#  686|   

Error: COMPILER_WARNING (CWE-563): [#def66]
cdrkit-1.1.11/genisoimage/diag/isovfy.c: scope_hint: In function ‘main’
cdrkit-1.1.11/genisoimage/diag/isovfy.c:685:17: warning[-Wunused-but-set-variable]: variable ‘path_table_size’ set but not used
#  685 |         int     path_table_size;
#      |                 ^~~~~~~~~~~~~~~
#  683|   	int	typel_extent;
#  684|   	int	typem_extent;
#  685|-> 	int	path_table_size;
#  686|   
#  687|   	save_args(argc, argv);

Error: COMPILER_WARNING: [#def67]
cdrkit-1.1.11/genisoimage/dvd_file.c: scope_hint: In function ‘DVDGetFileSet’
cdrkit-1.1.11/genisoimage/dvd_file.c:204:36: warning[-Wformat-truncation=]: ‘/VIDEO_TS/VIDEO_TS.IFO’ directive output may be truncated writing 22 bytes into a region of size between 1 and 4097
#  204 |                                 "%s/VIDEO_TS/VIDEO_TS.IFO", mountpoint);
#      |                                    ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 23 and 4119 bytes into a destination of size 4097
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  202|   
#  203|   	snprintf(temppoint, sizeof (temppoint),
#  204|-> 				"%s/VIDEO_TS/VIDEO_TS.IFO", mountpoint);
#  205|   
#  206|   

Error: COMPILER_WARNING: [#def68]
cdrkit-1.1.11/genisoimage/dvd_file.c: scope_hint: In function ‘DVDGetFileSet’
cdrkit-1.1.11/genisoimage/dvd_file.c:324:36: warning[-Wformat-truncation=]: ‘/VIDEO_TS/VIDEO_TS.VOB’ directive output may be truncated writing 22 bytes into a region of size between 1 and 4097
#  324 |                                 "%s/VIDEO_TS/VIDEO_TS.VOB", mountpoint);
#      |                                    ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 23 and 4119 bytes into a destination of size 4097
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  322|   
#  323|   		snprintf(temppoint, sizeof (temppoint),
#  324|-> 				"%s/VIDEO_TS/VIDEO_TS.VOB", mountpoint);
#  325|   		if (stat(temppoint, &fileinfo) < 0) {
#  326|   #ifdef	USE_LIBSCHILY

Error: COMPILER_WARNING: [#def69]
cdrkit-1.1.11/genisoimage/dvd_file.c: scope_hint: In function ‘DVDGetFileSet’
cdrkit-1.1.11/genisoimage/dvd_file.c:361:36: warning[-Wformat-truncation=]: ‘/VIDEO_TS/VIDEO_TS.IFO’ directive output may be truncated writing 22 bytes into a region of size between 1 and 4097
#  361 |                                 "%s/VIDEO_TS/VIDEO_TS.IFO", mountpoint);
#      |                                    ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 23 and 4119 bytes into a destination of size 4097
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  359|   	/* Never trust the BUP file - use a copy of the IFO */
#  360|   	snprintf(temppoint, sizeof (temppoint),
#  361|-> 				"%s/VIDEO_TS/VIDEO_TS.IFO", mountpoint);
#  362|   
#  363|   	if (stat(temppoint, &fileinfo) < 0) {

Error: COMPILER_WARNING: [#def70]
cdrkit-1.1.11/genisoimage/dvd_file.c: scope_hint: In function ‘DVDGetFileSet’
cdrkit-1.1.11/genisoimage/dvd_file.c:406:36: warning[-Wformat-truncation=]: ‘/VIDEO_TS/VTS_’ directive output may be truncated writing 14 bytes into a region of size between 1 and 4097
#  406 |                                 "%s/VIDEO_TS/VTS_%02i_0.IFO",
#      |                                    ^~~~~~~~~~~~~~
cdrkit-1.1.11/genisoimage/dvd_file.c:406:33: note: directive argument in the range [1, 65535]
#  406 |                                 "%s/VIDEO_TS/VTS_%02i_0.IFO",
#      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 23 and 4122 bytes into a destination of size 4097
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  404|   
#  405|   			snprintf(temppoint, sizeof (temppoint),
#  406|-> 				"%s/VIDEO_TS/VTS_%02i_0.IFO",
#  407|   				mountpoint, counter + 1);
#  408|   

Error: COMPILER_WARNING: [#def71]
cdrkit-1.1.11/genisoimage/dvd_file.c: scope_hint: In function ‘DVDGetFileSet’
cdrkit-1.1.11/genisoimage/dvd_file.c:579:44: warning[-Wformat-truncation=]: ‘/VIDEO_TS/VTS_’ directive output may be truncated writing 14 bytes into a region of size between 1 and 4097
#  579 |                                         "%s/VIDEO_TS/VTS_%02i_0.VOB", mountpoint, counter + 1);
#      |                                            ^~~~~~~~~~~~~~
cdrkit-1.1.11/genisoimage/dvd_file.c:579:41: note: directive argument in the range [1, 65535]
#  579 |                                         "%s/VIDEO_TS/VTS_%02i_0.VOB", mountpoint, counter + 1);
#      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 23 and 4122 bytes into a destination of size 4097
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  577|   
#  578|   				snprintf(temppoint, sizeof (temppoint),
#  579|-> 					"%s/VIDEO_TS/VTS_%02i_0.VOB", mountpoint, counter + 1);
#  580|   
#  581|   				if (stat(temppoint, &fileinfo)  < 0) {

Error: COMPILER_WARNING: [#def72]
cdrkit-1.1.11/genisoimage/dvd_file.c: scope_hint: In function ‘DVDGetFileSet’
cdrkit-1.1.11/genisoimage/dvd_file.c:626:52: warning[-Wformat-truncation=]: ‘/VIDEO_TS/VTS_’ directive output may be truncated writing 14 bytes into a region of size between 1 and 4097
#  626 |                                                 "%s/VIDEO_TS/VTS_%02i_%i.VOB",
#      |                                                    ^~~~~~~~~~~~~~
cdrkit-1.1.11/genisoimage/dvd_file.c:626:49: note: directive argument in the range [1, 65535]
#  626 |                                                 "%s/VIDEO_TS/VTS_%02i_%i.VOB",
#      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cdrkit-1.1.11/genisoimage/dvd_file.c:626:49: note: directive argument in the range [1, 9]
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 23 and 4122 bytes into a destination of size 4097
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  624|   				for (i = 0; i < 9; ++i) {
#  625|   					snprintf(temppoint, sizeof (temppoint),
#  626|-> 						"%s/VIDEO_TS/VTS_%02i_%i.VOB",
#  627|   						mountpoint, counter + 1, i + 1);
#  628|   					if (stat(temppoint, &fileinfo) < 0) {

Error: COMPILER_WARNING: [#def73]
cdrkit-1.1.11/genisoimage/dvd_file.c: scope_hint: In function ‘DVDGetFileSet’
cdrkit-1.1.11/genisoimage/dvd_file.c:658:36: warning[-Wformat-truncation=]: ‘/VIDEO_TS/VTS_’ directive output may be truncated writing 14 bytes into a region of size between 1 and 4097
#  658 |                                 "%s/VIDEO_TS/VTS_%02i_0.IFO",
#      |                                    ^~~~~~~~~~~~~~
cdrkit-1.1.11/genisoimage/dvd_file.c:658:33: note: directive argument in the range [1, 65535]
#  658 |                                 "%s/VIDEO_TS/VTS_%02i_0.IFO",
#      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 23 and 4122 bytes into a destination of size 4097
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  656|   			/* Never trust the BUP use a copy of the IFO */
#  657|   			snprintf(temppoint, sizeof (temppoint),
#  658|-> 				"%s/VIDEO_TS/VTS_%02i_0.IFO",
#  659|   				mountpoint, counter + 1);
#  660|   

Error: CPPCHECK_WARNING (CWE-476): [#def74]
cdrkit-1.1.11/genisoimage/eltorito.c:147: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p1
#  145|   
#  146|   	/* get dirname (p1) and basename (p2) of boot.cat */
#  147|-> 	if ((p2 = strrchr(p1, '/')) != NULL) {
#  148|   		*p2 = '\0';
#  149|   		p2++;

Error: CPPCHECK_WARNING (CWE-476): [#def75]
cdrkit-1.1.11/genisoimage/eltorito.c:203: warning[nullPointer]: Possible null pointer dereference: this_dir
#  201|   		e_malloc(sizeof (struct directory_entry));
#  202|   	memset(s_entry, 0, sizeof (struct directory_entry));
#  203|-> 	s_entry->next = this_dir->contents;
#  204|   	this_dir->contents = s_entry;
#  205|   

Error: CPPCHECK_WARNING (CWE-476): [#def76]
cdrkit-1.1.11/genisoimage/eltorito.c:204: warning[nullPointer]: Possible null pointer dereference: this_dir
#  202|   	memset(s_entry, 0, sizeof (struct directory_entry));
#  203|   	s_entry->next = this_dir->contents;
#  204|-> 	this_dir->contents = s_entry;
#  205|   
#  206|   #ifdef SORTING

Error: CPPCHECK_WARNING (CWE-476): [#def77]
cdrkit-1.1.11/genisoimage/eltorito.c:208: warning[nullPointer]: Possible null pointer dereference: this_dir
#  206|   #ifdef SORTING
#  207|   	/* inherit any sort weight from parent directory */
#  208|-> 	s_entry->sort = this_dir->sort;
#  209|   	s_entry->sort += 2;
#  210|   

Error: COMPILER_WARNING (CWE-563): [#def78]
cdrkit-1.1.11/genisoimage/eltorito.c: scope_hint: In function ‘get_torito_desc’
cdrkit-1.1.11/genisoimage/eltorito.c:286:45: warning[-Wunused-variable]: unused variable ‘section_header’
#  286 |         struct eltorito_sectionheader_entry section_header;
#      |                                             ^~~~~~~~~~~~~~
#  284|   	int			offset;
#  285|   	struct eltorito_defaultboot_entry boot_desc_record;
#  286|-> 	struct eltorito_sectionheader_entry section_header;
#  287|   
#  288|   	memset(boot_desc, 0, sizeof (*boot_desc));

Error: CPPCHECK_WARNING (CWE-119): [#def79]
cdrkit-1.1.11/genisoimage/eltorito.c:290: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: boot_desc->id
#  288|   	memset(boot_desc, 0, sizeof (*boot_desc));
#  289|   	boot_desc->type[0] = 0;
#  290|-> 	memcpy(boot_desc->id, ISO_STANDARD_ID, sizeof (ISO_STANDARD_ID));
#  291|   	boot_desc->version[0] = 1;
#  292|   

Error: GCC_ANALYZER_WARNING: [#def80]
cdrkit-1.1.11/genisoimage/eltorito.c:483:21: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘open(*<unknown>.whole_name, 0)’
cdrkit-1.1.11/genisoimage/eltorito.c:455:9: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/eltorito.c:458:13: branch_true: ...to here
cdrkit-1.1.11/genisoimage/eltorito.c:463:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/eltorito.c:465:17: branch_true: ...to here
cdrkit-1.1.11/genisoimage/eltorito.c:470:27: acquire_resource: opened here
cdrkit-1.1.11/genisoimage/eltorito.c:471:20: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/eltorito.c:473:25: branch_true: ...to here
cdrkit-1.1.11/genisoimage/eltorito.c:483:21: danger: ‘open(*<unknown>.whole_name, 0)’ could be invalid: unchecked value from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  481|   #endif
#  482|   		}
#  483|-> 		if (read(bootmbr, &disk_mbr, sizeof (disk_mbr)) !=
#  484|   							sizeof (disk_mbr)) {
#  485|   #ifdef	USE_LIBSCHILY

Error: GCC_ANALYZER_WARNING: [#def81]
cdrkit-1.1.11/genisoimage/eltorito.c:666:31: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘open(*<unknown>.whole_name, 2)’
cdrkit-1.1.11/genisoimage/eltorito.c:642:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/eltorito.c:649:34: branch_true: ...to here
cdrkit-1.1.11/genisoimage/eltorito.c:649:29: acquire_resource: opened here
cdrkit-1.1.11/genisoimage/eltorito.c:650:20: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/eltorito.c:652:25: branch_true: ...to here
cdrkit-1.1.11/genisoimage/eltorito.c:666:31: danger: ‘open(*<unknown>.whole_name, 2)’ could be invalid: unchecked value from [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  664|   		total_len = 0;
#  665|   		bi_checksum = 0;
#  666|-> 		while ((len = read(bootimage, csum_buffer, SECTOR_SIZE)) > 0) {
#  667|   			if (total_len & 3) {
#  668|   #ifdef	USE_LIBSCHILY

Error: COMPILER_WARNING (CWE-563): [#def82]
cdrkit-1.1.11/genisoimage/eltorito.c: scope_hint: In function ‘fill_boot_desc’
cdrkit-1.1.11/genisoimage/eltorito.c:709:24: warning[-Wunused-but-set-variable]: variable ‘ret’ set but not used
#  709 |                 do{int ret;ret=write(bootimage, &bi_table, sizeof (bi_table));}while(0); /* FIXME: check return value */
#      |                        ^~~
#  707|   		set_731(bi_table.bi_csum, bi_checksum);
#  708|   
#  709|-> 		do{int ret;ret=write(bootimage, &bi_table, sizeof (bi_table));}while(0); /* FIXME: check return value */
#  710|   		close(bootimage);
#  711|   	}

Error: CPPCHECK_WARNING (CWE-768): [#def83]
cdrkit-1.1.11/genisoimage/genisoimage.c:929: error[unknownEvaluationOrder]: Expression '*p++=toupper((unsigned char)*p)' depends on order of evaluation of side effects
#  927|   		name = p;
#  928|   		while (*p && (isalpha((unsigned char) *p) || *p == '_'))
#  929|-> 			*p++ = toupper((unsigned char) *p);
#  930|   
#  931|   		if (name == p) {

Error: COMPILER_WARNING (CWE-483): [#def84]
cdrkit-1.1.11/genisoimage/genisoimage.c: scope_hint: In function ‘main’
cdrkit-1.1.11/genisoimage/genisoimage.c:2546:5: warning[-Wmisleading-indentation]: this ‘if’ clause does not guard...
# 2546 |     if(follow_links && verbose>0)
#      |     ^~
cdrkit-1.1.11/genisoimage/genisoimage.c:2550:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
# 2550 |         init_unls();            /* Initialize UNICODE tables */
#      |         ^~~~~~~~~
# 2544|   		fprintf(stderr, "         will not be transparently decompressed.\n");
# 2545|   	}
# 2546|->     if(follow_links && verbose>0)
# 2547|           fprintf(stderr,
# 2548|                   "Warning: -follow-links does not always work correctly; be careful.\n");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def85]
cdrkit-1.1.11/genisoimage/genisoimage.c:2573:39: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘t’
cdrkit-1.1.11/genisoimage/genisoimage.c:1247:5: enter_function: entry to ‘main’
cdrkit-1.1.11/genisoimage/genisoimage.c:1287:5: branch_false: following ‘false’ branch (when ‘mkisofs_call’ is NULL)...
cdrkit-1.1.11/genisoimage/genisoimage.c:1294:9: branch_false: ...to here
cdrkit-1.1.11/genisoimage/genisoimage.c:1296:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
cdrkit-1.1.11/genisoimage/genisoimage.c:1303:9: branch_false: ...to here
cdrkit-1.1.11/genisoimage/genisoimage.c:1303:9: call_function: calling ‘read_rcfile’ from ‘main’
cdrkit-1.1.11/genisoimage/genisoimage.c:1303:9: return_function: returning to ‘main’ from ‘read_rcfile’
cdrkit-1.1.11/genisoimage/genisoimage.c:1325:29: branch_true: following ‘true’ branch (when ‘i != 168’)...
cdrkit-1.1.11/genisoimage/genisoimage.c:1326:29: branch_true: ...to here
cdrkit-1.1.11/genisoimage/genisoimage.c:1326:28: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/genisoimage.c:1342:29: branch_false: ...to here
cdrkit-1.1.11/genisoimage/genisoimage.c:1342:28: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/genisoimage.c:1343:33: branch_true: ...to here
cdrkit-1.1.11/genisoimage/genisoimage.c:1325:29: branch_false: following ‘false’ branch (when ‘i == 168’)...
cdrkit-1.1.11/genisoimage/genisoimage.c:1347:17: branch_false: ...to here
cdrkit-1.1.11/genisoimage/genisoimage.c:2567:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/genisoimage.c:2570:11: branch_true: following ‘true’ branch (when ‘charset’ is non-NULL)...
cdrkit-1.1.11/genisoimage/genisoimage.c:2572:35: branch_true: ...to here
cdrkit-1.1.11/genisoimage/genisoimage.c:2572:35: acquire_memory: this call could return NULL
cdrkit-1.1.11/genisoimage/genisoimage.c:2573:39: danger: ‘t’ could be NULL: unchecked value from [(45)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/44)
# 2571|    			char *t;
# 2572|    			charset = strdup(charset);
# 2573|->  			for(t=charset;*t!='\0';t++)
# 2574|    				*t=tolower(*t);
# 2575|    		}

Error: GCC_ANALYZER_WARNING (CWE-688): [#def86]
cdrkit-1.1.11/genisoimage/genisoimage.c:2577:20: warning[-Wanalyzer-null-argument]: use of NULL ‘charset’ where non-null expected
cdrkit-1.1.11/genisoimage/genisoimage.c:1247:5: enter_function: entry to ‘main’
cdrkit-1.1.11/genisoimage/genisoimage.c:1287:5: branch_false: following ‘false’ branch (when ‘mkisofs_call’ is NULL)...
cdrkit-1.1.11/genisoimage/genisoimage.c:1294:9: branch_false: ...to here
cdrkit-1.1.11/genisoimage/genisoimage.c:1296:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
cdrkit-1.1.11/genisoimage/genisoimage.c:1303:9: branch_false: ...to here
cdrkit-1.1.11/genisoimage/genisoimage.c:1303:9: call_function: calling ‘read_rcfile’ from ‘main’
cdrkit-1.1.11/genisoimage/genisoimage.c:1303:9: return_function: returning to ‘main’ from ‘read_rcfile’
cdrkit-1.1.11/genisoimage/genisoimage.c:1305:9: release_memory: ‘mkisofs_call’ is NULL
cdrkit-1.1.11/genisoimage/genisoimage.c:1325:29: branch_true: following ‘true’ branch (when ‘i != 168’)...
cdrkit-1.1.11/genisoimage/genisoimage.c:1326:29: branch_true: ...to here
cdrkit-1.1.11/genisoimage/genisoimage.c:1326:28: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/genisoimage.c:1342:29: branch_false: ...to here
cdrkit-1.1.11/genisoimage/genisoimage.c:1342:28: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/genisoimage.c:1343:33: branch_true: ...to here
cdrkit-1.1.11/genisoimage/genisoimage.c:1325:29: branch_false: following ‘false’ branch (when ‘i == 168’)...
cdrkit-1.1.11/genisoimage/genisoimage.c:1347:17: branch_false: ...to here
cdrkit-1.1.11/genisoimage/genisoimage.c:2567:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/genisoimage.c:2570:11: branch_false: following ‘false’ branch (when ‘charset’ is NULL)...
cdrkit-1.1.11/genisoimage/genisoimage.c:2577:20: branch_false: ...to here
cdrkit-1.1.11/genisoimage/genisoimage.c:2577:20: danger: argument 1 (‘charset’) NULL where non-null expected
# 2575|    		}
# 2576|   
# 2577|-> 		if(strcmp(charset, "ansi_x3.4-1968") != 0)
# 2578|   			icharset = charset;
# 2579|   

Error: COMPILER_WARNING (CWE-563): [#def87]
cdrkit-1.1.11/genisoimage/ifo_read.c: scope_hint: In function ‘ifoOpen’
cdrkit-1.1.11/genisoimage/ifo_read.c:460:15: warning[-Wunused-but-set-variable]: variable ‘offset’ set but not used
#  460 |         off_t offset;
#      |               ^~~~~~
#  458|   	/* File handles and offset */
#  459|   	int file;
#  460|-> 	off_t offset;
#  461|   	char full_path[ PATH_MAX + 1 ];
#  462|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def88]
cdrkit-1.1.11/genisoimage/ifo_read.c:494:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&full_path, 0)’
cdrkit-1.1.11/genisoimage/ifo_read.c:480:21: acquire_resource: opened here
cdrkit-1.1.11/genisoimage/ifo_read.c:480:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/ifo_read.c:494:13: branch_false: ...to here
cdrkit-1.1.11/genisoimage/ifo_read.c:494:12: danger: ‘open(&full_path, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  492|   	/* Determine if we have a VMGI or VTSI */
#  493|   
#  494|-> 	if (read(file, identifier, sizeof (identifier)) != sizeof (identifier)) {
#  495|   #ifdef	USE_LIBSCHILY
#  496|   		errmsg(MSGEREAD);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def89]
cdrkit-1.1.11/genisoimage/ifo_read.c:553:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*ifofile.vtsi_mat’
cdrkit-1.1.11/genisoimage/ifo_read.c:548:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/ifo_read.c:549:22: branch_true: ...to here
cdrkit-1.1.11/genisoimage/ifo_read.c:549:17: release_memory: first ‘free’ here
cdrkit-1.1.11/genisoimage/ifo_read.c:552:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/ifo_read.c:553:17: branch_true: ...to here
cdrkit-1.1.11/genisoimage/ifo_read.c:553:17: danger: second ‘free’ here; first ‘free’ was at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  551|   
#  552|   	if (ifofile->vtsi_mat) {
#  553|-> 		free(ifofile->vtsi_mat);
#  554|   	}
#  555|   

Error: GCC_ANALYZER_WARNING (CWE-415): [#def90]
cdrkit-1.1.11/genisoimage/ifo_read.c:553:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘<unknown>’
cdrkit-1.1.11/genisoimage/ifo_read.c:453:1: enter_function: entry to ‘ifoOpen’
cdrkit-1.1.11/genisoimage/ifo_read.c:480:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/ifo_read.c:494:13: branch_false: ...to here
cdrkit-1.1.11/genisoimage/ifo_read.c:494:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/ifo_read.c:503:14: branch_false: ...to here
cdrkit-1.1.11/genisoimage/ifo_read.c:503:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/ifo_read.c:504:27: call_function: calling ‘ifoReadVGMI’ from ‘ifoOpen’
#  551|   
#  552|   	if (ifofile->vtsi_mat) {
#  553|-> 		free(ifofile->vtsi_mat);
#  554|   	}
#  555|   

Error: CPPCHECK_WARNING (CWE-457): [#def91]
cdrkit-1.1.11/genisoimage/joliet.c:246: warning[uninitvar]: Uninitialized variable: buffer
#  244|   	if (source == NULL) {
#  245|   		tmpbuf = (Uchar *) e_malloc(size+1);
#  246|-> 		memcpy(tmpbuf, buffer, size);
#  247|   		tmpbuf[size] = 0;
#  248|   	} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def92]
cdrkit-1.1.11/genisoimage/joliet.c:865:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘s_entry1’
cdrkit-1.1.11/genisoimage/joliet.c:1416:1: enter_function: entry to ‘jdirtree_write’
cdrkit-1.1.11/genisoimage/joliet.c:1418:9: call_function: calling ‘generate_joliet_directories’ from ‘jdirtree_write’
#  863|   		 * the next sector
#  864|   		 */
#  865|-> 		new_reclen = s_entry1->jreclen;
#  866|   		if ((dir_index & (SECTOR_SIZE - 1)) + new_reclen >= SECTOR_SIZE) {
#  867|   			dir_index = ISO_ROUND_UP(dir_index);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def93]
cdrkit-1.1.11/genisoimage/joliet.c:911:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘finddir’
cdrkit-1.1.11/genisoimage/joliet.c:1416:1: enter_function: entry to ‘jdirtree_write’
cdrkit-1.1.11/genisoimage/joliet.c:1418:9: call_function: calling ‘generate_joliet_directories’ from ‘jdirtree_write’
#  909|   				}
#  910|   				while (1 == 1) {
#  911|-> 					if (finddir->self == s_entry1)
#  912|   						break;
#  913|   					finddir = finddir->next;

Error: COMPILER_WARNING (CWE-563): [#def94]
cdrkit-1.1.11/genisoimage/jte.c: scope_hint: In function ‘check_exclude_by_name’
cdrkit-1.1.11/genisoimage/jte.c:199:9: warning[-Wunused-variable]: unused variable ‘i’
#  199 |     int i = 0;
#      |         ^
#  197|       struct path_match *ptr = exclude_list;
#  198|       regmatch_t pmatch[1];
#  199|->     int i = 0;
#  200|   
#  201|       while (ptr)

Error: COMPILER_WARNING (CWE-563): [#def95]
cdrkit-1.1.11/genisoimage/jte.c: scope_hint: In function ‘check_md5_file_match’
cdrkit-1.1.11/genisoimage/jte.c:242:9: warning[-Wunused-variable]: unused variable ‘i’
#  242 |     int i = 0;
#      |         ^
#  240|       struct path_match *ptr = include_list;
#  241|       regmatch_t pmatch[1];
#  242|->     int i = 0;
#  243|   
#  244|       while (ptr)

Error: COMPILER_WARNING (CWE-563): [#def96]
cdrkit-1.1.11/genisoimage/jte.c: scope_hint: In function ‘jte_add_mapping’
cdrkit-1.1.11/genisoimage/jte.c:342:9: warning[-Wunused-variable]: unused variable ‘error’
#  342 |     int error = 0;
#      |         ^~~~~
#  340|   extern int jte_add_mapping(char *arg)
#  341|   {
#  342|->     int error = 0;
#  343|       struct path_mapping *new = NULL;
#  344|       struct path_mapping *entry = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def97]
cdrkit-1.1.11/genisoimage/jte.c:420: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ptr
#  418|       checksum_update(template_context, ptr, size * nmemb);
#  419|       template_size += (unsigned long long)size * nmemb;
#  420|->     return fwrite(ptr, size, nmemb, stream);
#  421|   }
#  422|   

Error: COMPILER_WARNING (CWE-563): [#def98]
cdrkit-1.1.11/genisoimage/jte.c: scope_hint: In function ‘add_md5_entry’
cdrkit-1.1.11/genisoimage/jte.c:457:9: warning[-Wunused-variable]: unused variable ‘error’
#  457 |     int error = 0;
#      |         ^~~~~
#  455|   static void add_md5_entry(unsigned char *md5, unsigned long long size, char *filename)
#  456|   {
#  457|->     int error = 0;
#  458|       md5_list_entry_t *new = NULL;
#  459|       

Error: CPPCHECK_WARNING (CWE-476): [#def99]
cdrkit-1.1.11/genisoimage/jte.c:461: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new
#  459|       
#  460|       new = calloc(1, sizeof(md5_list_entry_t));
#  461|->     memcpy(new->MD5, md5, sizeof(new->MD5));
#  462|       new->size = size;
#  463|       new->filename = strdup(filename);

Error: CPPCHECK_WARNING (CWE-476): [#def100]
cdrkit-1.1.11/genisoimage/jte.c:462: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new
#  460|       new = calloc(1, sizeof(md5_list_entry_t));
#  461|       memcpy(new->MD5, md5, sizeof(new->MD5));
#  462|->     new->size = size;
#  463|       new->filename = strdup(filename);
#  464|       

Error: CPPCHECK_WARNING (CWE-476): [#def101]
cdrkit-1.1.11/genisoimage/jte.c:463: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new
#  461|       memcpy(new->MD5, md5, sizeof(new->MD5));
#  462|       new->size = size;
#  463|->     new->filename = strdup(filename);
#  464|       
#  465|       /* Add to the end of the list */

Error: CPPCHECK_WARNING (CWE-476): [#def102]
cdrkit-1.1.11/genisoimage/jte.c:522: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: md5_file
#  520|   
#  521|       memset(buf, 0, sizeof(buf));
#  522|->     while (fgets((char *)buf, sizeof(buf), md5_file))
#  523|       {
#  524|           numbuf = &buf[34];

Error: COMPILER_WARNING (CWE-563): [#def103]
cdrkit-1.1.11/genisoimage/jte.c: scope_hint: In function ‘flush_gzip_chunk’
cdrkit-1.1.11/genisoimage/jte.c:582:9: warning[-Wunused-but-set-variable]: variable ‘err’ set but not used
#  582 |     int err = 0;
#      |         ^~~
#  580|       unsigned char uncomp_size_out[6];
#  581|       off_t compressed_size_out = 0;
#  582|->     int err = 0;
#  583|       unsigned char *comp_buf = NULL;
#  584|   

Error: COMPILER_WARNING (CWE-563): [#def104]
cdrkit-1.1.11/genisoimage/jte.c: scope_hint: In function ‘flush_bz2_chunk’
cdrkit-1.1.11/genisoimage/jte.c:621:9: warning[-Wunused-but-set-variable]: variable ‘err’ set but not used
#  621 |     int err = 0;
#      |         ^~~
#  619|       unsigned char uncomp_size_out[6];
#  620|       off_t compressed_size_out = 0;
#  621|->     int err = 0;
#  622|       unsigned char *comp_buf = NULL;
#  623|   

Error: COMPILER_WARNING (CWE-563): [#def105]
cdrkit-1.1.11/genisoimage/jte.c: scope_hint: In function ‘write_jigdo_file’
cdrkit-1.1.11/genisoimage/jte.c:804:26: warning[-Wunused-variable]: unused variable ‘map’
#  804 |     struct path_mapping *map = map_list;
#      |                          ^~~
#  802|       unsigned char template_md5sum[16];
#  803|       entry_t *entry = entry_list;
#  804|->     struct path_mapping *map = map_list;
#  805|       int i = 0;
#  806|       struct checksum_info *info = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def106]
cdrkit-1.1.11/genisoimage/jte.c:896: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_entry
#  894|   
#  895|       new_entry = calloc(1, sizeof(entry_t));
#  896|->     new_entry->entry_type = JTET_NOMATCH;
#  897|       new_entry->next = NULL;
#  898|       new_entry->data.chunk.uncompressed_length = uncompressed_length;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def107]
cdrkit-1.1.11/genisoimage/jte.c:896:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘new_entry’
cdrkit-1.1.11/genisoimage/jte.c:977:6: enter_function: entry to ‘write_jt_match_record’
cdrkit-1.1.11/genisoimage/jte.c:989:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
cdrkit-1.1.11/genisoimage/jte.c:1037:5: call_function: calling ‘add_file_entry’ from ‘write_jt_match_record’
cdrkit-1.1.11/genisoimage/jte.c:1037:5: return_function: returning to ‘write_jt_match_record’ from ‘add_file_entry’
cdrkit-1.1.11/genisoimage/jte.c:1038:8: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/jte.c:1040:24: branch_true: ...to here
cdrkit-1.1.11/genisoimage/jte.c:1041:9: call_function: calling ‘write_compressed_chunk’ from ‘write_jt_match_record’
cdrkit-1.1.11/genisoimage/jte.c:1041:9: return_function: returning to ‘write_jt_match_record’ from ‘write_compressed_chunk’
cdrkit-1.1.11/genisoimage/jte.c:1042:9: call_function: calling ‘add_unmatched_entry’ from ‘write_jt_match_record’
#  894|   
#  895|       new_entry = calloc(1, sizeof(entry_t));
#  896|->     new_entry->entry_type = JTET_NOMATCH;
#  897|       new_entry->next = NULL;
#  898|       new_entry->data.chunk.uncompressed_length = uncompressed_length;

Error: CPPCHECK_WARNING (CWE-476): [#def108]
cdrkit-1.1.11/genisoimage/jte.c:897: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_entry
#  895|       new_entry = calloc(1, sizeof(entry_t));
#  896|       new_entry->entry_type = JTET_NOMATCH;
#  897|->     new_entry->next = NULL;
#  898|       new_entry->data.chunk.uncompressed_length = uncompressed_length;
#  899|   

Error: CPPCHECK_WARNING (CWE-476): [#def109]
cdrkit-1.1.11/genisoimage/jte.c:898: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_entry
#  896|       new_entry->entry_type = JTET_NOMATCH;
#  897|       new_entry->next = NULL;
#  898|->     new_entry->data.chunk.uncompressed_length = uncompressed_length;
#  899|   
#  900|       /* Add to the end of the list */

Error: CPPCHECK_WARNING (CWE-476): [#def110]
cdrkit-1.1.11/genisoimage/jte.c:921: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_entry
#  919|   
#  920|       new_entry = calloc(1, sizeof(entry_t));
#  921|->     new_entry->entry_type = JTET_FILE_MATCH;
#  922|       new_entry->next = NULL;
#  923|       memcpy(new_entry->data.file.md5, md5, sizeof(new_entry->data.file.md5));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def111]
cdrkit-1.1.11/genisoimage/jte.c:921:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘new_entry’
cdrkit-1.1.11/genisoimage/jte.c:977:6: enter_function: entry to ‘write_jt_match_record’
cdrkit-1.1.11/genisoimage/jte.c:989:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
cdrkit-1.1.11/genisoimage/jte.c:1037:5: call_function: calling ‘add_file_entry’ from ‘write_jt_match_record’
#  919|   
#  920|       new_entry = calloc(1, sizeof(entry_t));
#  921|->     new_entry->entry_type = JTET_FILE_MATCH;
#  922|       new_entry->next = NULL;
#  923|       memcpy(new_entry->data.file.md5, md5, sizeof(new_entry->data.file.md5));

Error: CPPCHECK_WARNING (CWE-476): [#def112]
cdrkit-1.1.11/genisoimage/jte.c:922: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_entry
#  920|       new_entry = calloc(1, sizeof(entry_t));
#  921|       new_entry->entry_type = JTET_FILE_MATCH;
#  922|->     new_entry->next = NULL;
#  923|       memcpy(new_entry->data.file.md5, md5, sizeof(new_entry->data.file.md5));
#  924|       new_entry->data.file.file_length = size;

Error: CPPCHECK_WARNING (CWE-476): [#def113]
cdrkit-1.1.11/genisoimage/jte.c:923: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_entry
#  921|       new_entry->entry_type = JTET_FILE_MATCH;
#  922|       new_entry->next = NULL;
#  923|->     memcpy(new_entry->data.file.md5, md5, sizeof(new_entry->data.file.md5));
#  924|       new_entry->data.file.file_length = size;
#  925|       new_entry->data.file.rsyncsum = rsyncsum;

Error: CPPCHECK_WARNING (CWE-476): [#def114]
cdrkit-1.1.11/genisoimage/jte.c:924: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_entry
#  922|       new_entry->next = NULL;
#  923|       memcpy(new_entry->data.file.md5, md5, sizeof(new_entry->data.file.md5));
#  924|->     new_entry->data.file.file_length = size;
#  925|       new_entry->data.file.rsyncsum = rsyncsum;
#  926|       new_entry->data.file.filename = strdup(filename);

Error: CPPCHECK_WARNING (CWE-476): [#def115]
cdrkit-1.1.11/genisoimage/jte.c:925: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_entry
#  923|       memcpy(new_entry->data.file.md5, md5, sizeof(new_entry->data.file.md5));
#  924|       new_entry->data.file.file_length = size;
#  925|->     new_entry->data.file.rsyncsum = rsyncsum;
#  926|       new_entry->data.file.filename = strdup(filename);
#  927|   

Error: CPPCHECK_WARNING (CWE-476): [#def116]
cdrkit-1.1.11/genisoimage/jte.c:926: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_entry
#  924|       new_entry->data.file.file_length = size;
#  925|       new_entry->data.file.rsyncsum = rsyncsum;
#  926|->     new_entry->data.file.filename = strdup(filename);
#  927|   
#  928|       /* Add to the end of the list */

Error: COMPILER_WARNING: [#def117]
cdrkit-1.1.11/genisoimage/jte.c: scope_hint: In function ‘jtwrite’
cdrkit-1.1.11/genisoimage/jte.c:946:6: warning[-Wold-style-definition]: old-style function definition
#  946 | void jtwrite(buffer, size, count, submode, islast)
#      |      ^~~~~~~
#  944|      1. Write a compressed data chunk in the jigdo template file
#  945|      2. Add an entry in our list of unmatched chunks for later */
#  946|-> void jtwrite(buffer, size, count, submode, islast)
#  947|   	void	*buffer;
#  948|   	int	size;

Error: COMPILER_WARNING: [#def118]
cdrkit-1.1.11/genisoimage/jte.c:946:6: warning[-Wold-style-definition]: old-style function definition
#  944|      1. Write a compressed data chunk in the jigdo template file
#  945|      2. Add an entry in our list of unmatched chunks for later */
#  946|-> void jtwrite(buffer, size, count, submode, islast)
#  947|   	void	*buffer;
#  948|   	int	size;

Error: COMPILER_WARNING (CWE-563): [#def119]
cdrkit-1.1.11/genisoimage/jte.c: scope_hint: In function ‘write_jt_match_record’
cdrkit-1.1.11/genisoimage/jte.c:979:25: warning[-Wunused-variable]: unused variable ‘tmp_size’
#  979 |     unsigned long long  tmp_size = 0;
#      |                         ^~~~~~~~
#  977|   void write_jt_match_record(char *filename, char *mirror_name, int sector_size, off_t size, unsigned char md5[16])
#  978|   {
#  979|->     unsigned long long  tmp_size = 0;
#  980|       char                buf[32768];
#  981|       off_t               remain = size;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def120]
cdrkit-1.1.11/genisoimage/jte.c:1009:21: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(filename, "rb")’ where non-null expected
cdrkit-1.1.11/genisoimage/jte.c:989:19: acquire_memory: allocated here
cdrkit-1.1.11/genisoimage/jte.c:989:8: release_memory: assuming ‘fopen(filename, "rb")’ is NULL
cdrkit-1.1.11/genisoimage/jte.c:989:8: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/jte.c:991:17: branch_true: ...to here
cdrkit-1.1.11/genisoimage/jte.c:1004:12: branch_true: following ‘true’ branch (when ‘remain > 0’)...
cdrkit-1.1.11/genisoimage/jte.c:1006:9: branch_true: ...to here
cdrkit-1.1.11/genisoimage/jte.c:1007:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/jte.c:1009:21: branch_false: ...to here
cdrkit-1.1.11/genisoimage/jte.c:1009:21: danger: argument 4 (‘fopen(filename, "rb")’) NULL where non-null expected
# 1007|           if (remain > sizeof(buf))
# 1008|               use = sizeof(buf);
# 1009|-> 		if (fread(buf, 1, use, infile) == 0)
# 1010|           {
# 1011|   #ifdef	USE_LIBSCHILY

Error: GCC_ANALYZER_WARNING (CWE-688): [#def121]
cdrkit-1.1.11/genisoimage/jte.c:1026:5: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(filename, "rb")’ where non-null expected
cdrkit-1.1.11/genisoimage/jte.c:989:19: acquire_memory: allocated here
cdrkit-1.1.11/genisoimage/jte.c:989:8: release_memory: assuming ‘fopen(filename, "rb")’ is NULL
cdrkit-1.1.11/genisoimage/jte.c:989:8: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/jte.c:991:17: branch_true: ...to here
cdrkit-1.1.11/genisoimage/jte.c:1004:12: branch_false: following ‘false’ branch (when ‘remain <= 0’)...
cdrkit-1.1.11/genisoimage/jte.c:1026:5: branch_false: ...to here
cdrkit-1.1.11/genisoimage/jte.c:1026:5: danger: argument 1 (‘fopen(filename, "rb")’) NULL where non-null expected
# 1024|       }
# 1025|   
# 1026|->     fclose(infile);
# 1027|       
# 1028|       /* Update the image checksum with any necessary padding data */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def122]
cdrkit-1.1.11/genisoimage/mac_label.c:190:20: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*mac_boot.name, "rb")’
cdrkit-1.1.11/genisoimage/mac_label.c:179:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/mac_label.c:180:21: branch_true: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:180:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/mac_label.c:185:33: branch_false: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:185:27: acquire_resource: opened here
cdrkit-1.1.11/genisoimage/mac_label.c:185:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/mac_label.c:190:21: branch_false: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:190:20: danger: ‘fopen(*mac_boot.name, "rb")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  188|   			return (-1);
#  189|   		}
#  190|-> 		if (fread(tmp, 1, SECTOR_SIZE, fp) != SECTOR_SIZE) {
#  191|   			sprintf(hce->error, "unable to read HFS boot file %s",
#  192|   								mac_boot->name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
cdrkit-1.1.11/genisoimage/mac_label.c:190:20: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*mac_boot.name, "rb")’
cdrkit-1.1.11/genisoimage/mac_label.c:179:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/mac_label.c:180:21: branch_true: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:180:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/mac_label.c:185:33: branch_false: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:185:27: acquire_memory: allocated here
cdrkit-1.1.11/genisoimage/mac_label.c:185:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/mac_label.c:190:21: branch_false: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:190:20: danger: ‘fopen(*mac_boot.name, "rb")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  188|   			return (-1);
#  189|   		}
#  190|-> 		if (fread(tmp, 1, SECTOR_SIZE, fp) != SECTOR_SIZE) {
#  191|   			sprintf(hce->error, "unable to read HFS boot file %s",
#  192|   								mac_boot->name);

Error: CPPCHECK_WARNING (CWE-404): [#def124]
cdrkit-1.1.11/genisoimage/mac_label.c:193: error[resourceLeak]: Resource leak: fp
#  191|   			sprintf(hce->error, "unable to read HFS boot file %s",
#  192|   								mac_boot->name);
#  193|-> 			return (-1);
#  194|   		}
#  195|   		/* check we have a bootable partition */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def125]
cdrkit-1.1.11/genisoimage/mac_label.c:198:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*mac_boot.name, "rb")’
cdrkit-1.1.11/genisoimage/mac_label.c:179:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/mac_label.c:180:21: branch_true: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:180:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/mac_label.c:185:33: branch_false: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:185:27: acquire_resource: opened here
cdrkit-1.1.11/genisoimage/mac_label.c:185:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/mac_label.c:190:21: branch_false: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:190:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/mac_label.c:198:23: branch_false: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:198:23: danger: ‘fopen(*mac_boot.name, "rb")’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  196|   		mac_part = (MacPart *) (tmp + HFS_BLOCKSZ);
#  197|   
#  198|-> 		if (!(IS_MAC_PART(mac_part) &&
#  199|   		    strncmp((char *) mac_part->pmPartType, pmPartType_2, 12) == 0)) {
#  200|   			sprintf(hce->error, "%s is not a HFS boot file",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
cdrkit-1.1.11/genisoimage/mac_label.c:198:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*mac_boot.name, "rb")’
cdrkit-1.1.11/genisoimage/mac_label.c:179:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/mac_label.c:180:21: branch_true: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:180:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/mac_label.c:185:33: branch_false: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:185:27: acquire_memory: allocated here
cdrkit-1.1.11/genisoimage/mac_label.c:185:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/mac_label.c:190:21: branch_false: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:190:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/mac_label.c:198:23: branch_false: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:198:23: danger: ‘fopen(*mac_boot.name, "rb")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  196|   		mac_part = (MacPart *) (tmp + HFS_BLOCKSZ);
#  197|   
#  198|-> 		if (!(IS_MAC_PART(mac_part) &&
#  199|   		    strncmp((char *) mac_part->pmPartType, pmPartType_2, 12) == 0)) {
#  200|   			sprintf(hce->error, "%s is not a HFS boot file",

Error: CPPCHECK_WARNING (CWE-404): [#def127]
cdrkit-1.1.11/genisoimage/mac_label.c:202: error[resourceLeak]: Resource leak: fp
#  200|   			sprintf(hce->error, "%s is not a HFS boot file",
#  201|   								mac_boot->name);
#  202|-> 			return (-1);
#  203|   		}
#  204|   		/* check we have a boot block as well - last 2 blocks of file */

Error: GCC_ANALYZER_WARNING (CWE-457): [#def128]
cdrkit-1.1.11/genisoimage/mac_label.c:302:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&tmp’
cdrkit-1.1.11/genisoimage/mac_label.c:179:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/mac_label.c:255:9: branch_false: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:270:22: branch_false: following ‘false’ branch (when ‘have_hfs_boot == 0’)...
 branch_false: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:298:21: branch_true: following ‘true’ branch (when ‘i < mpc’)...
cdrkit-1.1.11/genisoimage/mac_label.c:299:50: branch_true: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:300:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/mac_label.c:313:25: branch_false: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:298:21: branch_true: following ‘true’ branch (when ‘i < mpc’)...
cdrkit-1.1.11/genisoimage/mac_label.c:299:50: branch_true: ...to here
cdrkit-1.1.11/genisoimage/mac_label.c:302:25: danger: use of uninitialized value ‘&tmp’ here
#  300|   		if (mpm[i].ntype == PM2) {
#  301|   			/* get driver label and patch it */
#  302|-> 			memcpy((char *) mac_label, tmp, HFS_BLOCKSZ);
#  303|   			set_732((char *) mac_label->sbBlkCount,
#  304|   				last_extent * (SECTOR_SIZE / block_size));

Error: COMPILER_WARNING: [#def129]
cdrkit-1.1.11/genisoimage/mac_label.c: scope_hint: In function ‘gen_mac_label’
cdrkit-1.1.11/genisoimage/mac_label.c:373:33: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 32 equals destination size
#  373 |                                 strncpy((char *) mac_part->pmPartName,
#      |                                 ^
#  371|   				set_732((char *) mac_part->pmPartBlkCnt,
#  372|   				    mpm[i].size * (SECTOR_SIZE / HFS_BLOCKSZ));
#  373|-> 				strncpy((char *) mac_part->pmPartName,
#  374|   				    mpm[i].name, sizeof (mac_part->pmPartName));
#  375|   				strncpy((char *) mac_part->pmPartType,

Error: COMPILER_WARNING: [#def130]
cdrkit-1.1.11/genisoimage/mac_label.c:375:33: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 32 equals destination size
#  375 |                                 strncpy((char *) mac_part->pmPartType,
#      |                                 ^
#  373|   				strncpy((char *) mac_part->pmPartName,
#  374|   				    mpm[i].name, sizeof (mac_part->pmPartName));
#  375|-> 				strncpy((char *) mac_part->pmPartType,
#  376|   				    mpm[i].type, sizeof (mac_part->pmPartType));
#  377|   				set_732((char *) mac_part->pmLgDataStart, 0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
cdrkit-1.1.11/genisoimage/match.c:80:17: warning[-Wanalyzer-malloc-leak]: leak of ‘s_mat’
cdrkit-1.1.11/genisoimage/match.c:68:31: acquire_memory: allocated here
cdrkit-1.1.11/genisoimage/match.c:69:12: branch_false: following ‘false’ branch (when ‘s_mat’ is non-NULL)...
cdrkit-1.1.11/genisoimage/match.c:78:28: branch_false: ...to here
cdrkit-1.1.11/genisoimage/match.c:78:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/match.c:80:17: branch_true: ...to here
cdrkit-1.1.11/genisoimage/match.c:80:17: danger: ‘s_mat’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   78|   	if ((s_mat->name = strdup(fn)) == NULL) {
#   79|   #ifdef	USE_LIBSCHILY
#   80|-> 		errmsg("Can't allocate memory for sort filename\n");
#   81|   #else
#   82|   		fprintf(stderr, "Can't allocate memory for sort filename\n");

Error: CPPCHECK_WARNING (CWE-401): [#def132]
cdrkit-1.1.11/genisoimage/match.c:84: error[memleak]: Memory leak: s_mat
#   82|   		fprintf(stderr, "Can't allocate memory for sort filename\n");
#   83|   #endif
#   84|-> 		return (0);
#   85|   	}
#   86|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def133]
cdrkit-1.1.11/genisoimage/match.c:115:16: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(file, "r")’ where non-null expected
cdrkit-1.1.11/genisoimage/match.c:106:19: acquire_memory: allocated here
cdrkit-1.1.11/genisoimage/match.c:106:12: release_memory: assuming ‘fopen(file, "r")’ is NULL
cdrkit-1.1.11/genisoimage/match.c:106:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/match.c:108:17: branch_true: ...to here
cdrkit-1.1.11/genisoimage/match.c:115:16: danger: argument 3 (‘fopen(file, "r")’) NULL where non-null expected
#  113|   	}
#  114|   
#  115|-> 	while (fgets(name, sizeof (name), fp) != NULL) {
#  116|   		/*
#  117|   		 * look for the last space or tab character

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
cdrkit-1.1.11/genisoimage/match.c:198:17: warning[-Wanalyzer-malloc-leak]: leak of ‘mat’
cdrkit-1.1.11/genisoimage/match.c:183:12: branch_false: following ‘false’ branch (when ‘n <= 4’)...
cdrkit-1.1.11/genisoimage/match.c:186:24: branch_false: ...to here
cdrkit-1.1.11/genisoimage/match.c:186:24: acquire_memory: allocated here
cdrkit-1.1.11/genisoimage/match.c:187:12: branch_false: following ‘false’ branch (when ‘mat’ is non-NULL)...
cdrkit-1.1.11/genisoimage/match.c:196:26: branch_false: ...to here
cdrkit-1.1.11/genisoimage/match.c:196:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/match.c:198:17: branch_true: ...to here
cdrkit-1.1.11/genisoimage/match.c:198:17: danger: ‘mat’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  196|   	if ((mat->name = strdup(fn)) == NULL) {
#  197|   #ifdef	USE_LIBSCHILY
#  198|-> 		errmsg("Can't allocate memory for %s filename\n", mesg[n]);
#  199|   #else
#  200|   		fprintf(stderr, "Can't allocate memory for %s filename\n", mesg[n]);

Error: CPPCHECK_WARNING (CWE-401): [#def135]
cdrkit-1.1.11/genisoimage/match.c:202: error[memleak]: Memory leak: mat
#  200|   		fprintf(stderr, "Can't allocate memory for %s filename\n", mesg[n]);
#  201|   #endif
#  202|-> 		return (0);
#  203|   	}
#  204|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def136]
cdrkit-1.1.11/genisoimage/match.c:227:16: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(file, "r")’ where non-null expected
cdrkit-1.1.11/genisoimage/match.c:218:19: acquire_memory: allocated here
cdrkit-1.1.11/genisoimage/match.c:218:12: release_memory: assuming ‘fopen(file, "r")’ is NULL
cdrkit-1.1.11/genisoimage/match.c:218:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/match.c:220:17: branch_true: ...to here
cdrkit-1.1.11/genisoimage/match.c:227:16: danger: argument 3 (‘fopen(file, "r")’) NULL where non-null expected
#  225|   	}
#  226|   
#  227|-> 	while (fgets(name, sizeof (name), fp) != NULL) {
#  228|   		/*
#  229|   		 * strip of '\n'

Error: GCC_ANALYZER_WARNING (CWE-457): [#def137]
cdrkit-1.1.11/genisoimage/md5.c:222:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘in[1]’
cdrkit-1.1.11/genisoimage/md5.c:324:5: enter_function: entry to ‘calculate_md5sum’
cdrkit-1.1.11/genisoimage/md5.c:337:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
cdrkit-1.1.11/genisoimage/md5.c:350:12: branch_true: following ‘true’ branch (when ‘remain != 0’)...
cdrkit-1.1.11/genisoimage/md5.c:352:15: branch_true: ...to here
cdrkit-1.1.11/genisoimage/md5.c:353:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/genisoimage/md5.c:359:9: branch_false: ...to here
cdrkit-1.1.11/genisoimage/md5.c:359:9: call_function: calling ‘mk_MD5Update’ from ‘calculate_md5sum’
#  220|   
#  221|   	MD5STEP(F1, a, b, c, d, in[ 0]+0xd76aa478,  7);
#  222|-> 	MD5STEP(F1, d, a, b, c, in[ 1]+0xe8c7b756, 12);
#  223|   	MD5STEP(F1, c, d, a, b, in[ 2]+0x242070db, 17);
#  224|   	MD5STEP(F1, b, c, d, a, in[ 3]+0xc1bdceee, 22);

Error: COMPILER_WARNING (CWE-563): [#def138]
cdrkit-1.1.11/genisoimage/md5.c: scope_hint: In function ‘calculate_md5sum’
cdrkit-1.1.11/genisoimage/md5.c:327:9: warning[-Wunused-variable]: unused variable ‘i’
#  327 |     int i = 0;
#      |         ^
#  325|   {
#  326|   	char		buffer[32768];
#  327|->     int i = 0;
#  328|       FILE *infile = NULL;
#  329|       unsigned long long remain = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def139]
cdrkit-1.1.11/genisoimage/md5.c:352:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
cdrkit-1.1.11/genisoimage/md5.c:336:14: acquire_resource: opened here
cdrkit-1.1.11/genisoimage/md5.c:337:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
cdrkit-1.1.11/genisoimage/md5.c:350:12: branch_true: following ‘true’ branch (when ‘remain != 0’)...
cdrkit-1.1.11/genisoimage/md5.c:352:15: branch_true: ...to here
cdrkit-1.1.11/genisoimage/md5.c:352:15: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  350|       while (remain > 0)
#  351|       {
#  352|-> 	use = (remain > sizeof(buffer) ? sizeof(buffer) : remain);
#  353|   	if (fread(buffer, 1, use, infile) == 0)
#  354|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
cdrkit-1.1.11/genisoimage/md5.c:352:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
cdrkit-1.1.11/genisoimage/md5.c:336:14: acquire_memory: allocated here
cdrkit-1.1.11/genisoimage/md5.c:337:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
cdrkit-1.1.11/genisoimage/md5.c:350:12: branch_true: following ‘true’ branch (when ‘remain != 0’)...
cdrkit-1.1.11/genisoimage/md5.c:352:15: branch_true: ...to here
cdrkit-1.1.11/genisoimage/md5.c:352:15: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  350|       while (remain > 0)
#  351|       {
#  352|-> 	use = (remain > sizeof(buffer) ? sizeof(buffer) : remain);
#  353|   	if (fread(buffer, 1, use, infile) == 0)
#  354|   	{

Error: COMPILER_WARNING (CWE-563): [#def141]
cdrkit-1.1.11/genisoimage/multi.c: scope_hint: In function ‘parse_rrflags’
cdrkit-1.1.11/genisoimage/multi.c:305:17: warning[-Wunused-but-set-variable]: variable ‘flag1’ set but not used
#  305 |         int     flag1;
#      |                 ^~~~~
#  303|   	int	cont_offset;
#  304|   	int	cont_size;
#  305|-> 	int	flag1;
#  306|   	int	flag2;
#  307|   

Error: GCC_ANALYZER_WARNING (CWE-835): [#def142]
cdrkit-1.1.11/genisoimage/multi.c:623:16: warning[-Wanalyzer-infinite-loop]: infinite loop
cdrkit-1.1.11/genisoimage/multi.c:1500:1: enter_function: entry to ‘merge_previous_session’
#  621|   	*nentp = 0;
#  622|   	nent = 0;
#  623|-> 	while (i < len) {
#  624|   		idr = (struct iso_directory_record *) & dirbuff[i];
#  625|   		if (idr->length[0] == 0) {

Error: CPPCHECK_WARNING (CWE-119): [#def143]
cdrkit-1.1.11/genisoimage/multi.c:1179: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: pri->root_directory_record
# 1177|   		e_malloc(sizeof (struct iso_directory_record));
# 1178|   
# 1179|-> 	memcpy(rootp, pri->root_directory_record, sizeof (*rootp));
# 1180|   
# 1181|   	return (rootp);

Error: COMPILER_WARNING (CWE-563): [#def144]
cdrkit-1.1.11/genisoimage/multi.c:1509:25: warning[-Wunused-but-set-variable]: variable ‘status’ set but not used
# 1509 |         int             status;
#      |                         ^~~~~~
# 1507|   	int		n_orig;
# 1508|   	struct directory_entry *s_entry;
# 1509|-> 	int		status;
# 1510|   	int		lstatus;
# 1511|   	struct stat	statbuf,

Error: COMPILER_WARNING (CWE-563): [#def145]
cdrkit-1.1.11/genisoimage/multi.c: scope_hint: In function ‘merge_previous_session’
cdrkit-1.1.11/genisoimage/multi.c:1510:25: warning[-Wunused-but-set-variable]: variable ‘lstatus’ set but not used
# 1510 |         int             lstatus;
#      |                         ^~~~~~~
# 1508|   	struct directory_entry *s_entry;
# 1509|   	int		status;
# 1510|-> 	int		lstatus;
# 1511|   	struct stat	statbuf,
# 1512|   			lstatbuf;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def146]
cdrkit-1.1.11/genisoimage/multi.c:1881:44: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘d_entry’
cdrkit-1.1.11/genisoimage/multi.c:1846:16: branch_true: following ‘true’ branch (when ‘re’ is non-NULL)...
cdrkit-1.1.11/genisoimage/multi.c:1847:21: branch_true: ...to here
cdrkit-1.1.11/genisoimage/multi.c:1847:20: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/multi.c:1854:62: branch_true: ...to here
cdrkit-1.1.11/genisoimage/multi.c:1857:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
cdrkit-1.1.11/genisoimage/multi.c:1860:32: branch_false: following ‘false’ branch (when ‘d_entry’ is NULL)...
cdrkit-1.1.11/genisoimage/multi.c:1865:28: branch_false: ...to here
cdrkit-1.1.11/genisoimage/multi.c:1865:28: branch_true: following ‘true’ branch (when ‘d_entry’ is NULL)...
cdrkit-1.1.11/genisoimage/multi.c:1867:33: branch_true: ...to here
cdrkit-1.1.11/genisoimage/multi.c:1874:28: branch_true: following ‘true’ branch...
cdrkit-1.1.11/genisoimage/multi.c:1881:44: danger: dereference of NULL ‘d_entry’
# 1879|   				 * rr_reloc dir
# 1880|   				 */
# 1881|-> 				s_entry1 = d_entry->contents->next;
# 1882|   				rr_attr = find_rr_attribute(s_entry1->rr_attributes,
# 1883|   					s_entry1->total_rr_attr_size, "PL");

Error: COMPILER_WARNING (CWE-563): [#def147]
cdrkit-1.1.11/genisoimage/name.c: scope_hint: In function ‘iso9660_file_length’
cdrkit-1.1.11/genisoimage/name.c:129:25: warning[-Wunused-but-set-variable]: variable ‘ochars_before_dot’ set but not used
#  129 |         int             ochars_before_dot;
#      |                         ^~~~~~~~~~~~~~~~~
#  127|   	char		*result;
#  128|   	int		ochars_after_dot;
#  129|-> 	int		ochars_before_dot;
#  130|   	int		seen_dot = 0;
#  131|   	int		seen_semic = 0;

Error: COMPILER_WARNING: [#def148]
cdrkit-1.1.11/genisoimage/sha256.c: scope_hint: In function ‘sha256_init_ctx’
cdrkit-1.1.11/genisoimage/sha256.c:179:1: warning[-Wold-style-definition]: old-style function definition
#  179 | sha256_init_ctx (ctx)
#      | ^~~~~~~~~~~~~~~
#  177|      (FIPS 180-2:5.3.2)  */
#  178|   void
#  179|-> sha256_init_ctx (ctx)
#  180|        struct sha256_ctx *ctx;
#  181|   {

Error: COMPILER_WARNING: [#def149]
cdrkit-1.1.11/genisoimage/sha256.c:179:1: warning[-Wold-style-definition]: old-style function definition
#  177|      (FIPS 180-2:5.3.2)  */
#  178|   void
#  179|-> sha256_init_ctx (ctx)
#  180|        struct sha256_ctx *ctx;
#  181|   {

Error: COMPILER_WARNING: [#def150]
cdrkit-1.1.11/genisoimage/sha256.c: scope_hint: In function ‘sha256_finish_ctx’
cdrkit-1.1.11/genisoimage/sha256.c:202:1: warning[-Wold-style-definition]: old-style function definition
#  202 | sha256_finish_ctx (ctx, resbuf)
#      | ^~~~~~~~~~~~~~~~~
#  200|      aligned for a 32 bits value.  */
#  201|   void *
#  202|-> sha256_finish_ctx (ctx, resbuf)
#  203|        struct sha256_ctx *ctx;
#  204|        void *resbuf;

Error: COMPILER_WARNING: [#def151]
cdrkit-1.1.11/genisoimage/sha256.c:202:1: warning[-Wold-style-definition]: old-style function definition
#  200|      aligned for a 32 bits value.  */
#  201|   void *
#  202|-> sha256_finish_ctx (ctx, resbuf)
#  203|        struct sha256_ctx *ctx;
#  204|        void *resbuf;

Error: COMPILER_WARNING: [#def152]
cdrkit-1.1.11/genisoimage/sha256.c: scope_hint: In function ‘sha256_process_bytes’
cdrkit-1.1.11/genisoimage/sha256.c:236:1: warning[-Wold-style-definition]: old-style function definition
#  236 | sha256_process_bytes (buffer, len, ctx)
#      | ^~~~~~~~~~~~~~~~~~~~
#  234|   
#  235|   void
#  236|-> sha256_process_bytes (buffer, len, ctx)
#  237|        const void *buffer;
#  238|        size_t len;

Error: COMPILER_WARNING: [#def153]
cdrkit-1.1.11/genisoimage/sha256.c:236:1: warning[-Wold-style-definition]: old-style function definition
#  234|   
#  235|   void
#  236|-> sha256_process_bytes (buffer, len, ctx)
#  237|        const void *buffer;
#  238|        size_t len;

Error: COMPILER_WARNING: [#def154]
cdrkit-1.1.11/genisoimage/sha512.c: scope_hint: In function ‘sha512_init_ctx’
cdrkit-1.1.11/genisoimage/sha512.c:209:1: warning[-Wold-style-definition]: old-style function definition
#  209 | sha512_init_ctx (ctx)
#      | ^~~~~~~~~~~~~~~
#  207|      (FIPS 180-2:5.3.3)  */
#  208|   void
#  209|-> sha512_init_ctx (ctx)
#  210|        struct sha512_ctx *ctx;
#  211|   {

Error: COMPILER_WARNING: [#def155]
cdrkit-1.1.11/genisoimage/sha512.c:209:1: warning[-Wold-style-definition]: old-style function definition
#  207|      (FIPS 180-2:5.3.3)  */
#  208|   void
#  209|-> sha512_init_ctx (ctx)
#  210|        struct sha512_ctx *ctx;
#  211|   {

Error: COMPILER_WARNING: [#def156]
cdrkit-1.1.11/genisoimage/sha512.c: scope_hint: In function ‘sha512_finish_ctx’
cdrkit-1.1.11/genisoimage/sha512.c:232:1: warning[-Wold-style-definition]: old-style function definition
#  232 | sha512_finish_ctx (ctx, resbuf)
#      | ^~~~~~~~~~~~~~~~~
#  230|      aligned for a 32 bits value.  */
#  231|   void *
#  232|-> sha512_finish_ctx (ctx, resbuf)
#  233|        struct sha512_ctx *ctx;
#  234|        void *resbuf;

Error: COMPILER_WARNING: [#def157]
cdrkit-1.1.11/genisoimage/sha512.c:232:1: warning[-Wold-style-definition]: old-style function definition
#  230|      aligned for a 32 bits value.  */
#  231|   void *
#  232|-> sha512_finish_ctx (ctx, resbuf)
#  233|        struct sha512_ctx *ctx;
#  234|        void *resbuf;

Error: COMPILER_WARNING: [#def158]
cdrkit-1.1.11/genisoimage/sha512.c: scope_hint: In function ‘sha512_process_bytes’
cdrkit-1.1.11/genisoimage/sha512.c:266:1: warning[-Wold-style-definition]: old-style function definition
#  266 | sha512_process_bytes (buffer, len, ctx)
#      | ^~~~~~~~~~~~~~~~~~~~
#  264|   
#  265|   void
#  266|-> sha512_process_bytes (buffer, len, ctx)
#  267|        const void *buffer;
#  268|        size_t len;

Error: COMPILER_WARNING: [#def159]
cdrkit-1.1.11/genisoimage/sha512.c:266:1: warning[-Wold-style-definition]: old-style function definition
#  264|   
#  265|   void
#  266|-> sha512_process_bytes (buffer, len, ctx)
#  267|        const void *buffer;
#  268|        size_t len;

Error: COMPILER_WARNING (CWE-563): [#def160]
cdrkit-1.1.11/genisoimage/tree.c:1151:27: warning[-Wunused-but-set-variable]: variable ‘parent’ set but not used
# 1151 |         struct directory *parent;
#      |                           ^~~~~~
# 1149|   	char		whole_path[PATH_MAX];
# 1150|   	struct dirent	*d_entry;
# 1151|-> 	struct directory *parent;
# 1152|   	int		dflag;
# 1153|   	char		*old_path;

Error: COMPILER_WARNING (CWE-563): [#def161]
cdrkit-1.1.11/genisoimage/tree.c: scope_hint: In function ‘scan_directory_tree’
cdrkit-1.1.11/genisoimage/tree.c:1153:26: warning[-Wunused-but-set-variable]: variable ‘old_path’ set but not used
# 1153 |         char            *old_path;
#      |                          ^~~~~~~~
# 1151|   	struct directory *parent;
# 1152|   	int		dflag;
# 1153|-> 	char		*old_path;
# 1154|   
# 1155|   	if (verbose > 1) {

Error: COMPILER_WARNING: [#def162]
cdrkit-1.1.11/genisoimage/tree.c: scope_hint: In function ‘insert_file_entry’
cdrkit-1.1.11/genisoimage/tree.c:2080:49: warning[-Wformat-overflow=]: ‘%s’ directive writing up to 4096 bytes into a region of size 2045
# 2080 |                         sprintf(buffer, "L\t%s\t%s\n",
#      |                                                 ^~
# 2081 |                                 s_entry->name, symlink_buff);
#      |                                                ~~~~~~~~~~~~
/usr/include/bits/stdio2.h:30:10: note: ‘__sprintf_chk’ output 5 or more bytes (assuming 4101) into a destination of size 2048
#   30 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   31 |                                   __glibc_objsize (__s), __fmt,
#      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   32 |                                   __va_arg_pack ());
#      |                                   ~~~~~~~~~~~~~~~~~
# 2078|   #endif
# 2079|   			symlink_buff[nchar < 0 ? 0 : nchar] = 0;
# 2080|-> 			sprintf(buffer, "L\t%s\t%s\n",
# 2081|   				s_entry->name, symlink_buff);
# 2082|   			break;

Error: COMPILER_WARNING (CWE-563): [#def163]
cdrkit-1.1.11/genisoimage/tree.c: scope_hint: In function ‘find_or_create_directory’
cdrkit-1.1.11/genisoimage/tree.c:2377:33: warning[-Wunused-variable]: unused variable ‘xstatbuf’
# 2377 |                 struct stat     xstatbuf;
#      |                                 ^~~~~~~~
# 2375|   
# 2376|   	if (orig_de == NULL) {
# 2377|-> 		struct stat	xstatbuf;
# 2378|   		struct stat	parent_statbuf;
# 2379|   		int		sts;

Error: COMPILER_WARNING: [#def164]
cdrkit-1.1.11/genisoimage/tree.c: scope_hint: In function ‘delete_directory’
cdrkit-1.1.11/genisoimage/tree.c:2468:1: warning[-Wold-style-definition]: old-style function definition
# 2468 | delete_directory(parent, child)
#      | ^~~~~~~~~~~~~~~~
# 2466|    */
# 2467|   static void
# 2468|-> delete_directory(parent, child)
# 2469|   	struct directory	*parent;
# 2470|   	struct directory	*child;

Error: COMPILER_WARNING: [#def165]
cdrkit-1.1.11/genisoimage/tree.c:2468:1: warning[-Wold-style-definition]: old-style function definition
# 2466|    */
# 2467|   static void
# 2468|-> delete_directory(parent, child)
# 2469|   	struct directory	*parent;
# 2470|   	struct directory	*child;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def166]
cdrkit-1.1.11/genisoimage/tree.c:2620:18: warning[-Wanalyzer-malloc-leak]: leak of ‘subdir’
cdrkit-1.1.11/genisoimage/tree.c:2620:18: acquire_memory: allocated here
cdrkit-1.1.11/genisoimage/tree.c:2631:12: branch_true: following ‘true’ branch (when ‘p1’ is non-NULL)...
cdrkit-1.1.11/genisoimage/tree.c:2632:17: branch_true: ...to here
cdrkit-1.1.11/genisoimage/tree.c:2645:24: branch_true: following ‘true’ branch (when ‘dpnt’ is non-NULL)...
cdrkit-1.1.11/genisoimage/tree.c:2651:44: branch_true: ...to here
cdrkit-1.1.11/genisoimage/tree.c:2651:28: branch_true: following ‘true’ branch (when the strings are equal)...
 branch_true: ...to here
cdrkit-1.1.11/genisoimage/tree.c:2620:18: danger: ‘subdir’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 2618|   
# 2619|   	/* strip off next directory name from filename */
# 2620|-> 	subdir = strdup(filename);
# 2621|   
# 2622|   	if ((p1 = strchr(subdir, '/')) == subdir) {

Error: CPPCHECK_WARNING (CWE-476): [#def167]
cdrkit-1.1.11/genisoimage/tree.c:2622: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: subdir
# 2620|   	subdir = strdup(filename);
# 2621|   
# 2622|-> 	if ((p1 = strchr(subdir, '/')) == subdir) {
# 2623|   		fprintf(stderr,
# 2624|   		"call to search_tree_file with an absolute path, stripping\n");

Error: GCC_ANALYZER_WARNING (CWE-688): [#def168]
cdrkit-1.1.11/genisoimage/tree.c:2622:19: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘subdir’ where non-null expected
cdrkit-1.1.11/genisoimage/tree.c:2620:18: acquire_memory: this call could return NULL
cdrkit-1.1.11/genisoimage/tree.c:2622:19: danger: argument 1 (‘subdir’) from [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#argument 1 of ‘__builtin_strchr’ must be non-null
# 2620|   	subdir = strdup(filename);
# 2621|   
# 2622|-> 	if ((p1 = strchr(subdir, '/')) == subdir) {
# 2623|   		fprintf(stderr,
# 2624|   		"call to search_tree_file with an absolute path, stripping\n");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def169]
cdrkit-1.1.11/genisoimage/tree.c:2666:24: warning[-Wanalyzer-malloc-leak]: leak of ‘subdir’
cdrkit-1.1.11/genisoimage/tree.c:2620:18: acquire_memory: allocated here
cdrkit-1.1.11/genisoimage/tree.c:2622:12: branch_false: following ‘false’ branch (when ‘subdir != p1’)...
cdrkit-1.1.11/genisoimage/tree.c:2631:12: branch_false: ...to here
cdrkit-1.1.11/genisoimage/tree.c:2631:12: branch_false: following ‘false’ branch (when ‘p1’ is NULL)...
cdrkit-1.1.11/genisoimage/tree.c:2665:17: branch_false: ...to here
cdrkit-1.1.11/genisoimage/tree.c:2666:24: danger: ‘subdir’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 2664|   		/* look for a normal file now */
# 2665|   		depnt = node->contents;
# 2666|-> 		while (depnt) {
# 2667|   #ifdef DEBUG_TORITO
# 2668|   			fprintf(stderr, "%4d %5d %s\n", depnt->isorec.extent,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def170]
cdrkit-1.1.11/genisoimage/tree.c:2671:28: warning[-Wanalyzer-malloc-leak]: leak of ‘subdir’
cdrkit-1.1.11/genisoimage/tree.c:2620:18: acquire_memory: allocated here
cdrkit-1.1.11/genisoimage/tree.c:2622:12: branch_false: following ‘false’ branch (when ‘subdir != p1’)...
cdrkit-1.1.11/genisoimage/tree.c:2631:12: branch_false: ...to here
cdrkit-1.1.11/genisoimage/tree.c:2631:12: branch_false: following ‘false’ branch (when ‘p1’ is NULL)...
cdrkit-1.1.11/genisoimage/tree.c:2665:17: branch_false: ...to here
cdrkit-1.1.11/genisoimage/tree.c:2666:24: branch_true: following ‘true’ branch (when ‘depnt’ is non-NULL)...
cdrkit-1.1.11/genisoimage/tree.c:2671:46: branch_true: ...to here
cdrkit-1.1.11/genisoimage/tree.c:2671:28: danger: ‘subdir’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 2669|   				depnt->size, depnt->name);
# 2670|   #endif
# 2671|-> 			if (strcmp(filename, depnt->name) == 0) {
# 2672|   #ifdef DEBUG_TORITO
# 2673|   				fprintf(stderr, "Found our file %s", filename);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def171]
cdrkit-1.1.11/genisoimage/write.c:1117:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘finddir’
cdrkit-1.1.11/genisoimage/write.c:2255:1: enter_function: entry to ‘file_gen’
cdrkit-1.1.11/genisoimage/write.c:2262:14: call_function: calling ‘assign_file_addresses’ from ‘file_gen’
# 1115|   				finddir = dpnt->subdir;
# 1116|   				while (1 == 1) {
# 1117|-> 					if (finddir->self == s_entry)
# 1118|   						break;
# 1119|   					finddir = finddir->next;

Error: COMPILER_WARNING: [#def172]
cdrkit-1.1.11/genisoimage/write.c: scope_hint: In function ‘pvd_write’
cdrkit-1.1.11/genisoimage/write.c:1899:33: warning[-Wformat-overflow=]: ‘%2.2d’ directive writing between 2 and 11 bytes into a region of size between 6 and 13
# 1899 |         sprintf(iso_time, "%4.4d%2.2d%2.2d%2.2d%2.2d%2.2d00",
#      |                                 ^~~~~
cdrkit-1.1.11/genisoimage/write.c:1899:27: note: directive argument in the range [-2147483647, 2147483647]
# 1899 |         sprintf(iso_time, "%4.4d%2.2d%2.2d%2.2d%2.2d%2.2d00",
#      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/bits/stdio2.h:30:10: note: ‘__sprintf_chk’ output between 17 and 69 bytes into a destination of size 17
#   30 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   31 |                                   __glibc_objsize (__s), __fmt,
#      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   32 |                                   __va_arg_pack ());
#      |                                   ~~~~~~~~~~~~~~~~~
# 1897|   	 * That's not true, in 2000 tm_year == 100, so 1900+tm_year == 2000.
# 1898|   	 */
# 1899|-> 	sprintf(iso_time, "%4.4d%2.2d%2.2d%2.2d%2.2d%2.2d00",
# 1900|   		1900 + local.tm_year,
# 1901|   		local.tm_mon + 1, local.tm_mday,

Error: CPPCHECK_WARNING (CWE-119): [#def173]
cdrkit-1.1.11/genisoimage/write.c:1915: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: vol_desc.id
# 1913|   	memset(&vol_desc, 0, sizeof (vol_desc));
# 1914|   	vol_desc.type[0] = ISO_VD_PRIMARY;
# 1915|-> 	memcpy(vol_desc.id, ISO_STANDARD_ID, sizeof (ISO_STANDARD_ID));
# 1916|   	vol_desc.version[0] = 1;
# 1917|   

Error: CPPCHECK_WARNING (CWE-119): [#def174]
cdrkit-1.1.11/genisoimage/write.c:2038: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: evol_desc.id
# 2036|   	memset(&evol_desc, 0, sizeof (evol_desc));
# 2037|   	evol_desc.type[0] = (unsigned char) ISO_VD_END;
# 2038|-> 	memcpy(evol_desc.id, ISO_STANDARD_ID, sizeof (ISO_STANDARD_ID));
# 2039|   	evol_desc.version[0] = 1;
# 2040|   	jtwrite(&evol_desc, SECTOR_SIZE, 1, 0, TRUE);

Error: CPPCHECK_WARNING (CWE-476): [#def175]
cdrkit-1.1.11/icedax/aifc.c:137: error[nullPointer]: Null pointer dereference: (struct AIFCHDR*)0
#  135|     fillbytes(&AifcHdr, sizeof(AifcHdr), '\0');
#  136|     AifcHdr.formChk.ckid	= cpu_to_be32(FOURCC_FORM);
#  137|->   AifcHdr.formChk.dwSize= cpu_to_be32(expected_bytes +
#  138|                           offset_of(AIFCHDR,blocksize)+sizeof(AifcHdr.blocksize)
#  139|   					- offsetof(AIFCHDR,commChk));

Error: CPPCHECK_WARNING (CWE-476): [#def176]
cdrkit-1.1.11/icedax/aifc.c:155: error[nullPointer]: Null pointer dereference: (struct AIFCHDR*)0
#  153|   
#  154|     AifcHdr.commChk.ckid	= cpu_to_be32(FOURCC_COMM);
#  155|->   AifcHdr.commChk.dwSize= cpu_to_be32(offset_of(AIFCHDR,ssndChkid)
#  156|   					- offset_of(AIFCHDR,numChannels));
#  157|   

Error: CPPCHECK_WARNING (CWE-476): [#def177]
cdrkit-1.1.11/icedax/aifc.c:169: error[nullPointer]: Null pointer dereference: (struct AIFCHDR*)0
#  167|   
#  168|     memcpy(AifcHdr.ssndChkid, "SSND", 4);
#  169|->   tmp = cpu_to_be32(expected_bytes + offset_of(AIFCHDR,blocksize)+sizeof(AifcHdr.blocksize) - offset_of(AIFCHDR, offset));
#  170|     AifcHdr.dwSize[0] = tmp >> 24;
#  171|     AifcHdr.dwSize[1] = tmp >> 16;

Error: CPPCHECK_WARNING (CWE-476): [#def178]
cdrkit-1.1.11/icedax/aiff.c:113: error[nullPointer]: Null pointer dereference: (struct AIFFHDR*)0
#  111|     fillbytes(&AiffHdr, sizeof(AiffHdr), '\0');
#  112|     AiffHdr.formChk.ckid  = cpu_to_be32(FOURCC_FORM);
#  113|->   AiffHdr.formChk.dwSize= cpu_to_be32(expected_bytes +
#  114|   			offset_of(AIFFHDR,blocksize)+sizeof(AiffHdr.blocksize)
#  115|   			- offsetof(AIFFHDR,formType));

Error: CPPCHECK_WARNING (CWE-476): [#def179]
cdrkit-1.1.11/icedax/aiff.c:119: error[nullPointer]: Null pointer dereference: (struct AIFFHDR*)0
#  117|   
#  118|     AiffHdr.commChk.ckid	= cpu_to_be32(FOURCC_COMM);
#  119|->   AiffHdr.commChk.dwSize= cpu_to_be32(offset_of(AIFFHDR,ssndChkid)
#  120|   					- offset_of(AIFFHDR,numChannels));
#  121|   

Error: CPPCHECK_WARNING (CWE-476): [#def180]
cdrkit-1.1.11/icedax/aiff.c:132: error[nullPointer]: Null pointer dereference: (struct AIFFHDR*)0
#  130|   
#  131|     memcpy(AiffHdr.ssndChkid, "SSND", 4);
#  132|->   tmp = cpu_to_be32(expected_bytes + offset_of(AIFFHDR,blocksize)+sizeof(AiffHdr.blocksize) - offset_of(AIFFHDR, offset));
#  133|     AiffHdr.dwSize[0] = tmp >> 24;
#  134|     AiffHdr.dwSize[1] = tmp >> 16;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def181]
cdrkit-1.1.11/icedax/base64.c:105:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘d’
cdrkit-1.1.11/icedax/base64.c:103:13: acquire_memory: this call could return NULL
cdrkit-1.1.11/icedax/base64.c:104:15: branch_true: following ‘true’ branch (when ‘srcl != 0’)...
cdrkit-1.1.11/icedax/base64.c:105:14: branch_true: ...to here
cdrkit-1.1.11/icedax/base64.c:105:5: danger: ‘d’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  103|     d = ret = malloc ((size_t) ++i);
#  104|     for (i = 0; srcl; s += 3) {	/* process tuplets */
#  105|->     *d++ = v[s[0] >> 2];	/* byte 1: high 6 bits (1) */
#  106|   				/* byte 2: low 2 bits (1), high 4 bits (2) */
#  107|       *d++ = v[((s[0] << 4) + (--srcl ? (s[1] >> 4) : 0)) & 0x3f];

Error: GCC_ANALYZER_WARNING (CWE-476): [#def182]
cdrkit-1.1.11/icedax/base64.c:118:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘d’
cdrkit-1.1.11/icedax/base64.c:103:13: acquire_memory: this call could return NULL
cdrkit-1.1.11/icedax/base64.c:104:15: branch_false: following ‘false’ branch (when ‘srcl == 0’)...
cdrkit-1.1.11/icedax/base64.c:118:3: branch_false: ...to here
cdrkit-1.1.11/icedax/base64.c:118:3: danger: ‘d’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  116|       }
#  117|     }
#  118|->   *d = '\0';			/* tie off string */
#  119|   
#  120|     return ret;			/* return the resulting string */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def183]
cdrkit-1.1.11/icedax/cd_extra.c:296:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cdrkit-1.1.11/icedax/toc.c:1827:13: enter_function: entry to ‘dump_extra_info’
cdrkit-1.1.11/icedax/toc.c:1836:10: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:1837:14: branch_true: ...to here
cdrkit-1.1.11/icedax/toc.c:1853:5: call_function: calling ‘Read_Subinfo’ from ‘dump_extra_info’
#  294|       case 0x10: /* isrc */
#  295|   	if (this_track > 0 && this_track < 100
#  296|-> 	    && Get_ISRC(this_track)[0] == '\0' && Subp[2] != '\0'
#  297|   	    && len >= 15) {
#  298|   	       Set_ISRC(this_track, Subp + 2);

Error: COMPILER_WARNING (CWE-563): [#def184]
cdrkit-1.1.11/icedax/icedax.c: scope_hint: In function ‘switch_to_realtime_priority’
cdrkit-1.1.11/icedax/icedax.c:976:13: warning[-Wunused-but-set-variable]: variable ‘sched_fifo_min’ set but not used
#  976 |         int sched_fifo_min, sched_fifo_max;
#      |             ^~~~~~~~~~~~~~
#  974|   #endif
#  975|   	{
#  976|-> 	int sched_fifo_min, sched_fifo_max;
#  977|   	struct sched_param sched_parms;
#  978|   

Error: GCC_ANALYZER_WARNING (CWE-479): [#def185]
cdrkit-1.1.11/icedax/icedax.c:1042:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
cdrkit-1.1.11/icedax/icedax.c:2028:5: enter_function: entry to ‘main’
cdrkit-1.1.11/icedax/icedax.c:2048:3: call_function: calling ‘init_globals’ from ‘main’
cdrkit-1.1.11/icedax/icedax.c:2048:3: return_function: returning to ‘main’ from ‘init_globals’
cdrkit-1.1.11/icedax/icedax.c:2101:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2166:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2169:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2173:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2173:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2176:14: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2178:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2196:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2262:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2265:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2265:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2268:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2268:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2272:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2272:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2283:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2283:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2286:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2286:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2289:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2289:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2292:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2292:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2295:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2295:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2299:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2299:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2307:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2307:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2311:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2311:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2314:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2326:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2329:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2329:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2335:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2335:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2339:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2339:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2343:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2343:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2346:6: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2346:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2348:6: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2348:6: branch_false: following ‘false’ branch (when ‘rectime >= 0.0’)...
cdrkit-1.1.11/icedax/icedax.c:2353:8: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2353:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2357:8: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2361:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2425:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2427:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2427:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2435:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2435:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2436:10: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2435:7: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2435:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2435:7: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2444:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2453:6: branch_false: following ‘false’ branch (when ‘argc <= moreargs’)...
cdrkit-1.1.11/icedax/icedax.c:2469:5: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:1049:13: enter_function: entry to ‘exit_wrapper’
cdrkit-1.1.11/icedax/icedax.c:1056:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/icedax.c:1057:31: branch_true: ...to here
cdrkit-1.1.11/icedax/icedax.c:1062:25: call_function: inlined call to ‘on_exitscsi’ from ‘exit_wrapper’
# 1040|   int on_exitscsi(void *status)
# 1041|   {
# 1042|-> 	exit((intptr_t)status);
# 1043|   	return 0;
# 1044|   }

Error: GCC_ANALYZER_WARNING (CWE-479): [#def186]
cdrkit-1.1.11/icedax/icedax.c:1065:17: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
cdrkit-1.1.11/icedax/icedax.c:2028:5: enter_function: entry to ‘main’
cdrkit-1.1.11/icedax/icedax.c:2048:3: call_function: calling ‘init_globals’ from ‘main’
cdrkit-1.1.11/icedax/icedax.c:2048:3: return_function: returning to ‘main’ from ‘init_globals’
cdrkit-1.1.11/icedax/icedax.c:2101:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2166:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2169:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2173:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2173:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2176:14: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2178:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2196:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2262:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2265:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2265:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2268:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2268:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2272:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2272:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2283:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2283:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2286:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2286:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2289:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2289:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2292:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2292:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2295:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2295:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2299:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2299:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2307:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2307:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2311:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2311:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2314:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2326:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2329:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2329:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2335:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2335:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2339:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2339:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2343:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2343:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2346:6: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2346:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2348:6: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2348:6: branch_false: following ‘false’ branch (when ‘rectime >= 0.0’)...
cdrkit-1.1.11/icedax/icedax.c:2353:8: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2353:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2357:8: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2361:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2425:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2427:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2427:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2435:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2435:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2436:10: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2435:7: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2435:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2435:7: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2444:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2453:6: branch_false: following ‘false’ branch (when ‘argc <= moreargs’)...
cdrkit-1.1.11/icedax/icedax.c:2469:5: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:1049:13: enter_function: entry to ‘exit_wrapper’
cdrkit-1.1.11/icedax/icedax.c:1056:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:1065:17: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:1065:17: danger: call to ‘exit’ from within signal handler
# 1063|   		} 
# 1064|   	} else {
# 1065|-> 		exit(status);
# 1066|   	}
# 1067|   }

Error: GCC_ANALYZER_WARNING (CWE-479): [#def187]
cdrkit-1.1.11/icedax/icedax.c:1090:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
cdrkit-1.1.11/icedax/icedax.c:2028:5: enter_function: entry to ‘main’
cdrkit-1.1.11/icedax/icedax.c:2048:3: call_function: calling ‘init_globals’ from ‘main’
cdrkit-1.1.11/icedax/icedax.c:2048:3: return_function: returning to ‘main’ from ‘init_globals’
cdrkit-1.1.11/icedax/icedax.c:2101:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2166:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2169:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2173:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2173:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2176:14: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2178:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2196:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2262:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2265:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2265:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2268:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2268:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2272:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2272:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2283:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2283:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2286:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2286:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2289:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2289:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2292:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2292:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2295:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2295:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2299:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2299:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2307:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2307:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2311:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2311:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2314:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2326:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2329:13: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2329:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2335:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2335:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2339:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2339:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2343:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2343:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2346:6: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2346:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2348:6: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2348:6: branch_false: following ‘false’ branch (when ‘rectime >= 0.0’)...
cdrkit-1.1.11/icedax/icedax.c:2353:8: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2353:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2357:8: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2361:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2425:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2427:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2427:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2435:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2435:6: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2436:10: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2435:7: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2435:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2435:7: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2444:7: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2453:6: branch_false: following ‘false’ branch (when ‘argc <= moreargs’)...
cdrkit-1.1.11/icedax/icedax.c:2469:5: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2469:5: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2470:5: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2470:5: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2471:5: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2471:5: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2472:5: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:2472:5: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/icedax.c:2474:5: branch_false: ...to here
cdrkit-1.1.11/icedax/icedax.c:1073:13: enter_function: entry to ‘set_nonforked’
cdrkit-1.1.11/icedax/icedax.c:1090:9: danger: call to ‘exit’ from within signal handler
# 1088|   		kill(child_pid, SIGINT);
# 1089|   	}
# 1090|-> 	exit(SIGPIPE_ERROR);
# 1091|   }
# 1092|   

Error: COMPILER_WARNING (CWE-563): [#def188]
cdrkit-1.1.11/icedax/icedax.c: scope_hint: In function ‘do_read’
cdrkit-1.1.11/icedax/icedax.c:1367:29: warning[-Wunused-but-set-variable]: variable ‘retval’ set but not used
# 1367 |                         int retval;
#      |                             ^~~~~~
# 1365|   		do {
# 1366|   			SCSI *usalp = get_scsi_p();
# 1367|-> 			int retval;
# 1368|   #ifdef DEBUG_READS
# 1369|   fprintf(stderr, "reading from %lu to %lu, overlap %u\n", lSector, lSector + SectorBurst -1, global.overlap);

Error: CPPCHECK_WARNING (CWE-476): [#def189]
cdrkit-1.1.11/icedax/icedax.c:2504: error[nullPointer]: Null pointer dereference: (struct myringbuff*)0
# 2502|   #endif
# 2503|       global.shmsize += 10*global.pagesize;	/* XXX Der Speicherfehler ist nicht in libparanoia sondern in cdda2wav :-( */
# 2504|->     global.shmsize += HEADER_SIZE + ENTRY_SIZE_PAGE_AL * global.buffers;
# 2505|   
# 2506|   #if	defined (HAVE_FORK_AND_SHAREDMEM)

Error: CPPCHECK_WARNING (CWE-476): [#def190]
cdrkit-1.1.11/icedax/icedax.c:2504: error[nullPointer]: Null pointer dereference: (struct ringbuffheader*)0
# 2502|   #endif
# 2503|       global.shmsize += 10*global.pagesize;	/* XXX Der Speicherfehler ist nicht in libparanoia sondern in cdda2wav :-( */
# 2504|->     global.shmsize += HEADER_SIZE + ENTRY_SIZE_PAGE_AL * global.buffers;
# 2505|   
# 2506|   #if	defined (HAVE_FORK_AND_SHAREDMEM)

Error: CPPCHECK_WARNING (CWE-476): [#def191]
cdrkit-1.1.11/icedax/ringbuff.c:135: error[nullPointer]: Null pointer dereference: (struct myringbuff*)0
#  133|       *last_buffer = *he_fill_buffer;
#  134|     else
#  135|->     *last_buffer = INC(*last_buffer);
#  136|   #ifdef DEBUG_SHM
#  137|   fprintf(stderr, "drop: fill_b = %p,  last_b = %p\n", *he_fill_buffer, *last_buffer);

Error: CPPCHECK_WARNING (CWE-476): [#def192]
cdrkit-1.1.11/icedax/ringbuff.c:135: error[nullPointer]: Null pointer dereference: (struct ringbuffheader*)0
#  133|       *last_buffer = *he_fill_buffer;
#  134|     else
#  135|->     *last_buffer = INC(*last_buffer);
#  136|   #ifdef DEBUG_SHM
#  137|   fprintf(stderr, "drop: fill_b = %p,  last_b = %p\n", *he_fill_buffer, *last_buffer);

Error: CPPCHECK_WARNING (CWE-476): [#def193]
cdrkit-1.1.11/icedax/ringbuff.c:156: error[nullPointer]: Null pointer dereference: (struct myringbuff*)0
#  154|   
#  155|     if (*he_fill_buffer == NULL) {
#  156|->     *he_fill_buffer = RB_BASE;
#  157|     } else {
#  158|       *he_fill_buffer = INC(*he_fill_buffer);

Error: CPPCHECK_WARNING (CWE-476): [#def194]
cdrkit-1.1.11/icedax/ringbuff.c:156: error[nullPointer]: Null pointer dereference: (struct ringbuffheader*)0
#  154|   
#  155|     if (*he_fill_buffer == NULL) {
#  156|->     *he_fill_buffer = RB_BASE;
#  157|     } else {
#  158|       *he_fill_buffer = INC(*he_fill_buffer);

Error: CPPCHECK_WARNING (CWE-476): [#def195]
cdrkit-1.1.11/icedax/ringbuff.c:158: error[nullPointer]: Null pointer dereference: (struct myringbuff*)0
#  156|       *he_fill_buffer = RB_BASE;
#  157|     } else {
#  158|->     *he_fill_buffer = INC(*he_fill_buffer);
#  159|     }
#  160|   }

Error: CPPCHECK_WARNING (CWE-476): [#def196]
cdrkit-1.1.11/icedax/ringbuff.c:158: error[nullPointer]: Null pointer dereference: (struct ringbuffheader*)0
#  156|       *he_fill_buffer = RB_BASE;
#  157|     } else {
#  158|->     *he_fill_buffer = INC(*he_fill_buffer);
#  159|     }
#  160|   }

Error: GCC_ANALYZER_WARNING: [#def197]
cdrkit-1.1.11/icedax/scsi_cmds.c:629:41: warning[-Wanalyzer-overlapping-buffers]: overlapping buffers passed as arguments to ‘memcpy’
cdrkit-1.1.11/icedax/scsi_cmds.c:393:17: enter_function: entry to ‘collect_tracks’
cdrkit-1.1.11/icedax/scsi_cmds.c:431:21: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/scsi_cmds.c:439:20: branch_true: ...to here
cdrkit-1.1.11/icedax/scsi_cmds.c:439:20: branch_false: following ‘false’ branch (when ‘bcd_flag == 0’)...
cdrkit-1.1.11/icedax/scsi_cmds.c:448:25: branch_false: ...to here
cdrkit-1.1.11/icedax/scsi_cmds.c:593:28: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/scsi_cmds.c:603:28: branch_false: ...to here
cdrkit-1.1.11/icedax/scsi_cmds.c:603:28: branch_false: following ‘false’ branch (when ‘bcd_flag == 0’)...
cdrkit-1.1.11/icedax/scsi_cmds.c:606:29: branch_false: ...to here
cdrkit-1.1.11/icedax/scsi_cmds.c:606:28: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/scsi_cmds.c:607:51: branch_false: ...to here
cdrkit-1.1.11/icedax/scsi_cmds.c:606:29: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/scsi_cmds.c:615:55: call_function: inlined call to ‘dvd_lba’ from ‘collect_tracks’
cdrkit-1.1.11/icedax/scsi_cmds.c:621:36: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/scsi_cmds.c:629:66: branch_false: ...to here
cdrkit-1.1.11/icedax/scsi_cmds.c:629:41: danger: overlapping buffers passed as arguments to ‘memcpy’
#  627|   				} else {
#  628|   					last_start = trackstart;
#  629|-> 					memcpy(&po->ent[tracks], &po->ent[i], sizeof(struct tocdesc));
#  630|   					tracks++;
#  631|   				}

Error: COMPILER_WARNING: [#def198]
cdrkit-1.1.11/icedax/scsi_cmds.c: scope_hint: In function ‘ReadStandardSub’
cdrkit-1.1.11/icedax/scsi_cmds.c:1392:12: warning[-Wold-style-definition]: old-style function definition
# 1392 | subq_chnl *ReadStandardSub(usalp, lSector)
#      |            ^~~~~~~~~~~~~~~
# 1390|   }
# 1391|   
# 1392|-> subq_chnl *ReadStandardSub(usalp, lSector)
# 1393|   	SCSI *usalp;
# 1394|   	unsigned lSector;

Error: COMPILER_WARNING: [#def199]
cdrkit-1.1.11/icedax/scsi_cmds.c:1392:12: warning[-Wold-style-definition]: old-style function definition
# 1390|   }
# 1391|   
# 1392|-> subq_chnl *ReadStandardSub(usalp, lSector)
# 1393|   	SCSI *usalp;
# 1394|   	unsigned lSector;

Error: COMPILER_WARNING: [#def200]
cdrkit-1.1.11/icedax/scsi_cmds.c: scope_hint: In function ‘SpeedSelectSCSIYamaha’
cdrkit-1.1.11/icedax/scsi_cmds.c:1512:6: warning[-Wold-style-definition]: old-style function definition
# 1512 | void SpeedSelectSCSIYamaha (usalp, speed)
#      |      ^~~~~~~~~~~~~~~~~~~~~
# 1510|   }
# 1511|   
# 1512|-> void SpeedSelectSCSIYamaha (usalp, speed)
# 1513|   	SCSI *usalp;
# 1514|   	unsigned speed;

Error: COMPILER_WARNING: [#def201]
cdrkit-1.1.11/icedax/scsi_cmds.c:1512:6: warning[-Wold-style-definition]: old-style function definition
# 1510|   }
# 1511|   
# 1512|-> void SpeedSelectSCSIYamaha (usalp, speed)
# 1513|   	SCSI *usalp;
# 1514|   	unsigned speed;

Error: COMPILER_WARNING: [#def202]
cdrkit-1.1.11/icedax/sndconfig.c: scope_hint: In function ‘set_snd_device’
cdrkit-1.1.11/icedax/sndconfig.c:84:9: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 200 equals destination size
#   84 |         strncpy(snd_device, devicename, sizeof(snd_device));
#      |         ^
#   82|   int set_snd_device(const char *devicename)
#   83|   {
#   84|-> 	strncpy(snd_device, devicename, sizeof(snd_device));
#   85|   	return 0;
#   86|   }

Error: COMPILER_WARNING: [#def203]
cdrkit-1.1.11/icedax/toc.c:412:25: warning[-Warray-bounds=]: array subscript 171 is above array bounds of ‘struct TOC_t[101]’
#  412 | #define GETSTART(x) ((x)->dwStartSector)
#      |                         ^~
cdrkit-1.1.11/icedax/toc.c: scope_hint: In function ‘DisplayToc’
cdrkit-1.1.11/icedax/toc.c:3323:14: note: while referencing ‘g_toc’
# 3323 | static TOC_t g_toc [MAXTRK+1]; /* hidden track + 100 regular tracks */
#      |              ^~~~~
#  410|   #define GETFLAGS(x) ((x)->bFlags)
#  411|   #define GETTRACK(x) ((x)->bTrack)
#  412|-> #define GETSTART(x) ((x)->dwStartSector)
#  413|   #define GETMINS(x)  ((x)->mins)
#  414|   #define GETSECS(x)  ((x)->secs)

Error: COMPILER_WARNING: [#def204]
cdrkit-1.1.11/icedax/toc.c: scope_hint: In function ‘calc_cdindex_id’
cdrkit-1.1.11/icedax/toc.c:633:29: warning[-Wformat-overflow=]: ‘__sprintf_chk’ may write a terminating nul past the end of the destination
#  633 |         sprintf(temp, "%08lX", 150 + Get_StartSector(CDROM_LEADOUT));
#      |                             ^
/usr/include/bits/stdio2.h:30:10: note: ‘__sprintf_chk’ output between 9 and 10 bytes into a destination of size 9
#   30 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   31 |                                   __glibc_objsize (__s), __fmt,
#      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   32 |                                   __va_arg_pack ());
#      |                                   ~~~~~~~~~~~~~~~~~
#  631|   
#  632|   	/* the position of the leadout comes first. */
#  633|-> 	sprintf(temp, "%08lX", 150 + Get_StartSector(CDROM_LEADOUT));
#  634|   	sha_update(&sha, (unsigned char *)temp, 8);
#  635|   

Error: COMPILER_WARNING: [#def205]
cdrkit-1.1.11/icedax/toc.c: scope_hint: In function ‘calc_cdindex_id’
cdrkit-1.1.11/icedax/toc.c:638:37: warning[-Wformat-overflow=]: ‘__sprintf_chk’ may write a terminating nul past the end of the destination
#  638 |                 sprintf(temp, "%08lX", 150+Get_StartSector(i));
#      |                                     ^
/usr/include/bits/stdio2.h:30:10: note: ‘__sprintf_chk’ output between 9 and 10 bytes into a destination of size 9
#   30 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   31 |                                   __glibc_objsize (__s), __fmt,
#      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   32 |                                   __va_arg_pack ());
#      |                                   ~~~~~~~~~~~~~~~~~
#  636|   	/* now 99 tracks follow with their positions. */
#  637|   	for (i = 1; i <= cdtracks; i++) {
#  638|-> 		sprintf(temp, "%08lX", 150+Get_StartSector(i));
#  639|   		sha_update(&sha, (unsigned char *)temp, 8);
#  640|   	}

Error: COMPILER_WARNING (CWE-563): [#def206]
cdrkit-1.1.11/icedax/toc.c: scope_hint: In function ‘emit_cddb_form’
cdrkit-1.1.11/icedax/toc.c:707:12: warning[-Wunused-but-set-variable]: variable ‘first_audio’ set but not used
#  707 |   unsigned first_audio;
#      |            ^~~~~~~~~~~
#  705|   {
#  706|     static struct iterator i;
#  707|->   unsigned first_audio;
#  708|     FILE *cddb_form;
#  709|     char fname[200];

Error: COMPILER_WARNING: [#def207]
cdrkit-1.1.11/icedax/toc.c: scope_hint: In function ‘FixupTOC’
cdrkit-1.1.11/icedax/toc.c:774:43: warning[-Wformat-overflow=]: ‘__sprintf_chk’ may write a terminating nul past the end of the destination
#  774 |                 sprintf(prefix, "TTITLE%d=", ii-1);
#      |                                           ^
/usr/include/bits/stdio2.h:30:10: note: ‘__sprintf_chk’ output between 9 and 11 bytes into a destination of size 10
#   30 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   31 |                                   __glibc_objsize (__s), __fmt,
#      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   32 |                                   __va_arg_pack ());
#      |                                   ~~~~~~~~~~~~~~~~~
#  772|   	  if (global.tracktitle[ii] != NULL) {
#  773|   		char prefix[10];
#  774|-> 		sprintf(prefix, "TTITLE%d=", ii-1);
#  775|   		  escape_and_split( cddb_form, prefix, global.tracktitle[ii], "");
#  776|   	  } else {

Error: CPPCHECK_WARNING (CWE-401): [#def208]
cdrkit-1.1.11/icedax/toc.c:936: error[memleakOnRealloc]: Common realloc mistake: 'target' nulled but not freed upon failure
#  934|   						**target = '\0';
#  935|   				} else {
#  936|-> 				        *target = realloc(*target, strlen((char *)*target) + clen - 1);
#  937|   				}
#  938|   				if (*target != NULL) {

Error: COMPILER_WARNING (CWE-563): [#def209]
cdrkit-1.1.11/icedax/toc.c: scope_hint: In function ‘handle_userchoice’
cdrkit-1.1.11/icedax/toc.c:1072:24: warning[-Wunused-but-set-variable]: variable ‘ret’ set but not used
# 1072 |                 do{int ret;ret=scanf("%u", &user_choice);}while(0); /* FIXME: check return value */
#      |                        ^~~
# 1070|   	do {
# 1071|   		fprintf(stderr, "please choose one (0-%u): ", nr);
# 1072|-> 		do{int ret;ret=scanf("%u", &user_choice);}while(0); /* FIXME: check return value */
# 1073|   	} while (user_choice > nr);
# 1074|   

Error: CPPCHECK_WARNING (CWE-476): [#def210]
cdrkit-1.1.11/icedax/toc.c:1132: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 1130|   		perror("cddb cannot resolve freedb host: ");
# 1131|   		he = malloc(sizeof(struct hostent));
# 1132|-> 		memset(he, 0 , sizeof(struct hostent));
# 1133|   		he->h_length = 4;
# 1134|   		he->h_addrtype = AF_INET;

Error: CPPCHECK_WARNING (CWE-476): [#def211]
cdrkit-1.1.11/icedax/toc.c:1133: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 1131|   		he = malloc(sizeof(struct hostent));
# 1132|   		memset(he, 0 , sizeof(struct hostent));
# 1133|-> 		he->h_length = 4;
# 1134|   		he->h_addrtype = AF_INET;
# 1135|   		he->h_addr_list = malloc(4);

Error: CPPCHECK_WARNING (CWE-476): [#def212]
cdrkit-1.1.11/icedax/toc.c:1134: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 1132|   		memset(he, 0 , sizeof(struct hostent));
# 1133|   		he->h_length = 4;
# 1134|-> 		he->h_addrtype = AF_INET;
# 1135|   		he->h_addr_list = malloc(4);
# 1136|   		he->h_addr_list[0] = malloc(4);

Error: CPPCHECK_WARNING (CWE-476): [#def213]
cdrkit-1.1.11/icedax/toc.c:1135: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 1133|   		he->h_length = 4;
# 1134|   		he->h_addrtype = AF_INET;
# 1135|-> 		he->h_addr_list = malloc(4);
# 1136|   		he->h_addr_list[0] = malloc(4);
# 1137|   		((struct in_addr *)(he->h_addr_list[0]))->s_addr =

Error: CPPCHECK_WARNING (CWE-476): [#def214]
cdrkit-1.1.11/icedax/toc.c:1136: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 1134|   		he->h_addrtype = AF_INET;
# 1135|   		he->h_addr_list = malloc(4);
# 1136|-> 		he->h_addr_list[0] = malloc(4);
# 1137|   		((struct in_addr *)(he->h_addr_list[0]))->s_addr =
# 1138|   			/* kingfisher.berlios.de          freedb.freedb.de */

Error: COMPILER_WARNING: [#def215]
cdrkit-1.1.11/icedax/toc.c: scope_hint: In function ‘request_titles’
cdrkit-1.1.11/icedax/toc.c:1136:32: warning[-Warray-bounds=]: array subscript ‘char *[0]’ is partly outside array bounds of ‘unsigned char[4]’
# 1136 |                 he->h_addr_list[0] = malloc(4);
#      |                 ~~~~~~~~~~~~~~~^~~
cdrkit-1.1.11/icedax/toc.c:1135:35: note: object of size 4 allocated by ‘malloc’
# 1135 |                 he->h_addr_list = malloc(4);
#      |                                   ^~~~~~~~~
# 1134|   		he->h_addrtype = AF_INET;
# 1135|   		he->h_addr_list = malloc(4);
# 1136|-> 		he->h_addr_list[0] = malloc(4);
# 1137|   		((struct in_addr *)(he->h_addr_list[0]))->s_addr =
# 1138|   			/* kingfisher.berlios.de          freedb.freedb.de */

Error: CPPCHECK_WARNING (CWE-476): [#def216]
cdrkit-1.1.11/icedax/toc.c:1137: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: (struct in_addr*)(he->h_addr_list[0])
# 1135|   		he->h_addr_list = malloc(4);
# 1136|   		he->h_addr_list[0] = malloc(4);
# 1137|-> 		((struct in_addr *)(he->h_addr_list[0]))->s_addr =
# 1138|   			/* kingfisher.berlios.de          freedb.freedb.de */
# 1139|   			 htonl(UINT_C(0xc3254d85));	/*0xc2610412*/

Error: CPPCHECK_WARNING (CWE-476): [#def217]
cdrkit-1.1.11/icedax/toc.c:1137: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 1135|   		he->h_addr_list = malloc(4);
# 1136|   		he->h_addr_list[0] = malloc(4);
# 1137|-> 		((struct in_addr *)(he->h_addr_list[0]))->s_addr =
# 1138|   			/* kingfisher.berlios.de          freedb.freedb.de */
# 1139|   			 htonl(UINT_C(0xc3254d85));	/*0xc2610412*/

Error: CPPCHECK_WARNING (CWE-476): [#def218]
cdrkit-1.1.11/icedax/toc.c:1140: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 1138|   			/* kingfisher.berlios.de          freedb.freedb.de */
# 1139|   			 htonl(UINT_C(0xc3254d85));	/*0xc2610412*/
# 1140|-> 		he->h_name = "freedb.freedb.org";
# 1141|   #if	0
# 1142|   		retval = -1;

Error: CPPCHECK_WARNING (CWE-476): [#def219]
cdrkit-1.1.11/icedax/toc.c:1149: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 1147|   	/* save result data IMMEDIATELY!! */
# 1148|   	memset(&sa, 0 , sizeof(struct sockaddr_in));
# 1149|-> 	sa.sin_family 	   = he->h_addrtype;	/* AF_INET; */
# 1150|   	sa.sin_addr.s_addr = ((struct in_addr *)((he->h_addr_list)[0]))->s_addr;
# 1151|   

Error: CPPCHECK_WARNING (CWE-476): [#def220]
cdrkit-1.1.11/icedax/toc.c:1150: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 1148|   	memset(&sa, 0 , sizeof(struct sockaddr_in));
# 1149|   	sa.sin_family 	   = he->h_addrtype;	/* AF_INET; */
# 1150|-> 	sa.sin_addr.s_addr = ((struct in_addr *)((he->h_addr_list)[0]))->s_addr;
# 1151|   
# 1152|   	se = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def221]
cdrkit-1.1.11/icedax/toc.c:1162: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: se
# 1160|   		if (se == NULL) {
# 1161|   			se = malloc(sizeof(struct servent));
# 1162|-> 			memset(se, 0 , sizeof(struct servent));
# 1163|   			se->s_port = htons(CDDBPORT /*8880*/);
# 1164|   #if	0	

Error: CPPCHECK_WARNING (CWE-476): [#def222]
cdrkit-1.1.11/icedax/toc.c:1163: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: se
# 1161|   			se = malloc(sizeof(struct servent));
# 1162|   			memset(se, 0 , sizeof(struct servent));
# 1163|-> 			se->s_port = htons(CDDBPORT /*8880*/);
# 1164|   #if	0	
# 1165|   			perror("cddb cannot resolve cddbp or cddbp-alt port:\n "); 

Error: GCC_ANALYZER_WARNING (CWE-476): [#def223]
cdrkit-1.1.11/icedax/toc.c:2375:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cdrkit-1.1.11/icedax/toc.c:2373:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:2373:13: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/toc.c:2375:21: branch_false: ...to here
cdrkit-1.1.11/icedax/toc.c:2375:21: danger: dereference of NULL ‘0’
# 2373|   	if (Toshiba3401() != 0 && global.quiet == 0
# 2374|   	    && ((*sub_ch) != 0
# 2375|-> 		|| (((subq_catalog *)(*sub_ch)->data)->mc_valid & 0x80))) {
# 2376|   		/* no valid MCN yet. do more searching */
# 2377|   		long h = Get_AudioStartSector(1);

Error: CPPCHECK_WARNING (CWE-476): [#def224]
cdrkit-1.1.11/icedax/toc.c:2381: error[nullPointer]: Null pointer dereference: (struct myringbuff*)0
# 2379|   		while (h <= Get_AudioStartSector(1) + 100) {
# 2380|   			if (Toshiba3401())
# 2381|-> 				ReadCdRom(get_scsi_p(), RB_BASE->data, h, global.nsectors);
# 2382|   			(*sub_ch) = ReadSubQ(get_scsi_p(), GET_CATALOGNUMBER,0);
# 2383|   			if ((*sub_ch) != NULL) {

Error: CPPCHECK_WARNING (CWE-476): [#def225]
cdrkit-1.1.11/icedax/toc.c:2381: error[nullPointer]: Null pointer dereference: (struct ringbuffheader*)0
# 2379|   		while (h <= Get_AudioStartSector(1) + 100) {
# 2380|   			if (Toshiba3401())
# 2381|-> 				ReadCdRom(get_scsi_p(), RB_BASE->data, h, global.nsectors);
# 2382|   			(*sub_ch) = ReadSubQ(get_scsi_p(), GET_CATALOGNUMBER,0);
# 2383|   			if ((*sub_ch) != NULL) {

Error: CPPCHECK_WARNING (CWE-119): [#def226]
cdrkit-1.1.11/icedax/toc.c:2444: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: (char*)subq_cat->media_catalog_number
# 2442|   		    && (memcmp(subq_cat->media_catalog_number,
# 2443|   			       "\0\0\0\0\0\0\0\0\0\0\0\0\0", 13) != 0)) {
# 2444|-> 			sprintf((char *)
# 2445|   				subq_cat->media_catalog_number, 
# 2446|   				"%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X", 

Error: COMPILER_WARNING: [#def227]
cdrkit-1.1.11/icedax/toc.c: scope_hint: In function ‘Read_MCN_ISRC’
cdrkit-1.1.11/icedax/toc.c:2446:64: warning[-Wformat-overflow=]: ‘%1.1X’ directive writing between 1 and 2 bytes into a region of size between 1 and 7
# 2446 |                                 "%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X",
#      |                                                                ^~~~~
cdrkit-1.1.11/icedax/toc.c:2446:33: note: directive argument in the range [0, 255]
# 2446 |                                 "%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X",
#      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cdrkit-1.1.11/icedax/toc.c:2446:33: note: directive argument in the range [0, 255]
cdrkit-1.1.11/icedax/toc.c:2446:33: note: directive argument in the range [0, 255]
cdrkit-1.1.11/icedax/toc.c:2446:33: note: directive argument in the range [0, 255]
cdrkit-1.1.11/icedax/toc.c:2446:33: note: directive argument in the range [0, 255]
cdrkit-1.1.11/icedax/toc.c:2446:33: note: directive argument in the range [0, 255]
cdrkit-1.1.11/icedax/toc.c:2446:33: note: directive argument in the range [0, 255]
/usr/include/bits/stdio2.h:30:10: note: ‘__sprintf_chk’ output between 14 and 27 bytes into a destination of size 13
#   30 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   31 |                                   __glibc_objsize (__s), __fmt,
#      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   32 |                                   __va_arg_pack ());
#      |                                   ~~~~~~~~~~~~~~~~~
# 2444|   			sprintf((char *)
# 2445|   				subq_cat->media_catalog_number, 
# 2446|-> 				"%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X%1.1X", 
# 2447|   				subq_cat->media_catalog_number [0],
# 2448|   				subq_cat->media_catalog_number [1],

Error: CPPCHECK_WARNING (CWE-476): [#def228]
cdrkit-1.1.11/icedax/toc.c:2479: error[nullPointer]: Null pointer dereference: (struct myringbuff*)0
# 2477|   		j = (Get_AudioStartSector(tr)/100 + 1) * 100;
# 2478|   		do {
# 2479|-> 			ReadCdRom(get_scsi_p(), RB_BASE->data, j, global.nsectors);
# 2480|   			*sub_ch = ReadSubQ(get_scsi_p(), GET_TRACK_ISRC, Get_Tracknumber(tr));
# 2481|   			if (*sub_ch != NULL) {

Error: CPPCHECK_WARNING (CWE-476): [#def229]
cdrkit-1.1.11/icedax/toc.c:2479: error[nullPointer]: Null pointer dereference: (struct ringbuffheader*)0
# 2477|   		j = (Get_AudioStartSector(tr)/100 + 1) * 100;
# 2478|   		do {
# 2479|-> 			ReadCdRom(get_scsi_p(), RB_BASE->data, j, global.nsectors);
# 2480|   			*sub_ch = ReadSubQ(get_scsi_p(), GET_TRACK_ISRC, Get_Tracknumber(tr));
# 2481|   			if (*sub_ch != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def230]
cdrkit-1.1.11/icedax/toc.c:2626:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cdrkit-1.1.11/icedax/toc.c:2496:13: enter_function: entry to ‘Get_Set_ISRC’
cdrkit-1.1.11/icedax/toc.c:2510:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:2511:17: branch_true: ...to here
cdrkit-1.1.11/icedax/toc.c:2513:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:2513:13: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:2517:32: branch_true: ...to here
cdrkit-1.1.11/icedax/toc.c:2555:20: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:2586:28: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/toc.c:2612:28: branch_false: ...to here
cdrkit-1.1.11/icedax/toc.c:2612:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
cdrkit-1.1.11/icedax/toc.c:2619:40: branch_true: following ‘true’ branch (when ‘bits != 30’)...
cdrkit-1.1.11/icedax/toc.c:2620:51: branch_true: ...to here
cdrkit-1.1.11/icedax/toc.c:2621:36: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:2626:53: branch_true: ...to here
cdrkit-1.1.11/icedax/toc.c:2626:53: call_function: inlined call to ‘Get_ISRC’ from ‘Get_Set_ISRC’
cdrkit-1.1.11/icedax/toc.c:2626:41: branch_false: ...to here
cdrkit-1.1.11/icedax/toc.c:2626:41: danger: dereference of NULL ‘<unknown>’
# 2624|   					int y;
# 2625|   						    
# 2626|-> 					Get_ISRC(tr)[0] = '\0';
# 2627|   					fprintf(stderr, "\nIllegal ISRC for track %d, skipped: ", tr);
# 2628|   					for (y = 0; y < 15; y++) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def231]
cdrkit-1.1.11/icedax/toc.c:2665:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cdrkit-1.1.11/icedax/toc.c:2496:13: enter_function: entry to ‘Get_Set_ISRC’
cdrkit-1.1.11/icedax/toc.c:2510:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:2511:17: branch_true: ...to here
cdrkit-1.1.11/icedax/toc.c:2513:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:2513:13: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:2517:32: branch_true: ...to here
cdrkit-1.1.11/icedax/toc.c:2657:38: branch_true: following ‘true’ branch (when ‘ii != 12’)...
cdrkit-1.1.11/icedax/toc.c:2658:39: branch_true: ...to here
cdrkit-1.1.11/icedax/toc.c:2662:28: branch_true: following ‘true’ branch (when ‘ii != 12’)...
cdrkit-1.1.11/icedax/toc.c:2665:45: branch_true: ...to here
cdrkit-1.1.11/icedax/toc.c:2665:45: call_function: inlined call to ‘Get_ISRC’ from ‘Get_Set_ISRC’
cdrkit-1.1.11/icedax/toc.c:2665:33: branch_false: ...to here
cdrkit-1.1.11/icedax/toc.c:2665:33: danger: dereference of NULL ‘<unknown>’
# 2663|   				int y;
# 2664|   				
# 2665|-> 				Get_ISRC(ii)[0] = '\0';
# 2666|   				fprintf(stderr, "\nIllegal ISRC for track %d, skipped: ", ii+1);
# 2667|   				for (y = 0; y < 15; y++) {

Error: CPPCHECK_WARNING (CWE-457): [#def232]
cdrkit-1.1.11/icedax/toc.c:2690: warning[uninitvar]: Uninitialized variable: p_start
# 2688|   		}
# 2689|   
# 2690|-> 		if (memcmp(p_start,"00-000-00-00000",15) != 0) {
# 2691|   			Set_ISRC(tr, p_start);
# 2692|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def233]
cdrkit-1.1.11/icedax/toc.c:2722:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cdrkit-1.1.11/icedax/toc.c:2699:6: enter_function: entry to ‘Read_MCN_ISRC’
cdrkit-1.1.11/icedax/toc.c:2715:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:2718:17: call_function: inlined call to ‘InitIterator’ from ‘Read_MCN_ISRC’
cdrkit-1.1.11/icedax/toc.c:2720:24: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:2721:43: branch_true: ...to here
cdrkit-1.1.11/icedax/toc.c:2721:43: call_function: calling ‘it_getNextTrack’ from ‘Read_MCN_ISRC’
cdrkit-1.1.11/icedax/toc.c:2721:43: return_function: returning to ‘Read_MCN_ISRC’ from ‘it_getNextTrack’
cdrkit-1.1.11/icedax/toc.c:2724:28: branch_false: following ‘false’ branch (when ‘ii != 170’)...
cdrkit-1.1.11/icedax/toc.c:2726:30: branch_false: ...to here
cdrkit-1.1.11/icedax/toc.c:2720:24: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:2721:43: branch_true: ...to here
cdrkit-1.1.11/icedax/toc.c:2721:43: call_function: calling ‘it_getNextTrack’ from ‘Read_MCN_ISRC’
cdrkit-1.1.11/icedax/toc.c:2721:43: return_function: returning to ‘Read_MCN_ISRC’ from ‘it_getNextTrack’
cdrkit-1.1.11/icedax/toc.c:2722:39: danger: dereference of NULL ‘i.getNextTrack(&i)’
# 2720|   		while (i.hasNextTrack(&i)) {
# 2721|   			struct TOC_t *p = i.getNextTrack(&i);
# 2722|-> 			unsigned ii = GETTRACK(p);
# 2723|   			
# 2724|   			if (ii == CDROM_LEADOUT) break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def234]
cdrkit-1.1.11/icedax/toc.c:3306:10: warning[-Wanalyzer-malloc-leak]: leak of ‘baseindex_pool’
cdrkit-1.1.11/icedax/toc.c:3149:35: acquire_memory: allocated here
cdrkit-1.1.11/icedax/toc.c:3306:10: danger: ‘baseindex_pool’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 3304|     EnableCdda(usalp, 1, CD_FRAMESIZE_RAW);
# 3305|   
# 3306|->   return retval;
# 3307|   }
# 3308|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def235]
cdrkit-1.1.11/icedax/toc.c:3413:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cdrkit-1.1.11/icedax/toc.c:2496:13: enter_function: entry to ‘Get_Set_ISRC’
cdrkit-1.1.11/icedax/toc.c:2510:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:2511:17: branch_true: ...to here
cdrkit-1.1.11/icedax/toc.c:2513:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:2513:13: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:2517:32: branch_true: ...to here
cdrkit-1.1.11/icedax/toc.c:2586:28: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/toc.c:2612:28: branch_false: ...to here
cdrkit-1.1.11/icedax/toc.c:2612:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
cdrkit-1.1.11/icedax/toc.c:2619:40: branch_true: following ‘true’ branch (when ‘bits != 30’)...
cdrkit-1.1.11/icedax/toc.c:2620:51: branch_true: ...to here
cdrkit-1.1.11/icedax/toc.c:2621:36: branch_false: following ‘false’ branch...
cdrkit-1.1.11/icedax/toc.c:2634:40: branch_false: ...to here
cdrkit-1.1.11/icedax/toc.c:2637:36: branch_false: following ‘false’ branch (when ‘bits != 6’)...
cdrkit-1.1.11/icedax/toc.c:2619:51: branch_false: ...to here
cdrkit-1.1.11/icedax/toc.c:2690:20: branch_true: following ‘true’ branch...
cdrkit-1.1.11/icedax/toc.c:2691:25: branch_true: ...to here
cdrkit-1.1.11/icedax/toc.c:2691:25: call_function: inlined call to ‘Set_ISRC’ from ‘Get_Set_ISRC’
# 3411|   {
# 3412|   	if (track <= (int)cdtracks) {
# 3413|-> 		memcpy(Get_ISRC(track), ISRC_arg, 16);
# 3414|   	}
# 3415|   }

Error: COMPILER_WARNING: [#def236]
cdrkit-1.1.11/icedax/toc.c:3698:21: warning[-Warray-bounds=]: array subscript 4294967295 is above array bounds of ‘struct TOC_t[101]’
# 3698 |         return g_toc[cdtracks].bTrack;
#      |                ~~~~~^~~~~~~~~~
cdrkit-1.1.11/icedax/toc.c: scope_hint: In function ‘FixupTOC’
cdrkit-1.1.11/icedax/toc.c:3323:14: note: while referencing ‘g_toc’
# 3323 | static TOC_t g_toc [MAXTRK+1]; /* hidden track + 100 regular tracks */
#      |              ^~~~~
# 3696|   long LastTrack(void)
# 3697|   {
# 3698|-> 	return g_toc[cdtracks].bTrack;
# 3699|   }
# 3700|   

Error: COMPILER_WARNING: [#def237]
cdrkit-1.1.11/wodim/drv_mmc.c:51: included_from: Included from here.
cdrkit-1.1.11/wodim/drv_mmc.c: scope_hint: In function ‘drivemode_plextor’
cdrkit-1.1.11/include/intcvt.h:41:48: warning[-Warray-bounds=]: array subscript 2 is above array bounds of ‘Uchar[2]’
#   41 | #define i_to_2_byte(a, i)       (((Uchar *)(a))[0] = ((i) >> 8) & 0xFF,\
#      |                                  ~~~~~~~~~~~~~~^~~
cdrkit-1.1.11/libusal/usal/usalcmd.h:56: included_from: Included from here.
cdrkit-1.1.11/wodim/drv_mmc.c:54: included_from: Included from here.
cdrkit-1.1.11/libusal/usal/scsicdb.h:125:17: note: while referencing ‘count’
#  125 |         Uchar   count[2];       /* transfer length */
#      |                 ^~~~~
#   39|   #endif
#   40|   
#   41|-> #define	i_to_2_byte(a, i)	(((Uchar *)(a))[0] = ((i) >> 8) & 0xFF,\
#   42|   				    ((Uchar *)(a))[1] = (i) & 0xFF)
#   43|   

Error: COMPILER_WARNING: [#def238]
cdrkit-1.1.11/librols/stdio/schilyio.h:40: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/fcons.c:32: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/fcons.c: scope_hint: In function ‘_fcons64’
cdrkit-1.1.11/include/schily.h:97:33: warning[-Wold-style-definition]: old-style function definition
#   97 | #       define  _fcons          _fcons64
#      |                                 ^~~~~~~~
cdrkit-1.1.11/librols/stdio/fcons.c:68:1: note: in expansion of macro ‘_fcons’
#   68 | _fcons(fd, f, flag)
#      | ^~~~~~
#   95|   
#   96|   #if	defined(HAVE_LARGEFILES)
#   97|-> #	define	_fcons		_fcons64
#   98|   #	define	fdup		fdup64
#   99|   #	define	fileluopen	fileluopen64

Error: COMPILER_WARNING: [#def239]
cdrkit-1.1.11/librols/stdio/schilyio.h:40: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/fdup.c:32: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/fdup.c: scope_hint: In function ‘fdup64’
cdrkit-1.1.11/include/schily.h:98:33: warning[-Wold-style-definition]: old-style function definition
#   98 | #       define  fdup            fdup64
#      |                                 ^~~~~~
cdrkit-1.1.11/librols/stdio/fdup.c:40:1: note: in expansion of macro ‘fdup’
#   40 | fdup(f)
#      | ^~~~
#   96|   #if	defined(HAVE_LARGEFILES)
#   97|   #	define	_fcons		_fcons64
#   98|-> #	define	fdup		fdup64
#   99|   #	define	fileluopen	fileluopen64
#  100|   #	define	fileopen	fileopen64

Error: COMPILER_WARNING: [#def240]
cdrkit-1.1.11/librols/stdio/schilyio.h:40: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/fileluopen.c:32: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/fileluopen.c: scope_hint: In function ‘fileluopen64’
cdrkit-1.1.11/include/schily.h:99:33: warning[-Wold-style-definition]: old-style function definition
#   99 | #       define  fileluopen      fileluopen64
#      |                                 ^~~~~~~~~~~~
cdrkit-1.1.11/librols/stdio/fileluopen.c:56:1: note: in expansion of macro ‘fileluopen’
#   56 | fileluopen(f, mode)
#      | ^~~~~~~~~~
#   97|   #	define	_fcons		_fcons64
#   98|   #	define	fdup		fdup64
#   99|-> #	define	fileluopen	fileluopen64
#  100|   #	define	fileopen	fileopen64
#  101|   #	define	filemopen	filemopen64

Error: COMPILER_WARNING: [#def241]
cdrkit-1.1.11/librols/stdio/schilyio.h:40: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/fileopen.c:32: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/fileopen.c: scope_hint: In function ‘fileopen64’
cdrkit-1.1.11/include/schily.h:100:33: warning[-Wold-style-definition]: old-style function definition
#  100 | #       define  fileopen        fileopen64
#      |                                 ^~~~~~~~~~
cdrkit-1.1.11/librols/stdio/fileopen.c:35:1: note: in expansion of macro ‘fileopen’
#   35 | fileopen(name, mode)
#      | ^~~~~~~~
#   98|   #	define	fdup		fdup64
#   99|   #	define	fileluopen	fileluopen64
#  100|-> #	define	fileopen	fileopen64
#  101|   #	define	filemopen	filemopen64
#  102|   #	define	filepos		filepos64

Error: COMPILER_WARNING: [#def242]
cdrkit-1.1.11/librols/stdio/schilyio.h:40: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/filepos.c:32: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/filepos.c: scope_hint: In function ‘filepos64’
cdrkit-1.1.11/include/schily.h:102:33: warning[-Wold-style-definition]: old-style function definition
#  102 | #       define  filepos         filepos64
#      |                                 ^~~~~~~~~
cdrkit-1.1.11/librols/stdio/filepos.c:40:1: note: in expansion of macro ‘filepos’
#   40 | filepos(f)
#      | ^~~~~~~
#  100|   #	define	fileopen	fileopen64
#  101|   #	define	filemopen	filemopen64
#  102|-> #	define	filepos		filepos64
#  103|   #	define	filereopen	filereopen64
#  104|   #	define	fileseek	fileseek64

Error: COMPILER_WARNING: [#def243]
cdrkit-1.1.11/librols/stdio/schilyio.h:40: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/filereopen.c:34: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/filereopen.c: scope_hint: In function ‘filereopen64’
cdrkit-1.1.11/include/schily.h:103:33: warning[-Wold-style-definition]: old-style function definition
#  103 | #       define  filereopen      filereopen64
#      |                                 ^~~~~~~~~~~~
cdrkit-1.1.11/librols/stdio/filereopen.c:70:1: note: in expansion of macro ‘filereopen’
#   70 | filereopen(name, mode, fp)
#      | ^~~~~~~~~~
#  101|   #	define	filemopen	filemopen64
#  102|   #	define	filepos		filepos64
#  103|-> #	define	filereopen	filereopen64
#  104|   #	define	fileseek	fileseek64
#  105|   #	define	filesize	filesize64

Error: COMPILER_WARNING: [#def244]
cdrkit-1.1.11/librols/stdio/schilyio.h:40: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/fileseek.c:32: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/fileseek.c: scope_hint: In function ‘fileseek64’
cdrkit-1.1.11/include/schily.h:104:33: warning[-Wold-style-definition]: old-style function definition
#  104 | #       define  fileseek        fileseek64
#      |                                 ^~~~~~~~~~
cdrkit-1.1.11/librols/stdio/fileseek.c:42:1: note: in expansion of macro ‘fileseek’
#   42 | fileseek(f, pos)
#      | ^~~~~~~~
#  102|   #	define	filepos		filepos64
#  103|   #	define	filereopen	filereopen64
#  104|-> #	define	fileseek	fileseek64
#  105|   #	define	filesize	filesize64
#  106|   #	define	filestat	filestat64

Error: COMPILER_WARNING: [#def245]
cdrkit-1.1.11/librols/stdio/schilyio.h:40: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/filesize.c:32: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/filesize.c: scope_hint: In function ‘filesize64’
cdrkit-1.1.11/include/schily.h:105:33: warning[-Wold-style-definition]: old-style function definition
#  105 | #       define  filesize        filesize64
#      |                                 ^~~~~~~~~~
cdrkit-1.1.11/librols/stdio/filesize.c:36:1: note: in expansion of macro ‘filesize’
#   36 | filesize(f)
#      | ^~~~~~~~
#  103|   #	define	filereopen	filereopen64
#  104|   #	define	fileseek	fileseek64
#  105|-> #	define	filesize	filesize64
#  106|   #	define	filestat	filestat64
#  107|   #	define	_openfd		_openfd64

Error: COMPILER_WARNING: [#def246]
cdrkit-1.1.11/librols/stdio/schilyio.h:40: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/filestat.c:32: included_from: Included from here.
cdrkit-1.1.11/librols/stdio/filestat.c: scope_hint: In function ‘filestat64’
cdrkit-1.1.11/include/schily.h:106:33: warning[-Wold-style-definition]: old-style function definition
#  106 | #       define  filestat        filestat64
#      |                                 ^~~~~~~~~~
cdrkit-1.1.11/librols/stdio/filestat.c:36:1: note: in expansion of macro ‘filestat’
#   36 | filestat(f, stbuf)
#      | ^~~~~~~~
#  104|   #	define	fileseek	fileseek64
#  105|   #	define	filesize	filesize64
#  106|-> #	define	filestat	filestat64
#  107|   #	define	_openfd		_openfd64
#  108|   #endif

Error: CPPCHECK_WARNING (CWE-457): [#def247]
cdrkit-1.1.11/include/test_VA_LIST_IS_ARRAY.c:19: error[uninitvar]: Uninitialized variable: b
#   17|   va_list a, b;
#   18|   
#   19|-> a = b;
#   20|   ; return 0; }
#   21|   

Error: CPPCHECK_WARNING (CWE-664): [#def248]
cdrkit-1.1.11/include/test_VA_LIST_IS_ARRAY.c:19: error[va_list_usedBeforeStarted]: va_list 'a' used before va_start() was called.
#   17|   va_list a, b;
#   18|   
#   19|-> a = b;
#   20|   ; return 0; }
#   21|   

Error: CPPCHECK_WARNING (CWE-664): [#def249]
cdrkit-1.1.11/include/test_VA_LIST_IS_ARRAY.c:19: error[va_list_usedBeforeStarted]: va_list 'b' used before va_start() was called.
#   17|   va_list a, b;
#   18|   
#   19|-> a = b;
#   20|   ; return 0; }
#   21|   

Error: COMPILER_WARNING: [#def250]
cdrkit-1.1.11/libedc/edc_ecc.c:247:32: warning[-Warray-parameter=]: argument 1 of type ‘unsigned char[2352]’ with mismatched bound
#  247 | int do_encode_L2(unsigned char inout[(12 + 4 + L2_RAW+4+8+L2_Q+L2_P)],
#      |                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cdrkit-1.1.11/libedc/edc_ecc.c:45: included_from: Included from here.
cdrkit-1.1.11/libedc/ecc.h:98:33: note: previously declared as ‘unsigned char *’
#   98 | int do_encode_L2(unsigned char *inout, int sectortype, unsigned address);
#      |                  ~~~~~~~~~~~~~~~^~~~~
#  245|   
#  246|   /* Layer 2 Product code en/decoder */
#  247|-> int do_encode_L2(unsigned char inout[(12 + 4 + L2_RAW+4+8+L2_Q+L2_P)], 
#  248|   					  int sectortype, unsigned address);
#  249|   

Error: COMPILER_WARNING: [#def251]
cdrkit-1.1.11/libedc/edc_ecc.c:251:28: warning[-Warray-parameter=]: argument 1 of type ‘unsigned char[2352]’ with mismatched bound
#  251 | do_encode_L2(unsigned char inout[(12 + 4 + L2_RAW+4+8+L2_Q+L2_P)],
#      |              ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cdrkit-1.1.11/libedc/ecc.h:98:33: note: previously declared as ‘unsigned char *’
#   98 | int do_encode_L2(unsigned char *inout, int sectortype, unsigned address);
#      |                  ~~~~~~~~~~~~~~~^~~~~
#  249|   
#  250|   int
#  251|-> do_encode_L2(unsigned char inout[(12 + 4 + L2_RAW+4+8+L2_Q+L2_P)], 
#  252|                int sectortype, unsigned address)
#  253|   {

Error: CPPCHECK_WARNING (CWE-823): [#def252]
cdrkit-1.1.11/libedc/edc_ecc.c:360: error[arrayIndexOutOfBounds]: Array 'inout[32]' accessed at index 2323, which is out of bounds.
#  358|   		unsigned char data;
#  359|   
#  360|-> 		data = inout[i];
#  361|   		if (data != 0) {
#  362|   			unsigned char base = rs_l12_log[data];

Error: COMPILER_WARNING (CWE-1164): [#def253]
cdrkit-1.1.11/libedc/edc_ecc.c:597:5: warning[-Wunused-function]: ‘do_decode_L1’ defined but not used
#  597 | int do_decode_L1(unsigned char in[(L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR],
#      |     ^~~~~~~~~~~~
#  595|   static /* XXX should be non static XXX*/ 
#  596|   
#  597|-> int do_decode_L1(unsigned char in[(L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR], 
#  598|                    unsigned char out[L1_RAW*FRAMES_PER_SECTOR], 
#  599|                    int delay1, int delay2, int delay3, int permute)

Error: COMPILER_WARNING (CWE-1164): [#def254]
cdrkit-1.1.11/libedc/edc_ecc.c:677:12: warning[-Wunused-function]: ‘do_decode_L2’ defined but not used
#  677 | static int do_decode_L2(unsigned char in[(L2_RAW+L2_Q+L2_P)],
#      |            ^~~~~~~~~~~~
#  675|   								unsigned char out[L2_RAW]);
#  676|   
#  677|-> static int do_decode_L2(unsigned char in[(L2_RAW+L2_Q+L2_P)], 
#  678|                           unsigned char out[L2_RAW])
#  679|   {

Error: CPPCHECK_WARNING (CWE-476): [#def255]
cdrkit-1.1.11/libedc/edcspeed.c:41: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: sect
#   39|   	//memset(sect, 0, sizeof(sect));
#   40|   	for (i=0; i < 2352; ) {
#   41|-> 		sect[i++] = 'J';
#   42|   		sect[i++] = 'S';
#   43|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def256]
cdrkit-1.1.11/libedc/edcspeed.c:41:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘sect’
cdrkit-1.1.11/libedc/edcspeed.c:33:16: acquire_memory: this call could return NULL
cdrkit-1.1.11/libedc/edcspeed.c:40:19: branch_true: following ‘true’ branch (when ‘i != 2352’)...
cdrkit-1.1.11/libedc/edcspeed.c:41:22: branch_true: ...to here
cdrkit-1.1.11/libedc/edcspeed.c:41:17: danger: ‘sect + (sizetype)i’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   39|   	//memset(sect, 0, sizeof(sect));
#   40|   	for (i=0; i < 2352; ) {
#   41|-> 		sect[i++] = 'J';
#   42|   		sect[i++] = 'S';
#   43|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def257]
cdrkit-1.1.11/libedc/edcspeed.c:42: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: sect
#   40|   	for (i=0; i < 2352; ) {
#   41|   		sect[i++] = 'J';
#   42|-> 		sect[i++] = 'S';
#   43|   	}
#   44|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def258]
cdrkit-1.1.11/libedc/edcspeed.c:66:16: warning[-Wanalyzer-malloc-leak]: leak of ‘sect’
cdrkit-1.1.11/libedc/edcspeed.c:33:16: acquire_memory: allocated here
cdrkit-1.1.11/libedc/edcspeed.c:40:19: branch_true: following ‘true’ branch (when ‘i != 2352’)...
cdrkit-1.1.11/libedc/edcspeed.c:41:22: branch_true: ...to here
cdrkit-1.1.11/libedc/edcspeed.c:40:19: branch_true: following ‘true’ branch (when ‘i != 2352’)...
cdrkit-1.1.11/libedc/edcspeed.c:41:22: branch_true: ...to here
cdrkit-1.1.11/libedc/edcspeed.c:46:19: branch_true: following ‘true’ branch (when ‘i != 750000000’)...
cdrkit-1.1.11/libedc/edcspeed.c:57:25: branch_true: ...to here
cdrkit-1.1.11/libedc/edcspeed.c:66:16: danger: ‘sect’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   64|   	printf("%d sectors/s\n", i/secs);
#   65|   	printf("speed: %5.2fx\n", (1.0*i)/750.0);
#   66|-> 	return ((i+74)/75) / secs ;
#   67|   }
#   68|   

Error: GCC_ANALYZER_WARNING (CWE-835): [#def259]
cdrkit-1.1.11/libhfs_iso/hfs.c:404:10: warning[-Wanalyzer-infinite-loop]: infinite loop
cdrkit-1.1.11/libhfs_iso/hfs.c:404:10: danger: infinite loop here
cdrkit-1.1.11/libhfs_iso/hfs.c:404:10: branch_true: if it ever follows ‘true’ branch, it will always do so...
cdrkit-1.1.11/libhfs_iso/hfs.c:403:1: branch_true: ...to here
#  402|   void hfs_umountall()
#  403|   {
#  404|->   while (hfs_mounts)
#  405|   #ifdef APPLE_HYB
#  406|       continue;

Error: CPPCHECK_WARNING (CWE-682): [#def260]
cdrkit-1.1.11/libhfs_iso/hfs.c:691: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  689|   
#  690|     /* hfs_hdr is immediately after the hfs_map */
#  691|->   hce->hfs_hdr = hce->hfs_map + hce->hfs_map_size*HFS_BLOCKSZ;
#  692|   
#  693|     /* size needed in HFS_BLOCKSZ blocks for later use */

Error: COMPILER_WARNING: [#def261]
cdrkit-1.1.11/librols/astoi.c: scope_hint: In function ‘astoi’
cdrkit-1.1.11/librols/astoi.c:77:1: warning[-Wold-style-definition]: old-style function definition
#   77 | astoi(s, i)
#      | ^~~~~
#   75|   
#   76|   EXPORT char *
#   77|-> astoi(s, i)
#   78|   	const char *s;
#   79|   	int *i;

Error: COMPILER_WARNING: [#def262]
cdrkit-1.1.11/librols/astoi.c:77:1: warning[-Wold-style-definition]: old-style function definition
#   75|   
#   76|   EXPORT char *
#   77|-> astoi(s, i)
#   78|   	const char *s;
#   79|   	int *i;

Error: COMPILER_WARNING: [#def263]
cdrkit-1.1.11/librols/astoi.c: scope_hint: In function ‘astol’
cdrkit-1.1.11/librols/astoi.c:90:1: warning[-Wold-style-definition]: old-style function definition
#   90 | astol(s, l)
#      | ^~~~~
#   88|   
#   89|   EXPORT char *
#   90|-> astol(s, l)
#   91|   	register const char *s;
#   92|   	long *l;

Error: COMPILER_WARNING: [#def264]
cdrkit-1.1.11/librols/astoi.c:90:1: warning[-Wold-style-definition]: old-style function definition
#   88|   
#   89|   EXPORT char *
#   90|-> astol(s, l)
#   91|   	register const char *s;
#   92|   	long *l;

Error: COMPILER_WARNING: [#def265]
cdrkit-1.1.11/librols/astoi.c: scope_hint: In function ‘astolb’
cdrkit-1.1.11/librols/astoi.c:98:1: warning[-Wold-style-definition]: old-style function definition
#   98 | astolb(s, l, base)
#      | ^~~~~~
#   96|   
#   97|   EXPORT char *
#   98|-> astolb(s, l, base)
#   99|   	register const char *s;
#  100|   	long *l;

Error: COMPILER_WARNING: [#def266]
cdrkit-1.1.11/librols/astoi.c:98:1: warning[-Wold-style-definition]: old-style function definition
#   96|   
#   97|   EXPORT char *
#   98|-> astolb(s, l, base)
#   99|   	register const char *s;
#  100|   	long *l;

Error: COMPILER_WARNING: [#def267]
cdrkit-1.1.11/librols/astoll.c: scope_hint: In function ‘astoll’
cdrkit-1.1.11/librols/astoll.c:59:1: warning[-Wold-style-definition]: old-style function definition
#   59 | astoll(s, l)
#      | ^~~~~~
#   57|   
#   58|   char *
#   59|-> astoll(s, l)
#   60|   	register const char *s;
#   61|   	Llong *l;

Error: COMPILER_WARNING: [#def268]
cdrkit-1.1.11/librols/astoll.c:59:1: warning[-Wold-style-definition]: old-style function definition
#   57|   
#   58|   char *
#   59|-> astoll(s, l)
#   60|   	register const char *s;
#   61|   	Llong *l;

Error: COMPILER_WARNING: [#def269]
cdrkit-1.1.11/librols/astoll.c: scope_hint: In function ‘astollb’
cdrkit-1.1.11/librols/astoll.c:67:1: warning[-Wold-style-definition]: old-style function definition
#   67 | astollb(s, l, base)
#      | ^~~~~~~
#   65|   
#   66|   char *
#   67|-> astollb(s, l, base)
#   68|   	register const char *s;
#   69|   	Llong *l;

Error: COMPILER_WARNING: [#def270]
cdrkit-1.1.11/librols/astoll.c:67:1: warning[-Wold-style-definition]: old-style function definition
#   65|   
#   66|   char *
#   67|-> astollb(s, l, base)
#   68|   	register const char *s;
#   69|   	Llong *l;

Error: COMPILER_WARNING: [#def271]
cdrkit-1.1.11/librols/astoull.c: scope_hint: In function ‘astoull’
cdrkit-1.1.11/librols/astoull.c:76:1: warning[-Wold-style-definition]: old-style function definition
#   76 | astoull(s, l)
#      | ^~~~~~~
#   74|   
#   75|   EXPORT char *
#   76|-> astoull(s, l)
#   77|   	register const char *s;
#   78|   	Ullong *l;

Error: COMPILER_WARNING: [#def272]
cdrkit-1.1.11/librols/astoull.c:76:1: warning[-Wold-style-definition]: old-style function definition
#   74|   
#   75|   EXPORT char *
#   76|-> astoull(s, l)
#   77|   	register const char *s;
#   78|   	Ullong *l;

Error: COMPILER_WARNING: [#def273]
cdrkit-1.1.11/librols/astoull.c: scope_hint: In function ‘astoullb’
cdrkit-1.1.11/librols/astoull.c:84:1: warning[-Wold-style-definition]: old-style function definition
#   84 | astoullb(s, l, base)
#      | ^~~~~~~~
#   82|   
#   83|   EXPORT char *
#   84|-> astoullb(s, l, base)
#   85|   	register const char *s;
#   86|   	Ullong *l;

Error: COMPILER_WARNING: [#def274]
cdrkit-1.1.11/librols/astoull.c:84:1: warning[-Wold-style-definition]: old-style function definition
#   82|   
#   83|   EXPORT char *
#   84|-> astoullb(s, l, base)
#   85|   	register const char *s;
#   86|   	Ullong *l;

Error: COMPILER_WARNING: [#def275]
cdrkit-1.1.11/librols/cmpbytes.c: scope_hint: In function ‘cmpbytes’
cdrkit-1.1.11/librols/cmpbytes.c:41:1: warning[-Wold-style-definition]: old-style function definition
#   41 | cmpbytes(fromp, top, cnt)
#      | ^~~~~~~~
#   39|   
#   40|   EXPORT int
#   41|-> cmpbytes(fromp, top, cnt)
#   42|   	const void	*fromp;
#   43|   	const void	*top;

Error: COMPILER_WARNING: [#def276]
cdrkit-1.1.11/librols/cmpbytes.c:41:1: warning[-Wold-style-definition]: old-style function definition
#   39|   
#   40|   EXPORT int
#   41|-> cmpbytes(fromp, top, cnt)
#   42|   	const void	*fromp;
#   43|   	const void	*top;

Error: COMPILER_WARNING: [#def277]
cdrkit-1.1.11/librols/comerr.c: scope_hint: In function ‘on_comerr’
cdrkit-1.1.11/librols/comerr.c:66:1: warning[-Wold-style-definition]: old-style function definition
#   66 | on_comerr(func, arg)
#      | ^~~~~~~~~
#   64|   
#   65|   EXPORT	int
#   66|-> on_comerr(func, arg)
#   67|   	void	(*func) __PR((int, void *));
#   68|   	void	*arg;

Error: COMPILER_WARNING: [#def278]
cdrkit-1.1.11/librols/comerr.c:66:1: warning[-Wold-style-definition]: old-style function definition
#   64|   
#   65|   EXPORT	int
#   66|-> on_comerr(func, arg)
#   67|   	void	(*func) __PR((int, void *));
#   68|   	void	*arg;

Error: COMPILER_WARNING: [#def279]
cdrkit-1.1.11/librols/comerr.c: scope_hint: In function ‘_comerr’
cdrkit-1.1.11/librols/comerr.c:200:1: warning[-Wold-style-definition]: old-style function definition
#  200 | _comerr(exflg, err, msg, args)
#      | ^~~~~~~
#  198|   #endif
#  199|   LOCAL int
#  200|-> _comerr(exflg, err, msg, args)
#  201|   	int		exflg;
#  202|   	int		err;

Error: COMPILER_WARNING: [#def280]
cdrkit-1.1.11/librols/comerr.c:200:1: warning[-Wold-style-definition]: old-style function definition
#  198|   #endif
#  199|   LOCAL int
#  200|-> _comerr(exflg, err, msg, args)
#  201|   	int		exflg;
#  202|   	int		err;

Error: COMPILER_WARNING: [#def281]
cdrkit-1.1.11/librols/comerr.c: scope_hint: In function ‘comexit’
cdrkit-1.1.11/librols/comerr.c:231:1: warning[-Wold-style-definition]: old-style function definition
#  231 | comexit(err)
#      | ^~~~~~~
#  229|   
#  230|   EXPORT void
#  231|-> comexit(err)
#  232|   	int	err;
#  233|   {

Error: COMPILER_WARNING: [#def282]
cdrkit-1.1.11/librols/comerr.c:231:1: warning[-Wold-style-definition]: old-style function definition
#  229|   
#  230|   EXPORT void
#  231|-> comexit(err)
#  232|   	int	err;
#  233|   {

Error: COMPILER_WARNING: [#def283]
cdrkit-1.1.11/librols/comerr.c: scope_hint: In function ‘errmsgstr’
cdrkit-1.1.11/librols/comerr.c:243:1: warning[-Wold-style-definition]: old-style function definition
#  243 | errmsgstr(err)
#      | ^~~~~~~~~
#  241|   
#  242|   EXPORT char *
#  243|-> errmsgstr(err)
#  244|   	int	err;
#  245|   {

Error: COMPILER_WARNING: [#def284]
cdrkit-1.1.11/librols/comerr.c:243:1: warning[-Wold-style-definition]: old-style function definition
#  241|   
#  242|   EXPORT char *
#  243|-> errmsgstr(err)
#  244|   	int	err;
#  245|   {

Error: CPPCHECK_WARNING (CWE-682): [#def285]
cdrkit-1.1.11/librols/fexec.c:112: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  110|   	do {
#  111|   		p = va_arg(args, char *);
#  112|-> 		*pav++ = p;
#  113|   	} while (p != NULL);
#  114|   	va_end(args);

Error: CPPCHECK_WARNING (CWE-476): [#def286]
cdrkit-1.1.11/librols/fexec.c:112: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pav++
#  110|   	do {
#  111|   		p = va_arg(args, char *);
#  112|-> 		*pav++ = p;
#  113|   	} while (p != NULL);
#  114|   	va_end(args);

Error: CPPCHECK_WARNING (CWE-682): [#def287]
cdrkit-1.1.11/librols/fexec.c:169: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  167|   	do {
#  168|   		p = va_arg(args, char *);
#  169|-> 		*pav++ = p;
#  170|   	} while (p != NULL);
#  171|   	va_end(args);

Error: CPPCHECK_WARNING (CWE-476): [#def288]
cdrkit-1.1.11/librols/fexec.c:169: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pav++
#  167|   	do {
#  168|   		p = va_arg(args, char *);
#  169|-> 		*pav++ = p;
#  170|   	} while (p != NULL);
#  171|   	va_end(args);

Error: COMPILER_WARNING: [#def289]
cdrkit-1.1.11/librols/fexec.c: scope_hint: In function ‘rols_fexecv’
cdrkit-1.1.11/librols/fexec.c:180:1: warning[-Wold-style-definition]: old-style function definition
#  180 | rols_fexecv(name, in, out, err, ac, av)
#      | ^~~~~~~~~~~
#  178|   
#  179|   EXPORT int
#  180|-> rols_fexecv(name, in, out, err, ac, av)
#  181|   	const char *name;
#  182|   	FILE *in, *out, *err;

Error: COMPILER_WARNING: [#def290]
cdrkit-1.1.11/librols/fexec.c:180:1: warning[-Wold-style-definition]: old-style function definition
#  178|   
#  179|   EXPORT int
#  180|-> rols_fexecv(name, in, out, err, ac, av)
#  181|   	const char *name;
#  182|   	FILE *in, *out, *err;

Error: COMPILER_WARNING: [#def291]
cdrkit-1.1.11/librols/fexec.c: scope_hint: In function ‘rols_fexecve’
cdrkit-1.1.11/librols/fexec.c:191:1: warning[-Wold-style-definition]: old-style function definition
#  191 | rols_fexecve(name, in, out, err, av, env)
#      | ^~~~~~~~~~~~
#  189|   
#  190|   EXPORT int
#  191|-> rols_fexecve(name, in, out, err, av, env)
#  192|   	const char *name;
#  193|   	FILE *in, *out, *err;

Error: COMPILER_WARNING: [#def292]
cdrkit-1.1.11/librols/fexec.c:191:1: warning[-Wold-style-definition]: old-style function definition
#  189|   
#  190|   EXPORT int
#  191|-> rols_fexecve(name, in, out, err, av, env)
#  192|   	const char *name;
#  193|   	FILE *in, *out, *err;

Error: COMPILER_WARNING: [#def293]
cdrkit-1.1.11/librols/fexec.c: scope_hint: In function ‘fdcopy’
cdrkit-1.1.11/librols/fexec.c:357:1: warning[-Wold-style-definition]: old-style function definition
#  357 | fdcopy(fd1, fd2)
#      | ^~~~~~
#  355|   
#  356|   LOCAL void
#  357|-> fdcopy(fd1, fd2)
#  358|   	int	fd1;
#  359|   	int	fd2;

Error: COMPILER_WARNING: [#def294]
cdrkit-1.1.11/librols/fexec.c:357:1: warning[-Wold-style-definition]: old-style function definition
#  355|   
#  356|   LOCAL void
#  357|-> fdcopy(fd1, fd2)
#  358|   	int	fd1;
#  359|   	int	fd2;

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def295]
cdrkit-1.1.11/librols/fexec.c:361:9: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘fd2’
cdrkit-1.1.11/librols/fexec.c:191:1: enter_function: entry to ‘rols_fexecve’
cdrkit-1.1.11/librols/fexec.c:264:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/librols/fexec.c:265:24: branch_true: ...to here
cdrkit-1.1.11/librols/fexec.c:282:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/librols/fexec.c:283:17: branch_true: ...to here
cdrkit-1.1.11/librols/fexec.c:283:17: release_resource: first ‘close’ here
cdrkit-1.1.11/librols/fexec.c:295:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/librols/fexec.c:299:23: branch_true: ...to here
cdrkit-1.1.11/librols/fexec.c:330:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/librols/fexec.c:336:12: branch_false: ...to here
cdrkit-1.1.11/librols/fexec.c:336:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/librols/fexec.c:342:12: branch_false: ...to here
cdrkit-1.1.11/librols/fexec.c:342:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/librols/fexec.c:343:17: call_function: inlined call to ‘fdmove’ from ‘rols_fexecve’
#  359|   	int	fd2;
#  360|   {
#  361|-> 	close(fd2);
#  362|   	fcntl(fd1, F_DUPFD, fd2);
#  363|   }

Error: COMPILER_WARNING: [#def296]
cdrkit-1.1.11/librols/fexec.c: scope_hint: In function ‘fdmove’
cdrkit-1.1.11/librols/fexec.c:366:1: warning[-Wold-style-definition]: old-style function definition
#  366 | fdmove(fd1, fd2)
#      | ^~~~~~
#  364|   
#  365|   LOCAL void
#  366|-> fdmove(fd1, fd2)
#  367|   	int	fd1;
#  368|   	int	fd2;

Error: COMPILER_WARNING: [#def297]
cdrkit-1.1.11/librols/fexec.c:366:1: warning[-Wold-style-definition]: old-style function definition
#  364|   
#  365|   LOCAL void
#  366|-> fdmove(fd1, fd2)
#  367|   	int	fd1;
#  368|   	int	fd2;

Error: COMPILER_WARNING: [#def298]
cdrkit-1.1.11/librols/fexec.c: scope_hint: In function ‘getpath’
cdrkit-1.1.11/librols/fexec.c:383:1: warning[-Wold-style-definition]: old-style function definition
#  383 | getpath(env)
#      | ^~~~~~~
#  381|   
#  382|   LOCAL const char *
#  383|-> getpath(env)
#  384|   	char	* const *env;
#  385|   {

Error: COMPILER_WARNING: [#def299]
cdrkit-1.1.11/librols/fexec.c:383:1: warning[-Wold-style-definition]: old-style function definition
#  381|   
#  382|   LOCAL const char *
#  383|-> getpath(env)
#  384|   	char	* const *env;
#  385|   {

Error: COMPILER_WARNING: [#def300]
cdrkit-1.1.11/librols/fexec.c: scope_hint: In function ‘chkname’
cdrkit-1.1.11/librols/fexec.c:408:1: warning[-Wold-style-definition]: old-style function definition
#  408 | chkname(name, ev)
#      | ^~~~~~~
#  406|   
#  407|   LOCAL const char *
#  408|-> chkname(name, ev)
#  409|   	const char	*name;
#  410|   	const char	*ev;

Error: COMPILER_WARNING: [#def301]
cdrkit-1.1.11/librols/fexec.c:408:1: warning[-Wold-style-definition]: old-style function definition
#  406|   
#  407|   LOCAL const char *
#  408|-> chkname(name, ev)
#  409|   	const char	*name;
#  410|   	const char	*ev;

Error: COMPILER_WARNING: [#def302]
cdrkit-1.1.11/librols/getargs.c: scope_hint: In function ‘getfiles’
cdrkit-1.1.11/librols/getargs.c:162:1: warning[-Wold-style-definition]: old-style function definition
#  162 | getfiles(pac, pav, fmt)
#      | ^~~~~~~~
#  160|   +---------------------------------------------------------------------------*/
#  161|   EXPORT int
#  162|-> getfiles(pac, pav, fmt)
#  163|   	int		*pac;
#  164|   	char *const	*pav[];

Error: COMPILER_WARNING: [#def303]
cdrkit-1.1.11/librols/getargs.c:162:1: warning[-Wold-style-definition]: old-style function definition
#  160|   +---------------------------------------------------------------------------*/
#  161|   EXPORT int
#  162|-> getfiles(pac, pav, fmt)
#  163|   	int		*pac;
#  164|   	char *const	*pav[];

Error: COMPILER_WARNING: [#def304]
cdrkit-1.1.11/librols/getargs.c: scope_hint: In function ‘_getargs’
cdrkit-1.1.11/librols/getargs.c:186:1: warning[-Wold-style-definition]: old-style function definition
#  186 | _getargs(pac, pav, fmt, setargs, args)
#      | ^~~~~~~~
#  184|   +---------------------------------------------------------------------------*/
#  185|   /*LOCAL*/ int
#  186|-> _getargs(pac, pav, fmt, setargs, args)
#  187|   	register int		*pac;
#  188|   	register char	*const	**pav;

Error: COMPILER_WARNING: [#def305]
cdrkit-1.1.11/librols/getargs.c:186:1: warning[-Wold-style-definition]: old-style function definition
#  184|   +---------------------------------------------------------------------------*/
#  185|   /*LOCAL*/ int
#  186|-> _getargs(pac, pav, fmt, setargs, args)
#  187|   	register int		*pac;
#  188|   	register char	*const	**pav;

Error: COMPILER_WARNING: [#def306]
cdrkit-1.1.11/librols/getargs.c: scope_hint: In function ‘dofile’
cdrkit-1.1.11/librols/getargs.c:220:1: warning[-Wold-style-definition]: old-style function definition
#  220 | dofile(pac, pav, pargp)
#      | ^~~~~~
#  218|   +---------------------------------------------------------------------------*/
#  219|   LOCAL int
#  220|-> dofile(pac, pav, pargp)
#  221|   	register int		*pac;
#  222|   	register char *const	**pav;

Error: COMPILER_WARNING: [#def307]
cdrkit-1.1.11/librols/getargs.c:220:1: warning[-Wold-style-definition]: old-style function definition
#  218|   +---------------------------------------------------------------------------*/
#  219|   LOCAL int
#  220|-> dofile(pac, pav, pargp)
#  221|   	register int		*pac;
#  222|   	register char *const	**pav;

Error: COMPILER_WARNING: [#def308]
cdrkit-1.1.11/librols/getargs.c: scope_hint: In function ‘doflag’
cdrkit-1.1.11/librols/getargs.c:275:1: warning[-Wold-style-definition]: old-style function definition
#  275 | doflag(pac, pav, argp, fmt, setargs, oargs)
#      | ^~~~~~
#  273|   +---------------------------------------------------------------------------*/
#  274|   LOCAL int
#  275|-> doflag(pac, pav, argp, fmt, setargs, oargs)
#  276|   		int		*pac;
#  277|   		char	*const	**pav;

Error: COMPILER_WARNING: [#def309]
cdrkit-1.1.11/librols/getargs.c:275:1: warning[-Wold-style-definition]: old-style function definition
#  273|   +---------------------------------------------------------------------------*/
#  274|   LOCAL int
#  275|-> doflag(pac, pav, argp, fmt, setargs, oargs)
#  276|   		int		*pac;
#  277|   		char	*const	**pav;

Error: COMPILER_WARNING (CWE-563): [#def310]
cdrkit-1.1.11/librols/getargs.c:283:17: warning[-Wunused-but-set-variable]: variable ‘argstr’ set but not used
#  283 |         char    argstr[2];
#      |                 ^~~~~~
#  281|   		va_list		oargs;
#  282|   {
#  283|-> 	char	argstr[2];
#  284|   	long	val;
#  285|   	Llong	llval;

Error: COMPILER_WARNING: [#def311]
cdrkit-1.1.11/librols/getargs.c: scope_hint: In function ‘dosflags’
cdrkit-1.1.11/librols/getargs.c:666:1: warning[-Wold-style-definition]: old-style function definition
#  666 | dosflags(argp, fmt, setargs, oargs)
#      | ^~~~~~~~
#  664|   
#  665|   LOCAL int
#  666|-> dosflags(argp, fmt, setargs, oargs)
#  667|   	register const char	*argp;
#  668|   	register const char	*fmt;

Error: COMPILER_WARNING: [#def312]
cdrkit-1.1.11/librols/getargs.c:666:1: warning[-Wold-style-definition]: old-style function definition
#  664|   
#  665|   LOCAL int
#  666|-> dosflags(argp, fmt, setargs, oargs)
#  667|   	register const char	*argp;
#  668|   	register const char	*fmt;

Error: CPPCHECK_WARNING (CWE-457): [#def313]
cdrkit-1.1.11/librols/getargs.c:703: warning[uninitvar]: Uninitialized variable: rsf
#  701|   	while (*p) {
#  702|   		for (i = 0; i < nsf; i++) {
#  703|-> 			if (rsf[i].c == *p)
#  704|   				break;
#  705|   		}

Error: CPPCHECK_WARNING (CWE-664): [#def314]
cdrkit-1.1.11/librols/getargs.c:707: error[va_end_missing]: va_list 'args' was opened but not closed by va_end().
#  705|   		}
#  706|   		if (i >= MAXSF)
#  707|-> 			return (BADFLAG);
#  708|   		if (i == nsf) {
#  709|   			rsf[i].curarg = (void *)0;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def315]
cdrkit-1.1.11/librols/getargs.c:792:1: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cdrkit-1.1.11/librols/getargs.c:696:9: acquire_resource: ‘va_copy’ called here
cdrkit-1.1.11/librols/getargs.c:698:12: branch_false: following ‘false’ branch (when ‘setargs == 0’)...
 branch_false: ...to here
cdrkit-1.1.11/librols/getargs.c:719:16: branch_false: following ‘false’ branch...
 branch_false: ...to here
cdrkit-1.1.11/librols/getargs.c:792:1: danger: missing call to ‘va_end’ to match ‘va_copy’ at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  790|   	}
#  791|   	return (NOTAFLAG);
#  792|-> }
#  793|   
#  794|   /*---------------------------------------------------------------------------

Error: COMPILER_WARNING: [#def316]
cdrkit-1.1.11/librols/getargs.c: scope_hint: In function ‘checkfmt’
cdrkit-1.1.11/librols/getargs.c:802:1: warning[-Wold-style-definition]: old-style function definition
#  802 | checkfmt(fmt)
#      | ^~~~~~~~
#  800|   +---------------------------------------------------------------------------*/
#  801|   LOCAL int
#  802|-> checkfmt(fmt)
#  803|   	const char	*fmt;
#  804|   {

Error: COMPILER_WARNING: [#def317]
cdrkit-1.1.11/librols/getargs.c:802:1: warning[-Wold-style-definition]: old-style function definition
#  800|   +---------------------------------------------------------------------------*/
#  801|   LOCAL int
#  802|-> checkfmt(fmt)
#  803|   	const char	*fmt;
#  804|   {

Error: COMPILER_WARNING: [#def318]
cdrkit-1.1.11/librols/getargs.c: scope_hint: In function ‘checkeql’
cdrkit-1.1.11/librols/getargs.c:828:1: warning[-Wold-style-definition]: old-style function definition
#  828 | checkeql(str)
#      | ^~~~~~~~
#  826|   +---------------------------------------------------------------------------*/
#  827|   LOCAL int
#  828|-> checkeql(str)
#  829|   	register const char *str;
#  830|   {

Error: COMPILER_WARNING: [#def319]
cdrkit-1.1.11/librols/getargs.c:828:1: warning[-Wold-style-definition]: old-style function definition
#  826|   +---------------------------------------------------------------------------*/
#  827|   LOCAL int
#  828|-> checkeql(str)
#  829|   	register const char *str;
#  830|   {

Error: COMPILER_WARNING: [#def320]
cdrkit-1.1.11/librols/handlecond.c: scope_hint: In function ‘starthandlecond’
cdrkit-1.1.11/librols/handlecond.c:210:1: warning[-Wold-style-definition]: old-style function definition
#  210 | starthandlecond(sp)
#      | ^~~~~~~~~~~~~~~
#  208|   
#  209|   EXPORT void
#  210|-> starthandlecond(sp)
#  211|   	register SIGBLK *sp;
#  212|   {

Error: COMPILER_WARNING: [#def321]
cdrkit-1.1.11/librols/handlecond.c:210:1: warning[-Wold-style-definition]: old-style function definition
#  208|   
#  209|   EXPORT void
#  210|-> starthandlecond(sp)
#  211|   	register SIGBLK *sp;
#  212|   {

Error: COMPILER_WARNING: [#def322]
cdrkit-1.1.11/librols/handlecond.c: scope_hint: In function ‘unhandlecond’
cdrkit-1.1.11/librols/handlecond.c:252:1: warning[-Wold-style-definition]: old-style function definition
#  252 | unhandlecond(sp)
#      | ^~~~~~~~~~~~
#  250|   
#  251|   EXPORT void
#  252|-> unhandlecond(sp)
#  253|   	register SIGBLK *sp;
#  254|   {

Error: COMPILER_WARNING: [#def323]
cdrkit-1.1.11/librols/handlecond.c:252:1: warning[-Wold-style-definition]: old-style function definition
#  250|   
#  251|   EXPORT void
#  252|-> unhandlecond(sp)
#  253|   	register SIGBLK *sp;
#  254|   {

Error: COMPILER_WARNING: [#def324]
cdrkit-1.1.11/librols/movebytes.c: scope_hint: In function ‘movebytes’
cdrkit-1.1.11/librols/movebytes.c:41:1: warning[-Wold-style-definition]: old-style function definition
#   41 | movebytes(fromv, tov, cnt)
#      | ^~~~~~~~~
#   39|   
#   40|   EXPORT char *
#   41|-> movebytes(fromv, tov, cnt)
#   42|   	const void	*fromv;
#   43|   	void		*tov;

Error: COMPILER_WARNING: [#def325]
cdrkit-1.1.11/librols/movebytes.c:41:1: warning[-Wold-style-definition]: old-style function definition
#   39|   
#   40|   EXPORT char *
#   41|-> movebytes(fromv, tov, cnt)
#   42|   	const void	*fromv;
#   43|   	void		*tov;

Error: COMPILER_WARNING (CWE-563): [#def326]
cdrkit-1.1.11/librols/raisecond.c:61:34: warning[-Wunused-but-set-variable]: variable ‘ret’ set but not used
#   61 | #define eprints(a)      do { int ret; ret = write(STDERR_FILENO, (a), sizeof (a)-1); } while (0)
#      |                                  ^~~
cdrkit-1.1.11/librols/raisecond.c:176:9: note: in expansion of macro ‘eprints’
#  176 |         eprints("Condition not caught: "); eprintl(signame); eprints(".\n");
#      |         ^~~~~~~
#   59|   #define	STDERR_FILENO	2
#   60|   #endif
#   61|-> #define	eprints(a)	do { int ret; ret = write(STDERR_FILENO, (a), sizeof (a)-1); } while (0)
#   62|   #define	eprintl(a)	do { int ret; ret = write(STDERR_FILENO, (a), strlen(a)); } while (0)
#   63|   

Error: COMPILER_WARNING (CWE-563): [#def327]
cdrkit-1.1.11/librols/raisecond.c:62:34: warning[-Wunused-but-set-variable]: variable ‘ret’ set but not used
#   62 | #define eprintl(a)      do { int ret; ret = write(STDERR_FILENO, (a), strlen(a)); } while (0)
#      |                                  ^~~
cdrkit-1.1.11/librols/raisecond.c:176:44: note: in expansion of macro ‘eprintl’
#  176 |         eprints("Condition not caught: "); eprintl(signame); eprints(".\n");
#      |                                            ^~~~~~~
#   60|   #endif
#   61|   #define	eprints(a)	do { int ret; ret = write(STDERR_FILENO, (a), sizeof (a)-1); } while (0)
#   62|-> #define	eprintl(a)	do { int ret; ret = write(STDERR_FILENO, (a), strlen(a)); } while (0)
#   63|   
#   64|   #define	is_even(p)	((((long)(p)) & 1) == 0)

Error: COMPILER_WARNING: [#def328]
cdrkit-1.1.11/librols/raisecond.c: scope_hint: In function ‘raisecond’
cdrkit-1.1.11/librols/raisecond.c:107:1: warning[-Wold-style-definition]: old-style function definition
#  107 | raisecond(signame, arg2)
#      | ^~~~~~~~~
#  105|    */
#  106|   EXPORT void
#  107|-> raisecond(signame, arg2)
#  108|   	const char	*signame;
#  109|   	long		arg2;

Error: COMPILER_WARNING: [#def329]
cdrkit-1.1.11/librols/raisecond.c:107:1: warning[-Wold-style-definition]: old-style function definition
#  105|    */
#  106|   EXPORT void
#  107|-> raisecond(signame, arg2)
#  108|   	const char	*signame;
#  109|   	long		arg2;

Error: COMPILER_WARNING: [#def330]
cdrkit-1.1.11/librols/raisecond.c: scope_hint: In function ‘framehandle’
cdrkit-1.1.11/librols/raisecond.c:152:1: warning[-Wold-style-definition]: old-style function definition
#  152 | framehandle(sp, handlename, signame, arg2)
#      | ^~~~~~~~~~~
#  150|    */
#  151|   LOCAL BOOL
#  152|-> framehandle(sp, handlename, signame, arg2)
#  153|   	register SIGBLK *sp;
#  154|   	const char	*handlename;

Error: COMPILER_WARNING: [#def331]
cdrkit-1.1.11/librols/raisecond.c:152:1: warning[-Wold-style-definition]: old-style function definition
#  150|    */
#  151|   LOCAL BOOL
#  152|-> framehandle(sp, handlename, signame, arg2)
#  153|   	register SIGBLK *sp;
#  154|   	const char	*handlename;

Error: COMPILER_WARNING: [#def332]
cdrkit-1.1.11/librols/raisecond.c: scope_hint: In function ‘raiseabort’
cdrkit-1.1.11/librols/raisecond.c:173:1: warning[-Wold-style-definition]: old-style function definition
#  173 | raiseabort(signame)
#      | ^~~~~~~~~~
#  171|   
#  172|   LOCAL void
#  173|-> raiseabort(signame)
#  174|   	const	char	*signame;
#  175|   {

Error: COMPILER_WARNING: [#def333]
cdrkit-1.1.11/librols/raisecond.c:173:1: warning[-Wold-style-definition]: old-style function definition
#  171|   
#  172|   LOCAL void
#  173|-> raiseabort(signame)
#  174|   	const	char	*signame;
#  175|   {

Error: COMPILER_WARNING: [#def334]
cdrkit-1.1.11/librols/saveargs.c: scope_hint: In function ‘save_args’
cdrkit-1.1.11/librols/saveargs.c:57:1: warning[-Wold-style-definition]: old-style function definition
#   57 | save_args(ac, av)
#      | ^~~~~~~~~
#   55|   
#   56|   EXPORT void
#   57|-> save_args(ac, av)
#   58|   	int	ac;
#   59|   	char	*av[];

Error: COMPILER_WARNING: [#def335]
cdrkit-1.1.11/librols/saveargs.c:57:1: warning[-Wold-style-definition]: old-style function definition
#   55|   
#   56|   EXPORT void
#   57|-> save_args(ac, av)
#   58|   	int	ac;
#   59|   	char	*av[];

Error: COMPILER_WARNING: [#def336]
cdrkit-1.1.11/librols/saveargs.c: scope_hint: In function ‘set_progname’
cdrkit-1.1.11/librols/saveargs.c:99:1: warning[-Wold-style-definition]: old-style function definition
#   99 | set_progname(name)
#      | ^~~~~~~~~~~~
#   97|   
#   98|   EXPORT void
#   99|-> set_progname(name)
#  100|   	const char	*name;
#  101|   {

Error: COMPILER_WARNING: [#def337]
cdrkit-1.1.11/librols/saveargs.c:99:1: warning[-Wold-style-definition]: old-style function definition
#   97|   
#   98|   EXPORT void
#   99|-> set_progname(name)
#  100|   	const char	*name;
#  101|   {

Error: COMPILER_WARNING: [#def338]
cdrkit-1.1.11/librols/seterrno.c: scope_hint: In function ‘seterrno’
cdrkit-1.1.11/librols/seterrno.c:47:1: warning[-Wold-style-definition]: old-style function definition
#   47 | seterrno(err)
#      | ^~~~~~~~
#   45|   
#   46|   EXPORT int
#   47|-> seterrno(err)
#   48|   	int	err;
#   49|   {

Error: COMPILER_WARNING: [#def339]
cdrkit-1.1.11/librols/seterrno.c:47:1: warning[-Wold-style-definition]: old-style function definition
#   45|   
#   46|   EXPORT int
#   47|-> seterrno(err)
#   48|   	int	err;
#   49|   {

Error: COMPILER_WARNING: [#def340]
cdrkit-1.1.11/librols/spawn.c: scope_hint: In function ‘fspawnv’
cdrkit-1.1.11/librols/spawn.c:53:1: warning[-Wold-style-definition]: old-style function definition
#   53 | fspawnv(in, out, err, argc, argv)
#      | ^~~~~~~
#   51|   
#   52|   EXPORT int
#   53|-> fspawnv(in, out, err, argc, argv)
#   54|   	FILE	*in;
#   55|   	FILE	*out;

Error: COMPILER_WARNING: [#def341]
cdrkit-1.1.11/librols/spawn.c:53:1: warning[-Wold-style-definition]: old-style function definition
#   51|   
#   52|   EXPORT int
#   53|-> fspawnv(in, out, err, argc, argv)
#   54|   	FILE	*in;
#   55|   	FILE	*out;

Error: CPPCHECK_WARNING (CWE-682): [#def342]
cdrkit-1.1.11/librols/spawn.c:113: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  111|   	do {
#  112|   		p = va_arg(args, char *);
#  113|-> 		*pav++ = p;
#  114|   	} while (p != NULL);
#  115|   	va_end(args);

Error: CPPCHECK_WARNING (CWE-476): [#def343]
cdrkit-1.1.11/librols/spawn.c:113: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pav++
#  111|   	do {
#  112|   		p = va_arg(args, char *);
#  113|-> 		*pav++ = p;
#  114|   	} while (p != NULL);
#  115|   	va_end(args);

Error: COMPILER_WARNING: [#def344]
cdrkit-1.1.11/librols/spawn.c: scope_hint: In function ‘fspawnv_nowait’
cdrkit-1.1.11/librols/spawn.c:124:1: warning[-Wold-style-definition]: old-style function definition
#  124 | fspawnv_nowait(in, out, err, name, argc, argv)
#      | ^~~~~~~~~~~~~~
#  122|   
#  123|   EXPORT int
#  124|-> fspawnv_nowait(in, out, err, name, argc, argv)
#  125|   	FILE		*in;
#  126|   	FILE		*out;

Error: COMPILER_WARNING: [#def345]
cdrkit-1.1.11/librols/spawn.c:124:1: warning[-Wold-style-definition]: old-style function definition
#  122|   
#  123|   EXPORT int
#  124|-> fspawnv_nowait(in, out, err, name, argc, argv)
#  125|   	FILE		*in;
#  126|   	FILE		*out;

Error: COMPILER_WARNING: [#def346]
cdrkit-1.1.11/librols/spawn.c: scope_hint: In function ‘wait_chld’
cdrkit-1.1.11/librols/spawn.c:152:1: warning[-Wold-style-definition]: old-style function definition
#  152 | wait_chld(pid)
#      | ^~~~~~~~~
#  150|   
#  151|   EXPORT int
#  152|-> wait_chld(pid)
#  153|   	int	pid;
#  154|   {

Error: COMPILER_WARNING: [#def347]
cdrkit-1.1.11/librols/spawn.c:152:1: warning[-Wold-style-definition]: old-style function definition
#  150|   
#  151|   EXPORT int
#  152|-> wait_chld(pid)
#  153|   	int	pid;
#  154|   {

Error: COMPILER_WARNING: [#def348]
cdrkit-1.1.11/librols/stdio/cvmod.c: scope_hint: In function ‘_cvmod’
cdrkit-1.1.11/librols/stdio/cvmod.c:42:1: warning[-Wold-style-definition]: old-style function definition
#   42 | _cvmod(mode, omode, flag)
#      | ^~~~~~
#   40|   
#   41|   EXPORT int
#   42|-> _cvmod(mode, omode, flag)
#   43|   	const char	*mode;
#   44|   	int		*omode;

Error: COMPILER_WARNING: [#def349]
cdrkit-1.1.11/librols/stdio/cvmod.c:42:1: warning[-Wold-style-definition]: old-style function definition
#   40|   
#   41|   EXPORT int
#   42|-> _cvmod(mode, omode, flag)
#   43|   	const char	*mode;
#   44|   	int		*omode;

Error: COMPILER_WARNING: [#def350]
cdrkit-1.1.11/librols/stdio/fcons.c:68:1: warning[-Wold-style-definition]: old-style function definition
#   66|   
#   67|   EXPORT FILE *
#   68|-> _fcons(fd, f, flag)
#   69|   	register FILE	*fd;
#   70|   		int	f;

Error: COMPILER_WARNING: [#def351]
cdrkit-1.1.11/librols/stdio/fdown.c: scope_hint: In function ‘fdown’
cdrkit-1.1.11/librols/stdio/fdown.c:35:1: warning[-Wold-style-definition]: old-style function definition
#   35 | fdown(f)
#      | ^~~~~
#   33|   
#   34|   EXPORT int
#   35|-> fdown(f)
#   36|   	register FILE *f;
#   37|   {

Error: COMPILER_WARNING: [#def352]
cdrkit-1.1.11/librols/stdio/fdown.c:35:1: warning[-Wold-style-definition]: old-style function definition
#   33|   
#   34|   EXPORT int
#   35|-> fdown(f)
#   36|   	register FILE *f;
#   37|   {

Error: COMPILER_WARNING: [#def353]
cdrkit-1.1.11/librols/stdio/fdup.c:40:1: warning[-Wold-style-definition]: old-style function definition
#   38|   
#   39|   EXPORT FILE *
#   40|-> fdup(f)
#   41|   	register FILE  *f;
#   42|   {

Error: COMPILER_WARNING: [#def354]
cdrkit-1.1.11/librols/stdio/ffileread.c: scope_hint: In function ‘ffileread’
cdrkit-1.1.11/librols/stdio/ffileread.c:36:1: warning[-Wold-style-definition]: old-style function definition
#   36 | ffileread(f, buf, len)
#      | ^~~~~~~~~
#   34|   
#   35|   EXPORT int
#   36|-> ffileread(f, buf, len)
#   37|   	register FILE	*f;
#   38|   	void	*buf;

Error: COMPILER_WARNING: [#def355]
cdrkit-1.1.11/librols/stdio/ffileread.c:36:1: warning[-Wold-style-definition]: old-style function definition
#   34|   
#   35|   EXPORT int
#   36|-> ffileread(f, buf, len)
#   37|   	register FILE	*f;
#   38|   	void	*buf;

Error: COMPILER_WARNING: [#def356]
cdrkit-1.1.11/librols/stdio/ffilewrite.c: scope_hint: In function ‘ffilewrite’
cdrkit-1.1.11/librols/stdio/ffilewrite.c:35:1: warning[-Wold-style-definition]: old-style function definition
#   35 | ffilewrite(f, buf, len)
#      | ^~~~~~~~~~
#   33|   
#   34|   EXPORT int
#   35|-> ffilewrite(f, buf, len)
#   36|   	register FILE	*f;
#   37|   	void	*buf;

Error: COMPILER_WARNING: [#def357]
cdrkit-1.1.11/librols/stdio/ffilewrite.c:35:1: warning[-Wold-style-definition]: old-style function definition
#   33|   
#   34|   EXPORT int
#   35|-> ffilewrite(f, buf, len)
#   36|   	register FILE	*f;
#   37|   	void	*buf;

Error: COMPILER_WARNING: [#def358]
cdrkit-1.1.11/librols/stdio/fgetline.c: scope_hint: In function ‘rols_fgetline’
cdrkit-1.1.11/librols/stdio/fgetline.c:40:1: warning[-Wold-style-definition]: old-style function definition
#   40 | rols_fgetline(f, buf, len)
#      | ^~~~~~~~~~~~~
#   38|   
#   39|   EXPORT int
#   40|-> rols_fgetline(f, buf, len)
#   41|   	register	FILE	*f;
#   42|   			char	*buf;

Error: COMPILER_WARNING: [#def359]
cdrkit-1.1.11/librols/stdio/fgetline.c:40:1: warning[-Wold-style-definition]: old-style function definition
#   38|   
#   39|   EXPORT int
#   40|-> rols_fgetline(f, buf, len)
#   41|   	register	FILE	*f;
#   42|   			char	*buf;

Error: COMPILER_WARNING: [#def360]
cdrkit-1.1.11/librols/stdio/fgetline.c: scope_hint: In function ‘rols_getline’
cdrkit-1.1.11/librols/stdio/fgetline.c:79:1: warning[-Wold-style-definition]: old-style function definition
#   79 | rols_getline(buf, len)
#      | ^~~~~~~~~~~~
#   77|   
#   78|   EXPORT int
#   79|-> rols_getline(buf, len)
#   80|   	char	*buf;
#   81|   	int	len;

Error: COMPILER_WARNING: [#def361]
cdrkit-1.1.11/librols/stdio/fgetline.c:79:1: warning[-Wold-style-definition]: old-style function definition
#   77|   
#   78|   EXPORT int
#   79|-> rols_getline(buf, len)
#   80|   	char	*buf;
#   81|   	int	len;

Error: COMPILER_WARNING: [#def362]
cdrkit-1.1.11/librols/stdio/file_raise.c: scope_hint: In function ‘file_raise’
cdrkit-1.1.11/librols/stdio/file_raise.c:35:1: warning[-Wold-style-definition]: old-style function definition
#   35 | file_raise(f, flg)
#      | ^~~~~~~~~~
#   33|   
#   34|   EXPORT void
#   35|-> file_raise(f, flg)
#   36|   	register FILE *f;
#   37|   	int flg;

Error: COMPILER_WARNING: [#def363]
cdrkit-1.1.11/librols/stdio/file_raise.c:35:1: warning[-Wold-style-definition]: old-style function definition
#   33|   
#   34|   EXPORT void
#   35|-> file_raise(f, flg)
#   36|   	register FILE *f;
#   37|   	int flg;

Error: COMPILER_WARNING: [#def364]
cdrkit-1.1.11/librols/stdio/fileclose.c: scope_hint: In function ‘fileclose’
cdrkit-1.1.11/librols/stdio/fileclose.c:35:1: warning[-Wold-style-definition]: old-style function definition
#   35 | fileclose(f)
#      | ^~~~~~~~~
#   33|   
#   34|   EXPORT int
#   35|-> fileclose(f)
#   36|   	FILE	*f;
#   37|   {

Error: COMPILER_WARNING: [#def365]
cdrkit-1.1.11/librols/stdio/fileclose.c:35:1: warning[-Wold-style-definition]: old-style function definition
#   33|   
#   34|   EXPORT int
#   35|-> fileclose(f)
#   36|   	FILE	*f;
#   37|   {

Error: COMPILER_WARNING: [#def366]
cdrkit-1.1.11/librols/stdio/fileluopen.c:56:1: warning[-Wold-style-definition]: old-style function definition
#   54|    */
#   55|   EXPORT FILE *
#   56|-> fileluopen(f, mode)
#   57|   	int		f;
#   58|   	const char	*mode;

Error: COMPILER_WARNING: [#def367]
cdrkit-1.1.11/librols/stdio/fileopen.c:35:1: warning[-Wold-style-definition]: old-style function definition
#   33|   
#   34|   EXPORT FILE *
#   35|-> fileopen(name, mode)
#   36|   	const char	*name;
#   37|   	const char	*mode;

Error: COMPILER_WARNING: [#def368]
cdrkit-1.1.11/librols/stdio/filepos.c:40:1: warning[-Wold-style-definition]: old-style function definition
#   38|   
#   39|   EXPORT off_t
#   40|-> filepos(f)
#   41|   	register FILE	*f;
#   42|   {

Error: COMPILER_WARNING: [#def369]
cdrkit-1.1.11/librols/stdio/fileread.c: scope_hint: In function ‘fileread’
cdrkit-1.1.11/librols/stdio/fileread.c:85:1: warning[-Wold-style-definition]: old-style function definition
#   85 | fileread(f, buf, len)
#      | ^~~~~~~~
#   83|   
#   84|   EXPORT int
#   85|-> fileread(f, buf, len)
#   86|   	register FILE	*f;
#   87|   	void	*buf;

Error: COMPILER_WARNING: [#def370]
cdrkit-1.1.11/librols/stdio/fileread.c:85:1: warning[-Wold-style-definition]: old-style function definition
#   83|   
#   84|   EXPORT int
#   85|-> fileread(f, buf, len)
#   86|   	register FILE	*f;
#   87|   	void	*buf;

Error: COMPILER_WARNING: [#def371]
cdrkit-1.1.11/librols/stdio/filereopen.c:70:1: warning[-Wold-style-definition]: old-style function definition
#   68|   
#   69|   EXPORT FILE *
#   70|-> filereopen(name, mode, fp)
#   71|   	const char	*name;
#   72|   	const char 	*mode;

Error: COMPILER_WARNING: [#def372]
cdrkit-1.1.11/librols/stdio/fileseek.c:42:1: warning[-Wold-style-definition]: old-style function definition
#   40|   
#   41|   EXPORT int
#   42|-> fileseek(f, pos)
#   43|   	register FILE	*f;
#   44|   	off_t	pos;

Error: COMPILER_WARNING: [#def373]
cdrkit-1.1.11/librols/stdio/filesize.c:36:1: warning[-Wold-style-definition]: old-style function definition
#   34|   
#   35|   EXPORT off_t
#   36|-> filesize(f)
#   37|   	register FILE	*f;
#   38|   {

Error: COMPILER_WARNING: [#def374]
cdrkit-1.1.11/librols/stdio/filestat.c:36:1: warning[-Wold-style-definition]: old-style function definition
#   34|   
#   35|   EXPORT int
#   36|-> filestat(f, stbuf)
#   37|   	FILE		*f;
#   38|   	struct stat	*stbuf;

Error: COMPILER_WARNING: [#def375]
cdrkit-1.1.11/librols/stdio/filewrite.c: scope_hint: In function ‘filewrite’
cdrkit-1.1.11/librols/stdio/filewrite.c:86:1: warning[-Wold-style-definition]: old-style function definition
#   86 | filewrite(f, vbuf, len)
#      | ^~~~~~~~~
#   84|   
#   85|   EXPORT int
#   86|-> filewrite(f, vbuf, len)
#   87|   	register FILE	*f;
#   88|   	void	*vbuf;

Error: COMPILER_WARNING: [#def376]
cdrkit-1.1.11/librols/stdio/filewrite.c:86:1: warning[-Wold-style-definition]: old-style function definition
#   84|   
#   85|   EXPORT int
#   86|-> filewrite(f, vbuf, len)
#   87|   	register FILE	*f;
#   88|   	void	*vbuf;

Error: COMPILER_WARNING: [#def377]
cdrkit-1.1.11/librols/stdio/flag.c: scope_hint: In function ‘_more_flags’
cdrkit-1.1.11/librols/stdio/flag.c:48:1: warning[-Wold-style-definition]: old-style function definition
#   48 | _more_flags(fp)
#      | ^~~~~~~~~~~
#   46|   
#   47|   LOCAL int
#   48|-> _more_flags(fp)
#   49|   	FILE	*fp;
#   50|   {

Error: COMPILER_WARNING: [#def378]
cdrkit-1.1.11/librols/stdio/flag.c:48:1: warning[-Wold-style-definition]: old-style function definition
#   46|   
#   47|   LOCAL int
#   48|-> _more_flags(fp)
#   49|   	FILE	*fp;
#   50|   {

Error: COMPILER_WARNING: [#def379]
cdrkit-1.1.11/librols/stdio/flag.c: scope_hint: In function ‘_io_get_my_flag’
cdrkit-1.1.11/librols/stdio/flag.c:77:1: warning[-Wold-style-definition]: old-style function definition
#   77 | _io_get_my_flag(fp)
#      | ^~~~~~~~~~~~~~~
#   75|   
#   76|   EXPORT int
#   77|-> _io_get_my_flag(fp)
#   78|   	register FILE	*fp;
#   79|   {

Error: COMPILER_WARNING: [#def380]
cdrkit-1.1.11/librols/stdio/flag.c:77:1: warning[-Wold-style-definition]: old-style function definition
#   75|   
#   76|   EXPORT int
#   77|-> _io_get_my_flag(fp)
#   78|   	register FILE	*fp;
#   79|   {

Error: GCC_ANALYZER_WARNING (CWE-465): [#def381]
cdrkit-1.1.11/librols/stdio/flag.c:91:16: warning[-Wanalyzer-deref-before-check]: check of ‘fl’ for NULL after already dereferencing it
cdrkit-1.1.11/librols/stdio/flag.c:131:1: enter_function: entry to ‘_io_add_my_flag’
cdrkit-1.1.11/librols/stdio/flag.c:135:25: call_function: calling ‘_io_get_my_flag’ from ‘_io_add_my_flag’
#   89|   		return (fl->fl_flags);
#   90|   
#   91|-> 	while (fl && fl->fl_io != fp)
#   92|   		fl = fl->fl_next;
#   93|   

Error: COMPILER_WARNING: [#def382]
cdrkit-1.1.11/librols/stdio/flag.c: scope_hint: In function ‘_io_set_my_flag’
cdrkit-1.1.11/librols/stdio/flag.c:101:1: warning[-Wold-style-definition]: old-style function definition
#  101 | _io_set_my_flag(fp, flag)
#      | ^~~~~~~~~~~~~~~
#   99|   
#  100|   EXPORT void
#  101|-> _io_set_my_flag(fp, flag)
#  102|   	FILE	*fp;
#  103|   	int	flag;

Error: COMPILER_WARNING: [#def383]
cdrkit-1.1.11/librols/stdio/flag.c:101:1: warning[-Wold-style-definition]: old-style function definition
#   99|   
#  100|   EXPORT void
#  101|-> _io_set_my_flag(fp, flag)
#  102|   	FILE	*fp;
#  103|   	int	flag;

Error: COMPILER_WARNING: [#def384]
cdrkit-1.1.11/librols/stdio/flag.c: scope_hint: In function ‘_io_add_my_flag’
cdrkit-1.1.11/librols/stdio/flag.c:131:1: warning[-Wold-style-definition]: old-style function definition
#  131 | _io_add_my_flag(fp, flag)
#      | ^~~~~~~~~~~~~~~
#  129|   
#  130|   EXPORT void
#  131|-> _io_add_my_flag(fp, flag)
#  132|   	FILE	*fp;
#  133|   	int	flag;

Error: COMPILER_WARNING: [#def385]
cdrkit-1.1.11/librols/stdio/flag.c:131:1: warning[-Wold-style-definition]: old-style function definition
#  129|   
#  130|   EXPORT void
#  131|-> _io_add_my_flag(fp, flag)
#  132|   	FILE	*fp;
#  133|   	int	flag;

Error: COMPILER_WARNING: [#def386]
cdrkit-1.1.11/librols/stdio/fpipe.c: scope_hint: In function ‘fpipe’
cdrkit-1.1.11/librols/stdio/fpipe.c:35:1: warning[-Wold-style-definition]: old-style function definition
#   35 | fpipe(pipef)
#      | ^~~~~
#   33|   
#   34|   EXPORT int
#   35|-> fpipe(pipef)
#   36|   	FILE *pipef[];
#   37|   {

Error: COMPILER_WARNING: [#def387]
cdrkit-1.1.11/librols/stdio/fpipe.c:35:1: warning[-Wold-style-definition]: old-style function definition
#   33|   
#   34|   EXPORT int
#   35|-> fpipe(pipef)
#   36|   	FILE *pipef[];
#   37|   {

Error: COMPILER_WARNING: [#def388]
cdrkit-1.1.11/librols/stdio/niread.c: scope_hint: In function ‘_niread’
cdrkit-1.1.11/librols/stdio/niread.c:38:1: warning[-Wold-style-definition]: old-style function definition
#   38 | _niread(f, buf, count)
#      | ^~~~~~~
#   36|   
#   37|   EXPORT int
#   38|-> _niread(f, buf, count)
#   39|   	int	f;
#   40|   	void	*buf;

Error: COMPILER_WARNING: [#def389]
cdrkit-1.1.11/librols/stdio/niread.c:38:1: warning[-Wold-style-definition]: old-style function definition
#   36|   
#   37|   EXPORT int
#   38|-> _niread(f, buf, count)
#   39|   	int	f;
#   40|   	void	*buf;

Error: COMPILER_WARNING: [#def390]
cdrkit-1.1.11/librols/stdio/niwrite.c: scope_hint: In function ‘_niwrite’
cdrkit-1.1.11/librols/stdio/niwrite.c:38:1: warning[-Wold-style-definition]: old-style function definition
#   38 | _niwrite(f, buf, count)
#      | ^~~~~~~~
#   36|   
#   37|   EXPORT int
#   38|-> _niwrite(f, buf, count)
#   39|   	int	f;
#   40|   	void	*buf;

Error: COMPILER_WARNING: [#def391]
cdrkit-1.1.11/librols/stdio/niwrite.c:38:1: warning[-Wold-style-definition]: old-style function definition
#   36|   
#   37|   EXPORT int
#   38|-> _niwrite(f, buf, count)
#   39|   	int	f;
#   40|   	void	*buf;

Error: COMPILER_WARNING: [#def392]
cdrkit-1.1.11/librols/stdio/nixread.c: scope_hint: In function ‘_nixread’
cdrkit-1.1.11/librols/stdio/nixread.c:38:1: warning[-Wold-style-definition]: old-style function definition
#   38 | _nixread(f, buf, count)
#      | ^~~~~~~~
#   36|   
#   37|   EXPORT int
#   38|-> _nixread(f, buf, count)
#   39|   	int	f;
#   40|   	void	*buf;

Error: COMPILER_WARNING: [#def393]
cdrkit-1.1.11/librols/stdio/nixread.c:38:1: warning[-Wold-style-definition]: old-style function definition
#   36|   
#   37|   EXPORT int
#   38|-> _nixread(f, buf, count)
#   39|   	int	f;
#   40|   	void	*buf;

Error: COMPILER_WARNING: [#def394]
cdrkit-1.1.11/librols/stdio/nixwrite.c: scope_hint: In function ‘_nixwrite’
cdrkit-1.1.11/librols/stdio/nixwrite.c:38:1: warning[-Wold-style-definition]: old-style function definition
#   38 | _nixwrite(f, buf, count)
#      | ^~~~~~~~~
#   36|   
#   37|   EXPORT int
#   38|-> _nixwrite(f, buf, count)
#   39|   	int	f;
#   40|   	void	*buf;

Error: COMPILER_WARNING: [#def395]
cdrkit-1.1.11/librols/stdio/nixwrite.c:38:1: warning[-Wold-style-definition]: old-style function definition
#   36|   
#   37|   EXPORT int
#   38|-> _nixwrite(f, buf, count)
#   39|   	int	f;
#   40|   	void	*buf;

Error: COMPILER_WARNING: [#def396]
cdrkit-1.1.11/librols/stdio/openfd.c: scope_hint: In function ‘_openfd’
cdrkit-1.1.11/librols/stdio/openfd.c:39:1: warning[-Wold-style-definition]: old-style function definition
#   39 | _openfd(name, omode)
#      | ^~~~~~~
#   37|   
#   38|   EXPORT int
#   39|-> _openfd(name, omode)
#   40|   	const char	*name;
#   41|   	int		omode;

Error: COMPILER_WARNING: [#def397]
cdrkit-1.1.11/librols/stdio/openfd.c:39:1: warning[-Wold-style-definition]: old-style function definition
#   37|   
#   38|   EXPORT int
#   39|-> _openfd(name, omode)
#   40|   	const char	*name;
#   41|   	int		omode;

Error: COMPILER_WARNING: [#def398]
cdrkit-1.1.11/librols/stdio/peekc.c: scope_hint: In function ‘peekc’
cdrkit-1.1.11/librols/stdio/peekc.c:35:1: warning[-Wold-style-definition]: old-style function definition
#   35 | peekc(f)
#      | ^~~~~
#   33|   
#   34|   EXPORT int
#   35|-> peekc(f)
#   36|   	FILE *f;
#   37|   {

Error: COMPILER_WARNING: [#def399]
cdrkit-1.1.11/librols/stdio/peekc.c:35:1: warning[-Wold-style-definition]: old-style function definition
#   33|   
#   34|   EXPORT int
#   35|-> peekc(f)
#   36|   	FILE *f;
#   37|   {

Error: COMPILER_WARNING: [#def400]
cdrkit-1.1.11/librols/streql.c: scope_hint: In function ‘streql’
cdrkit-1.1.11/librols/streql.c:38:1: warning[-Wold-style-definition]: old-style function definition
#   38 | streql(a, b)
#      | ^~~~~~
#   36|   
#   37|   EXPORT int
#   38|-> streql(a, b)
#   39|   	const char	*a;
#   40|   	const char	*b;

Error: COMPILER_WARNING: [#def401]
cdrkit-1.1.11/librols/streql.c:38:1: warning[-Wold-style-definition]: old-style function definition
#   36|   
#   37|   EXPORT int
#   38|-> streql(a, b)
#   39|   	const char	*a;
#   40|   	const char	*b;

Error: COMPILER_WARNING: [#def402]
cdrkit-1.1.11/librols/swabbytes.c: scope_hint: In function ‘swabbytes’
cdrkit-1.1.11/librols/swabbytes.c:40:1: warning[-Wold-style-definition]: old-style function definition
#   40 | swabbytes(vp, cnt)
#      | ^~~~~~~~~
#   38|   
#   39|   EXPORT void
#   40|-> swabbytes(vp, cnt)
#   41|   		void	*vp;
#   42|   	register int	cnt;

Error: COMPILER_WARNING: [#def403]
cdrkit-1.1.11/librols/swabbytes.c:40:1: warning[-Wold-style-definition]: old-style function definition
#   38|   
#   39|   EXPORT void
#   40|-> swabbytes(vp, cnt)
#   41|   		void	*vp;
#   42|   	register int	cnt;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def404]
cdrkit-1.1.11/libunls/nls_file.c:97:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
cdrkit-1.1.11/libunls/nls_file.c:82:12: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
cdrkit-1.1.11/libunls/nls_file.c:90:13: branch_false: ...to here
cdrkit-1.1.11/libunls/nls_file.c:90:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libunls/nls_file.c:93:19: branch_false: ...to here
cdrkit-1.1.11/libunls/nls_file.c:93:19: acquire_resource: opened here
cdrkit-1.1.11/libunls/nls_file.c:93:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libunls/nls_file.c:98:25: branch_false: ...to here
cdrkit-1.1.11/libunls/nls_file.c:97:12: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   95|   
#   96|   	/* allocate memory for the forward conversion table */
#   97|-> 	if ((charset2uni = (struct unls_unicode *)
#   98|   			malloc(sizeof (struct unls_unicode) * NUM)) == NULL) {
#   99|   		free_mem(charset2uni, page_uni2charset);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def405]
cdrkit-1.1.11/libunls/nls_file.c:97:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
cdrkit-1.1.11/libunls/nls_file.c:82:12: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
cdrkit-1.1.11/libunls/nls_file.c:90:13: branch_false: ...to here
cdrkit-1.1.11/libunls/nls_file.c:90:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libunls/nls_file.c:93:19: branch_false: ...to here
cdrkit-1.1.11/libunls/nls_file.c:93:19: acquire_memory: allocated here
cdrkit-1.1.11/libunls/nls_file.c:93:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libunls/nls_file.c:98:25: branch_false: ...to here
cdrkit-1.1.11/libunls/nls_file.c:97:12: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   95|   
#   96|   	/* allocate memory for the forward conversion table */
#   97|-> 	if ((charset2uni = (struct unls_unicode *)
#   98|   			malloc(sizeof (struct unls_unicode) * NUM)) == NULL) {
#   99|   		free_mem(charset2uni, page_uni2charset);

Error: CPPCHECK_WARNING (CWE-404): [#def406]
cdrkit-1.1.11/libunls/nls_file.c:100: error[resourceLeak]: Resource leak: fp
#   98|   			malloc(sizeof (struct unls_unicode) * NUM)) == NULL) {
#   99|   		free_mem(charset2uni, page_uni2charset);
#  100|-> 		return (-1);
#  101|   	}
#  102|   

Error: COMPILER_WARNING (CWE-1164): [#def407]
cdrkit-1.1.11/libunls/nls_iconv.c:53:1: warning[-Wunused-function]: ‘inc_use_count’ defined but not used
#   53 | inc_use_count()
#      | ^~~~~~~~~~~~~
#   51|   
#   52|   static void
#   53|-> inc_use_count()
#   54|   {
#   55|   	MOD_INC_USE_COUNT;

Error: COMPILER_WARNING (CWE-1164): [#def408]
cdrkit-1.1.11/libunls/nls_iconv.c:59:1: warning[-Wunused-function]: ‘dec_use_count’ defined but not used
#   59 | dec_use_count()
#      | ^~~~~~~~~~~~~
#   57|   
#   58|   static void
#   59|-> dec_use_count()
#   60|   {
#   61|   	MOD_DEC_USE_COUNT;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def409]
cdrkit-1.1.11/libunls/nls_iconv.c:81:12: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open("UCS-2BE", charset)’
cdrkit-1.1.11/libunls/nls_iconv.c:71:12: branch_false: following ‘false’ branch (when ‘charset’ is non-NULL)...
cdrkit-1.1.11/libunls/nls_iconv.c:78:13: branch_false: ...to here
cdrkit-1.1.11/libunls/nls_iconv.c:78:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libunls/nls_iconv.c:81:24: branch_false: ...to here
cdrkit-1.1.11/libunls/nls_iconv.c:81:24: acquire_memory: allocated here
cdrkit-1.1.11/libunls/nls_iconv.c:81:12: danger: ‘iconv_open("UCS-2BE", charset)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   79|   		return -1;
#   80|   
#   81|-> 	if ((iconv_d = iconv_open("UCS-2BE", charset)) == (iconv_t) -1)
#   82|   		return -1;
#   83|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def410]
cdrkit-1.1.11/libunls/nls_iconv.c:86:12: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open("UCS-2BE", charset)’
cdrkit-1.1.11/libunls/nls_iconv.c:71:12: branch_false: following ‘false’ branch (when ‘charset’ is non-NULL)...
cdrkit-1.1.11/libunls/nls_iconv.c:78:13: branch_false: ...to here
cdrkit-1.1.11/libunls/nls_iconv.c:78:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libunls/nls_iconv.c:81:24: branch_false: ...to here
cdrkit-1.1.11/libunls/nls_iconv.c:81:24: acquire_memory: allocated here
cdrkit-1.1.11/libunls/nls_iconv.c:81:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libunls/nls_iconv.c:86:43: branch_false: ...to here
cdrkit-1.1.11/libunls/nls_iconv.c:86:12: danger: ‘iconv_open("UCS-2BE", charset)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   84|   
#   85|   	/* set up the table */
#   86|-> 	if ((table = (struct unls_table *)malloc(sizeof (struct unls_table)))
#   87|   							== NULL) {
#   88|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def411]
cdrkit-1.1.11/libusal/scsi-linux-ata.c:685:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
cdrkit-1.1.11/libusal/scsi-linux-ata.c:278:1: enter_function: entry to ‘scan_internal’
cdrkit-1.1.11/libusal/scsi-linux-ata.c:334:37: call_function: calling ‘sg_amapdev’ from ‘scan_internal’
#  683|   		}
#  684|   	} else {
#  685|-> 		strncpy(tmp, device, sizeof (tmp));
#  686|   	}
#  687|   	if (usalp->debug > 3) {

Error: COMPILER_WARNING: [#def412]
cdrkit-1.1.11/libusal/scsi-linux-sg.c:248: included_from: Included from here.
cdrkit-1.1.11/libusal/scsi-linux-ata.c: scope_hint: In function ‘sg_amapdev’
cdrkit-1.1.11/libusal/scsi-linux-ata.c:685:17: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 260 equals destination size
#  685 |                 strncpy(tmp, device, sizeof (tmp));
#      |                 ^
#  683|   		}
#  684|   	} else {
#  685|-> 		strncpy(tmp, device, sizeof (tmp));
#  686|   	}
#  687|   	if (usalp->debug > 3) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def413]
cdrkit-1.1.11/libusal/scsi-linux-ata.c:707:14: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
cdrkit-1.1.11/libusal/scsi-linux-ata.c:659:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libusal/scsi-linux-ata.c:693:16: branch_true: following ‘true’ branch...
cdrkit-1.1.11/libusal/scsi-linux-ata.c:693:16: release_memory: ‘0’ is NULL
cdrkit-1.1.11/libusal/scsi-linux-ata.c:693:16: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libusal/scsi-linux-ata.c:697:12: branch_false: ...to here
cdrkit-1.1.11/libusal/scsi-linux-ata.c:697:12: branch_false: following ‘false’ branch (when ‘i != 8’)...
cdrkit-1.1.11/libusal/scsi-linux-ata.c:698:18: branch_false: ...to here
cdrkit-1.1.11/libusal/scsi-linux-ata.c:697:13: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libusal/scsi-linux-ata.c:699:17: branch_false: ...to here
cdrkit-1.1.11/libusal/scsi-linux-ata.c:697:13: branch_false: following ‘false’ branch (when the strings are equal)...
cdrkit-1.1.11/libusal/scsi-linux-ata.c:707:22: branch_false: ...to here
cdrkit-1.1.11/libusal/scsi-linux-ata.c:707:22: release_memory: ‘0’ is NULL
cdrkit-1.1.11/libusal/scsi-linux-ata.c:707:14: danger: argument 1 (‘token[1]’) NULL where non-null expected
#  705|   		return (FALSE);
#  706|   	}
#  707|-> 	if (!(strcmp(token[ID_TOKEN_SUBSYSTEM], TOKEN_SUBSYSTEM_SCSI)) ||
#  708|   	    !(strcmp(token[ID_TOKEN_SUBSYSTEM], TOKEN_SUBSYSTEM_IDE))) {
#  709|   		h = CHARTOINT(((struct host *) token[ID_TOKEN_HOST])->host_no);

Error: COMPILER_WARNING (CWE-1164): [#def414]
cdrkit-1.1.11/libusal/scsihack.c:136: included_from: Included from here.
cdrkit-1.1.11/libusal/scsi-linux-sg.c:242:13: warning[-Wunused-function]: ‘get_max_secs’ declared ‘static’ but never defined
#  242 | static BOOL get_max_secs(char *dirpath, int *outval);
#      |             ^~~~~~~~~~~~
#  240|   int    sg_open_excl(char *device, int mode, BOOL beQuiet);
#  241|   
#  242|-> static BOOL get_max_secs(char *dirpath, int *outval);
#  243|   
#  244|   #if	defined(USE_PG) && !defined(USE_PG_ONLY)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def415]
cdrkit-1.1.11/libusal/scsi-linux-sg.c:263:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sg_open_excl(device, 2050, 0)’
cdrkit-1.1.11/libusal/scsi-linux-sg.c:377:1: enter_function: entry to ‘usalo_open’
cdrkit-1.1.11/libusal/scsi-linux-sg.c:391:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libusal/scsi-linux-sg.c:449:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libusal/scsi-linux-sg.c:475:12: branch_false: ...to here
cdrkit-1.1.11/libusal/scsi-linux-sg.c:475:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/libusal/scsi-linux-sg.c:487:21: call_function: calling ‘sg_open_excl’ from ‘usalo_open’
cdrkit-1.1.11/libusal/scsi-linux-sg.c:487:21: return_function: returning to ‘usalo_open’ from ‘sg_open_excl’
cdrkit-1.1.11/libusal/scsi-linux-sg.c:263:12: danger: ‘sg_open_excl(device, 2050, 0)’ leaks here; was opened at [(12)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/11)
#  261|          long interval = beQuiet ? 400000 : 1000000;
#  262|   
#  263|->        f = open(device, mode|O_EXCL);
#  264|          /* try to reopen locked/busy devices up to five times */
#  265|          for (i = 0; (i < 5) && (f == -1 && errno == EBUSY); i++) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def416]
cdrkit-1.1.11/libusal/scsi-linux-sg.c:1055:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cdrkit-1.1.11/libusal/scsi-linux-sg.c:1038:11: branch_true: following ‘true’ branch...
cdrkit-1.1.11/libusal/scsi-linux-sg.c:1042:23: branch_true: ...to here
cdrkit-1.1.11/libusal/scsi-linux-sg.c:1051:25: branch_true: following ‘true’ branch...
cdrkit-1.1.11/libusal/scsi-linux-sg.c:1054:36: branch_true: ...to here
cdrkit-1.1.11/libusal/scsi-linux-sg.c:1055:25: danger: dereference of NULL ‘strstr(*<unknown>, "/device/")’
# 1053|   			char buf[64];
# 1054|   			cut=strstr(globbuf.gl_pathv[i], "/device/")+4;
# 1055|-> 			*cut='\0';
# 1056|   			freadstring(globbuf.gl_pathv[i], buf, sizeof(buf));
# 1057|   			if(strtol(buf, &ende, 10) == major && ende && atoi(ende) == minor) {

Error: COMPILER_WARNING: [#def417]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘usalo_rversion’
cdrkit-1.1.11/libusal/scsi-remote.c:216:1: warning[-Wold-style-definition]: old-style function definition
#  216 | usalo_rversion(usalp, what)
#      | ^~~~~~~~~~~~~~
#  214|    */
#  215|   LOCAL char *
#  216|-> usalo_rversion(usalp, what)
#  217|   	SCSI	*usalp;
#  218|   	int	what;

Error: COMPILER_WARNING: [#def418]
cdrkit-1.1.11/libusal/scsi-remote.c:216:1: warning[-Wold-style-definition]: old-style function definition
#  214|    */
#  215|   LOCAL char *
#  216|-> usalo_rversion(usalp, what)
#  217|   	SCSI	*usalp;
#  218|   	int	what;

Error: COMPILER_WARNING: [#def419]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘usalo_rhelp’
cdrkit-1.1.11/libusal/scsi-remote.c:262:1: warning[-Wold-style-definition]: old-style function definition
#  262 | usalo_rhelp(usalp, f)
#      | ^~~~~~~~~~~
#  260|   
#  261|   LOCAL int
#  262|-> usalo_rhelp(usalp, f)
#  263|   	SCSI	*usalp;
#  264|   	FILE	*f;

Error: COMPILER_WARNING: [#def420]
cdrkit-1.1.11/libusal/scsi-remote.c:262:1: warning[-Wold-style-definition]: old-style function definition
#  260|   
#  261|   LOCAL int
#  262|-> usalo_rhelp(usalp, f)
#  263|   	SCSI	*usalp;
#  264|   	FILE	*f;

Error: COMPILER_WARNING: [#def421]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘usalo_ropen’
cdrkit-1.1.11/libusal/scsi-remote.c:272:1: warning[-Wold-style-definition]: old-style function definition
#  272 | usalo_ropen(usalp, device)
#      | ^~~~~~~~~~~
#  270|   
#  271|   LOCAL int
#  272|-> usalo_ropen(usalp, device)
#  273|   	SCSI	*usalp;
#  274|   	char	*device;

Error: COMPILER_WARNING: [#def422]
cdrkit-1.1.11/libusal/scsi-remote.c:272:1: warning[-Wold-style-definition]: old-style function definition
#  270|   
#  271|   LOCAL int
#  272|-> usalo_ropen(usalp, device)
#  273|   	SCSI	*usalp;
#  274|   	char	*device;

Error: COMPILER_WARNING: [#def423]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘usalo_rclose’
cdrkit-1.1.11/libusal/scsi-remote.c:344:1: warning[-Wold-style-definition]: old-style function definition
#  344 | usalo_rclose(usalp)
#      | ^~~~~~~~~~~~
#  342|   
#  343|   LOCAL int
#  344|-> usalo_rclose(usalp)
#  345|   	SCSI	*usalp;
#  346|   {

Error: COMPILER_WARNING: [#def424]
cdrkit-1.1.11/libusal/scsi-remote.c:344:1: warning[-Wold-style-definition]: old-style function definition
#  342|   
#  343|   LOCAL int
#  344|-> usalo_rclose(usalp)
#  345|   	SCSI	*usalp;
#  346|   {

Error: COMPILER_WARNING: [#def425]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘usalo_rmaxdma’
cdrkit-1.1.11/libusal/scsi-remote.c:377:1: warning[-Wold-style-definition]: old-style function definition
#  377 | usalo_rmaxdma(usalp, amt)
#      | ^~~~~~~~~~~~~
#  375|   
#  376|   LOCAL long
#  377|-> usalo_rmaxdma(usalp, amt)
#  378|   	SCSI	*usalp;
#  379|   	long	amt;

Error: COMPILER_WARNING: [#def426]
cdrkit-1.1.11/libusal/scsi-remote.c:377:1: warning[-Wold-style-definition]: old-style function definition
#  375|   
#  376|   LOCAL long
#  377|-> usalo_rmaxdma(usalp, amt)
#  378|   	SCSI	*usalp;
#  379|   	long	amt;

Error: COMPILER_WARNING: [#def427]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘usalo_rgetbuf’
cdrkit-1.1.11/libusal/scsi-remote.c:388:1: warning[-Wold-style-definition]: old-style function definition
#  388 | usalo_rgetbuf(usalp, amt)
#      | ^~~~~~~~~~~~~
#  386|   
#  387|   LOCAL void *
#  388|-> usalo_rgetbuf(usalp, amt)
#  389|   	SCSI	*usalp;
#  390|   	long	amt;

Error: COMPILER_WARNING: [#def428]
cdrkit-1.1.11/libusal/scsi-remote.c:388:1: warning[-Wold-style-definition]: old-style function definition
#  386|   
#  387|   LOCAL void *
#  388|-> usalo_rgetbuf(usalp, amt)
#  389|   	SCSI	*usalp;
#  390|   	long	amt;

Error: COMPILER_WARNING: [#def429]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘usalo_rfreebuf’
cdrkit-1.1.11/libusal/scsi-remote.c:414:1: warning[-Wold-style-definition]: old-style function definition
#  414 | usalo_rfreebuf(usalp)
#      | ^~~~~~~~~~~~~~
#  412|   
#  413|   LOCAL void
#  414|-> usalo_rfreebuf(usalp)
#  415|   	SCSI	*usalp;
#  416|   {

Error: COMPILER_WARNING: [#def430]
cdrkit-1.1.11/libusal/scsi-remote.c:414:1: warning[-Wold-style-definition]: old-style function definition
#  412|   
#  413|   LOCAL void
#  414|-> usalo_rfreebuf(usalp)
#  415|   	SCSI	*usalp;
#  416|   {

Error: COMPILER_WARNING: [#def431]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘usalo_rhavebus’
cdrkit-1.1.11/libusal/scsi-remote.c:433:1: warning[-Wold-style-definition]: old-style function definition
#  433 | usalo_rhavebus(usalp, busno)
#      | ^~~~~~~~~~~~~~
#  431|   
#  432|   LOCAL BOOL
#  433|-> usalo_rhavebus(usalp, busno)
#  434|   	SCSI	*usalp;
#  435|   	int	busno;

Error: COMPILER_WARNING: [#def432]
cdrkit-1.1.11/libusal/scsi-remote.c:433:1: warning[-Wold-style-definition]: old-style function definition
#  431|   
#  432|   LOCAL BOOL
#  433|-> usalo_rhavebus(usalp, busno)
#  434|   	SCSI	*usalp;
#  435|   	int	busno;

Error: COMPILER_WARNING: [#def433]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘usalo_rfileno’
cdrkit-1.1.11/libusal/scsi-remote.c:444:1: warning[-Wold-style-definition]: old-style function definition
#  444 | usalo_rfileno(usalp, busno, tgt, tlun)
#      | ^~~~~~~~~~~~~
#  442|   
#  443|   LOCAL int
#  444|-> usalo_rfileno(usalp, busno, tgt, tlun)
#  445|   	SCSI	*usalp;
#  446|   	int	busno;

Error: COMPILER_WARNING: [#def434]
cdrkit-1.1.11/libusal/scsi-remote.c:444:1: warning[-Wold-style-definition]: old-style function definition
#  442|   
#  443|   LOCAL int
#  444|-> usalo_rfileno(usalp, busno, tgt, tlun)
#  445|   	SCSI	*usalp;
#  446|   	int	busno;

Error: COMPILER_WARNING: [#def435]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘usalo_rinitiator_id’
cdrkit-1.1.11/libusal/scsi-remote.c:465:1: warning[-Wold-style-definition]: old-style function definition
#  465 | usalo_rinitiator_id(usalp)
#      | ^~~~~~~~~~~~~~~~~~~
#  463|   
#  464|   LOCAL int
#  465|-> usalo_rinitiator_id(usalp)
#  466|   	SCSI	*usalp;
#  467|   {

Error: COMPILER_WARNING: [#def436]
cdrkit-1.1.11/libusal/scsi-remote.c:465:1: warning[-Wold-style-definition]: old-style function definition
#  463|   
#  464|   LOCAL int
#  465|-> usalo_rinitiator_id(usalp)
#  466|   	SCSI	*usalp;
#  467|   {

Error: COMPILER_WARNING: [#def437]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘usalo_risatapi’
cdrkit-1.1.11/libusal/scsi-remote.c:475:1: warning[-Wold-style-definition]: old-style function definition
#  475 | usalo_risatapi(usalp)
#      | ^~~~~~~~~~~~~~
#  473|   
#  474|   LOCAL int
#  475|-> usalo_risatapi(usalp)
#  476|   	SCSI	*usalp;
#  477|   {

Error: COMPILER_WARNING: [#def438]
cdrkit-1.1.11/libusal/scsi-remote.c:475:1: warning[-Wold-style-definition]: old-style function definition
#  473|   
#  474|   LOCAL int
#  475|-> usalo_risatapi(usalp)
#  476|   	SCSI	*usalp;
#  477|   {

Error: COMPILER_WARNING: [#def439]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘usalo_rreset’
cdrkit-1.1.11/libusal/scsi-remote.c:485:1: warning[-Wold-style-definition]: old-style function definition
#  485 | usalo_rreset(usalp, what)
#      | ^~~~~~~~~~~~
#  483|   
#  484|   LOCAL int
#  485|-> usalo_rreset(usalp, what)
#  486|   	SCSI	*usalp;
#  487|   	int	what;

Error: COMPILER_WARNING: [#def440]
cdrkit-1.1.11/libusal/scsi-remote.c:485:1: warning[-Wold-style-definition]: old-style function definition
#  483|   
#  484|   LOCAL int
#  485|-> usalo_rreset(usalp, what)
#  486|   	SCSI	*usalp;
#  487|   	int	what;

Error: COMPILER_WARNING: [#def441]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘usalo_rsend’
cdrkit-1.1.11/libusal/scsi-remote.c:496:1: warning[-Wold-style-definition]: old-style function definition
#  496 | usalo_rsend(usalp)
#      | ^~~~~~~~~~~
#  494|   
#  495|   LOCAL int
#  496|-> usalo_rsend(usalp)
#  497|   	SCSI		*usalp;
#  498|   {

Error: COMPILER_WARNING: [#def442]
cdrkit-1.1.11/libusal/scsi-remote.c:496:1: warning[-Wold-style-definition]: old-style function definition
#  494|   
#  495|   LOCAL int
#  496|-> usalo_rsend(usalp)
#  497|   	SCSI		*usalp;
#  498|   {

Error: COMPILER_WARNING: [#def443]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsiabrt’
cdrkit-1.1.11/libusal/scsi-remote.c:516:1: warning[-Wold-style-definition]: old-style function definition
#  516 | rscsiabrt(sig)
#      | ^~~~~~~~~
#  514|   /*--------------------------------------------------------------------------*/
#  515|   LOCAL void
#  516|-> rscsiabrt(sig)
#  517|   	int	sig;
#  518|   {

Error: COMPILER_WARNING: [#def444]
cdrkit-1.1.11/libusal/scsi-remote.c:516:1: warning[-Wold-style-definition]: old-style function definition
#  514|   /*--------------------------------------------------------------------------*/
#  515|   LOCAL void
#  516|-> rscsiabrt(sig)
#  517|   	int	sig;
#  518|   {

Error: COMPILER_WARNING: [#def445]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsigetconn’
cdrkit-1.1.11/libusal/scsi-remote.c:523:1: warning[-Wold-style-definition]: old-style function definition
#  523 | rscsigetconn(usalp, host)
#      | ^~~~~~~~~~~~
#  521|   
#  522|   LOCAL int
#  523|-> rscsigetconn(usalp, host)
#  524|   	SCSI	*usalp;
#  525|   	char	*host;

Error: COMPILER_WARNING: [#def446]
cdrkit-1.1.11/libusal/scsi-remote.c:523:1: warning[-Wold-style-definition]: old-style function definition
#  521|   
#  522|   LOCAL int
#  523|-> rscsigetconn(usalp, host)
#  524|   	SCSI	*usalp;
#  525|   	char	*host;

Error: COMPILER_WARNING: [#def447]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsiversion’
cdrkit-1.1.11/libusal/scsi-remote.c:589:1: warning[-Wold-style-definition]: old-style function definition
#  589 | rscsiversion(usalp, fd, what)
#      | ^~~~~~~~~~~~
#  587|   
#  588|   LOCAL char *
#  589|-> rscsiversion(usalp, fd, what)
#  590|   	SCSI	*usalp;
#  591|   	int	fd;

Error: COMPILER_WARNING: [#def448]
cdrkit-1.1.11/libusal/scsi-remote.c:589:1: warning[-Wold-style-definition]: old-style function definition
#  587|   
#  588|   LOCAL char *
#  589|-> rscsiversion(usalp, fd, what)
#  590|   	SCSI	*usalp;
#  591|   	int	fd;

Error: COMPILER_WARNING: [#def449]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsiopen’
cdrkit-1.1.11/libusal/scsi-remote.c:608:1: warning[-Wold-style-definition]: old-style function definition
#  608 | rscsiopen(usalp, fd, fname)
#      | ^~~~~~~~~
#  606|   
#  607|   LOCAL int
#  608|-> rscsiopen(usalp, fd, fname)
#  609|   	SCSI	*usalp;
#  610|   	int	fd;

Error: COMPILER_WARNING: [#def450]
cdrkit-1.1.11/libusal/scsi-remote.c:608:1: warning[-Wold-style-definition]: old-style function definition
#  606|   
#  607|   LOCAL int
#  608|-> rscsiopen(usalp, fd, fname)
#  609|   	SCSI	*usalp;
#  610|   	int	fd;

Error: COMPILER_WARNING (CWE-563): [#def451]
cdrkit-1.1.11/libusal/scsi-remote.c:616:17: warning[-Wunused-but-set-variable]: variable ‘chan’ set but not used
#  616 |         int     chan;
#      |                 ^~~~
#  614|   	int	ret;
#  615|   	int	bus;
#  616|-> 	int	chan;
#  617|   	int	tgt;
#  618|   	int	lun;

Error: COMPILER_WARNING: [#def452]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsiclose’
cdrkit-1.1.11/libusal/scsi-remote.c:635:1: warning[-Wold-style-definition]: old-style function definition
#  635 | rscsiclose(usalp, fd)
#      | ^~~~~~~~~~
#  633|   
#  634|   LOCAL int
#  635|-> rscsiclose(usalp, fd)
#  636|   	SCSI	*usalp;
#  637|   	int	fd;

Error: COMPILER_WARNING: [#def453]
cdrkit-1.1.11/libusal/scsi-remote.c:635:1: warning[-Wold-style-definition]: old-style function definition
#  633|   
#  634|   LOCAL int
#  635|-> rscsiclose(usalp, fd)
#  636|   	SCSI	*usalp;
#  637|   	int	fd;

Error: COMPILER_WARNING: [#def454]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsimaxdma’
cdrkit-1.1.11/libusal/scsi-remote.c:643:1: warning[-Wold-style-definition]: old-style function definition
#  643 | rscsimaxdma(usalp, fd, amt)
#      | ^~~~~~~~~~~
#  641|   
#  642|   LOCAL int
#  643|-> rscsimaxdma(usalp, fd, amt)
#  644|   	SCSI	*usalp;
#  645|   	int	fd;

Error: COMPILER_WARNING: [#def455]
cdrkit-1.1.11/libusal/scsi-remote.c:643:1: warning[-Wold-style-definition]: old-style function definition
#  641|   
#  642|   LOCAL int
#  643|-> rscsimaxdma(usalp, fd, amt)
#  644|   	SCSI	*usalp;
#  645|   	int	fd;

Error: COMPILER_WARNING: [#def456]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsigetbuf’
cdrkit-1.1.11/libusal/scsi-remote.c:655:1: warning[-Wold-style-definition]: old-style function definition
#  655 | rscsigetbuf(usalp, fd, amt)
#      | ^~~~~~~~~~~
#  653|   
#  654|   LOCAL int
#  655|-> rscsigetbuf(usalp, fd, amt)
#  656|   	SCSI	*usalp;
#  657|   	int	fd;

Error: COMPILER_WARNING: [#def457]
cdrkit-1.1.11/libusal/scsi-remote.c:655:1: warning[-Wold-style-definition]: old-style function definition
#  653|   
#  654|   LOCAL int
#  655|-> rscsigetbuf(usalp, fd, amt)
#  656|   	SCSI	*usalp;
#  657|   	int	fd;

Error: COMPILER_WARNING: [#def458]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsifreebuf’
cdrkit-1.1.11/libusal/scsi-remote.c:699:1: warning[-Wold-style-definition]: old-style function definition
#  699 | rscsifreebuf(usalp, fd)
#      | ^~~~~~~~~~~~
#  697|   
#  698|   LOCAL int
#  699|-> rscsifreebuf(usalp, fd)
#  700|   	SCSI	*usalp;
#  701|   	int	fd;

Error: COMPILER_WARNING: [#def459]
cdrkit-1.1.11/libusal/scsi-remote.c:699:1: warning[-Wold-style-definition]: old-style function definition
#  697|   
#  698|   LOCAL int
#  699|-> rscsifreebuf(usalp, fd)
#  700|   	SCSI	*usalp;
#  701|   	int	fd;

Error: COMPILER_WARNING: [#def460]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsihavebus’
cdrkit-1.1.11/libusal/scsi-remote.c:707:1: warning[-Wold-style-definition]: old-style function definition
#  707 | rscsihavebus(usalp, fd, busno)
#      | ^~~~~~~~~~~~
#  705|   
#  706|   LOCAL int
#  707|-> rscsihavebus(usalp, fd, busno)
#  708|   	SCSI	*usalp;
#  709|   	int	fd;

Error: COMPILER_WARNING: [#def461]
cdrkit-1.1.11/libusal/scsi-remote.c:707:1: warning[-Wold-style-definition]: old-style function definition
#  705|   
#  706|   LOCAL int
#  707|-> rscsihavebus(usalp, fd, busno)
#  708|   	SCSI	*usalp;
#  709|   	int	fd;

Error: COMPILER_WARNING: [#def462]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsifileno’
cdrkit-1.1.11/libusal/scsi-remote.c:721:1: warning[-Wold-style-definition]: old-style function definition
#  721 | rscsifileno(usalp, fd, busno, tgt, tlun)
#      | ^~~~~~~~~~~
#  719|   
#  720|   LOCAL int
#  721|-> rscsifileno(usalp, fd, busno, tgt, tlun)
#  722|   	SCSI	*usalp;
#  723|   	int	fd;

Error: COMPILER_WARNING: [#def463]
cdrkit-1.1.11/libusal/scsi-remote.c:721:1: warning[-Wold-style-definition]: old-style function definition
#  719|   
#  720|   LOCAL int
#  721|-> rscsifileno(usalp, fd, busno, tgt, tlun)
#  722|   	SCSI	*usalp;
#  723|   	int	fd;

Error: COMPILER_WARNING: [#def464]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsiinitiator_id’
cdrkit-1.1.11/libusal/scsi-remote.c:739:1: warning[-Wold-style-definition]: old-style function definition
#  739 | rscsiinitiator_id(usalp, fd)
#      | ^~~~~~~~~~~~~~~~~
#  737|   
#  738|   LOCAL int
#  739|-> rscsiinitiator_id(usalp, fd)
#  740|   	SCSI	*usalp;
#  741|   	int	fd;

Error: COMPILER_WARNING: [#def465]
cdrkit-1.1.11/libusal/scsi-remote.c:739:1: warning[-Wold-style-definition]: old-style function definition
#  737|   
#  738|   LOCAL int
#  739|-> rscsiinitiator_id(usalp, fd)
#  740|   	SCSI	*usalp;
#  741|   	int	fd;

Error: COMPILER_WARNING: [#def466]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsiisatapi’
cdrkit-1.1.11/libusal/scsi-remote.c:747:1: warning[-Wold-style-definition]: old-style function definition
#  747 | rscsiisatapi(usalp, fd)
#      | ^~~~~~~~~~~~
#  745|   
#  746|   LOCAL int
#  747|-> rscsiisatapi(usalp, fd)
#  748|   	SCSI	*usalp;
#  749|   	int	fd;

Error: COMPILER_WARNING: [#def467]
cdrkit-1.1.11/libusal/scsi-remote.c:747:1: warning[-Wold-style-definition]: old-style function definition
#  745|   
#  746|   LOCAL int
#  747|-> rscsiisatapi(usalp, fd)
#  748|   	SCSI	*usalp;
#  749|   	int	fd;

Error: COMPILER_WARNING: [#def468]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsireset’
cdrkit-1.1.11/libusal/scsi-remote.c:755:1: warning[-Wold-style-definition]: old-style function definition
#  755 | rscsireset(usalp, fd, what)
#      | ^~~~~~~~~~
#  753|   
#  754|   LOCAL int
#  755|-> rscsireset(usalp, fd, what)
#  756|   	SCSI	*usalp;
#  757|   	int	fd;

Error: COMPILER_WARNING: [#def469]
cdrkit-1.1.11/libusal/scsi-remote.c:755:1: warning[-Wold-style-definition]: old-style function definition
#  753|   
#  754|   LOCAL int
#  755|-> rscsireset(usalp, fd, what)
#  756|   	SCSI	*usalp;
#  757|   	int	fd;

Error: COMPILER_WARNING: [#def470]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsiscmd’
cdrkit-1.1.11/libusal/scsi-remote.c:767:1: warning[-Wold-style-definition]: old-style function definition
#  767 | rscsiscmd(usalp, fd, sp)
#      | ^~~~~~~~~
#  765|   
#  766|   LOCAL int
#  767|-> rscsiscmd(usalp, fd, sp)
#  768|   	SCSI	*usalp;
#  769|   	int	fd;

Error: COMPILER_WARNING: [#def471]
cdrkit-1.1.11/libusal/scsi-remote.c:767:1: warning[-Wold-style-definition]: old-style function definition
#  765|   
#  766|   LOCAL int
#  767|-> rscsiscmd(usalp, fd, sp)
#  768|   	SCSI	*usalp;
#  769|   	int	fd;

Error: COMPILER_WARNING: [#def472]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsifillrbuf’
cdrkit-1.1.11/libusal/scsi-remote.c:827:1: warning[-Wold-style-definition]: old-style function definition
#  827 | rscsifillrbuf(usalp)
#      | ^~~~~~~~~~~~~
#  825|   
#  826|   LOCAL int
#  827|-> rscsifillrbuf(usalp)
#  828|   	SCSI	*usalp;
#  829|   {

Error: COMPILER_WARNING: [#def473]
cdrkit-1.1.11/libusal/scsi-remote.c:827:1: warning[-Wold-style-definition]: old-style function definition
#  825|   
#  826|   LOCAL int
#  827|-> rscsifillrbuf(usalp)
#  828|   	SCSI	*usalp;
#  829|   {

Error: COMPILER_WARNING: [#def474]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsirchar’
cdrkit-1.1.11/libusal/scsi-remote.c:838:1: warning[-Wold-style-definition]: old-style function definition
#  838 | rscsirchar(usalp, cp)
#      | ^~~~~~~~~~
#  836|   
#  837|   LOCAL int
#  838|-> rscsirchar(usalp, cp)
#  839|   	SCSI	*usalp;
#  840|   	char	*cp;

Error: COMPILER_WARNING: [#def475]
cdrkit-1.1.11/libusal/scsi-remote.c:838:1: warning[-Wold-style-definition]: old-style function definition
#  836|   
#  837|   LOCAL int
#  838|-> rscsirchar(usalp, cp)
#  839|   	SCSI	*usalp;
#  840|   	char	*cp;

Error: COMPILER_WARNING: [#def476]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsireadbuf’
cdrkit-1.1.11/libusal/scsi-remote.c:852:1: warning[-Wold-style-definition]: old-style function definition
#  852 | rscsireadbuf(usalp, fd, buf, count)
#      | ^~~~~~~~~~~~
#  850|   
#  851|   LOCAL int
#  852|-> rscsireadbuf(usalp, fd, buf, count)
#  853|   	SCSI	*usalp;
#  854|   	int	fd;

Error: COMPILER_WARNING: [#def477]
cdrkit-1.1.11/libusal/scsi-remote.c:852:1: warning[-Wold-style-definition]: old-style function definition
#  850|   
#  851|   LOCAL int
#  852|-> rscsireadbuf(usalp, fd, buf, count)
#  853|   	SCSI	*usalp;
#  854|   	int	fd;

Error: COMPILER_WARNING: [#def478]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsivoidarg’
cdrkit-1.1.11/libusal/scsi-remote.c:881:1: warning[-Wold-style-definition]: old-style function definition
#  881 | rscsivoidarg(usalp, fd, n)
#      | ^~~~~~~~~~~~
#  879|   
#  880|   LOCAL void
#  881|-> rscsivoidarg(usalp, fd, n)
#  882|   	SCSI	*usalp;
#  883|   	int	fd;

Error: COMPILER_WARNING: [#def479]
cdrkit-1.1.11/libusal/scsi-remote.c:881:1: warning[-Wold-style-definition]: old-style function definition
#  879|   
#  880|   LOCAL void
#  881|-> rscsivoidarg(usalp, fd, n)
#  882|   	SCSI	*usalp;
#  883|   	int	fd;

Error: COMPILER_WARNING: [#def480]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsicmd’
cdrkit-1.1.11/libusal/scsi-remote.c:899:1: warning[-Wold-style-definition]: old-style function definition
#  899 | rscsicmd(usalp, fd, name, cbuf)
#      | ^~~~~~~~
#  897|   
#  898|   LOCAL int
#  899|-> rscsicmd(usalp, fd, name, cbuf)
#  900|   	SCSI	*usalp;
#  901|   	int	fd;

Error: COMPILER_WARNING: [#def481]
cdrkit-1.1.11/libusal/scsi-remote.c:899:1: warning[-Wold-style-definition]: old-style function definition
#  897|   
#  898|   LOCAL int
#  899|-> rscsicmd(usalp, fd, name, cbuf)
#  900|   	SCSI	*usalp;
#  901|   	int	fd;

Error: COMPILER_WARNING: [#def482]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsisendcmd’
cdrkit-1.1.11/libusal/scsi-remote.c:910:1: warning[-Wold-style-definition]: old-style function definition
#  910 | rscsisendcmd(usalp, fd, name, cbuf)
#      | ^~~~~~~~~~~~
#  908|   
#  909|   LOCAL void
#  910|-> rscsisendcmd(usalp, fd, name, cbuf)
#  911|   	SCSI	*usalp;
#  912|   	int	fd;

Error: COMPILER_WARNING: [#def483]
cdrkit-1.1.11/libusal/scsi-remote.c:910:1: warning[-Wold-style-definition]: old-style function definition
#  908|   
#  909|   LOCAL void
#  910|-> rscsisendcmd(usalp, fd, name, cbuf)
#  911|   	SCSI	*usalp;
#  912|   	int	fd;

Error: COMPILER_WARNING: [#def484]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsigetline’
cdrkit-1.1.11/libusal/scsi-remote.c:924:1: warning[-Wold-style-definition]: old-style function definition
#  924 | rscsigetline(usalp, fd, line, count)
#      | ^~~~~~~~~~~~
#  922|   
#  923|   LOCAL int
#  924|-> rscsigetline(usalp, fd, line, count)
#  925|   	SCSI	*usalp;
#  926|   	int	fd;

Error: COMPILER_WARNING: [#def485]
cdrkit-1.1.11/libusal/scsi-remote.c:924:1: warning[-Wold-style-definition]: old-style function definition
#  922|   
#  923|   LOCAL int
#  924|-> rscsigetline(usalp, fd, line, count)
#  925|   	SCSI	*usalp;
#  926|   	int	fd;

Error: COMPILER_WARNING: [#def486]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsireadnum’
cdrkit-1.1.11/libusal/scsi-remote.c:945:1: warning[-Wold-style-definition]: old-style function definition
#  945 | rscsireadnum(usalp, fd)
#      | ^~~~~~~~~~~~
#  943|   
#  944|   LOCAL int
#  945|-> rscsireadnum(usalp, fd)
#  946|   	SCSI	*usalp;
#  947|   	int	fd;

Error: COMPILER_WARNING: [#def487]
cdrkit-1.1.11/libusal/scsi-remote.c:945:1: warning[-Wold-style-definition]: old-style function definition
#  943|   
#  944|   LOCAL int
#  945|-> rscsireadnum(usalp, fd)
#  946|   	SCSI	*usalp;
#  947|   	int	fd;

Error: COMPILER_WARNING: [#def488]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsigetstatus’
cdrkit-1.1.11/libusal/scsi-remote.c:956:1: warning[-Wold-style-definition]: old-style function definition
#  956 | rscsigetstatus(usalp, fd, name)
#      | ^~~~~~~~~~~~~~
#  954|   
#  955|   LOCAL int
#  956|-> rscsigetstatus(usalp, fd, name)
#  957|   	SCSI	*usalp;
#  958|   	int	fd;

Error: COMPILER_WARNING: [#def489]
cdrkit-1.1.11/libusal/scsi-remote.c:956:1: warning[-Wold-style-definition]: old-style function definition
#  954|   
#  955|   LOCAL int
#  956|-> rscsigetstatus(usalp, fd, name)
#  957|   	SCSI	*usalp;
#  958|   	int	fd;

Error: COMPILER_WARNING: [#def490]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘rscsiaborted’
cdrkit-1.1.11/libusal/scsi-remote.c:1005:1: warning[-Wold-style-definition]: old-style function definition
# 1005 | rscsiaborted(usalp, fd)
#      | ^~~~~~~~~~~~
# 1003|   
# 1004|   LOCAL int
# 1005|-> rscsiaborted(usalp, fd)
# 1006|   	SCSI	*usalp;
# 1007|   	int	fd;

Error: COMPILER_WARNING: [#def491]
cdrkit-1.1.11/libusal/scsi-remote.c:1005:1: warning[-Wold-style-definition]: old-style function definition
# 1003|   
# 1004|   LOCAL int
# 1005|-> rscsiaborted(usalp, fd)
# 1006|   	SCSI	*usalp;
# 1007|   	int	fd;

Error: COMPILER_WARNING: [#def492]
cdrkit-1.1.11/libusal/scsi-remote.c: scope_hint: In function ‘_rcmdrsh’
cdrkit-1.1.11/libusal/scsi-remote.c:1031:1: warning[-Wold-style-definition]: old-style function definition
# 1031 | _rcmdrsh(ahost, inport, locuser, remuser, cmd, rsh)
#      | ^~~~~~~~
# 1029|   #include <waitdefs.h>
# 1030|   LOCAL int
# 1031|-> _rcmdrsh(ahost, inport, locuser, remuser, cmd, rsh)
# 1032|   	char		**ahost;
# 1033|   	int		inport;		/* port is ignored */

Error: COMPILER_WARNING: [#def493]
cdrkit-1.1.11/libusal/scsi-remote.c:1031:1: warning[-Wold-style-definition]: old-style function definition
# 1029|   #include <waitdefs.h>
# 1030|   LOCAL int
# 1031|-> _rcmdrsh(ahost, inport, locuser, remuser, cmd, rsh)
# 1032|   	char		**ahost;
# 1033|   	int		inport;		/* port is ignored */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def494]
cdrkit-1.1.11/libusal/scsi-remote.c:1076:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(pp[1], 0)’
cdrkit-1.1.11/libusal/scsi-remote.c:1049:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libusal/scsi-remote.c:1062:13: branch_false: ...to here
cdrkit-1.1.11/libusal/scsi-remote.c:1062:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libusal/scsi-remote.c:1067:15: branch_false: ...to here
cdrkit-1.1.11/libusal/scsi-remote.c:1068:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cdrkit-1.1.11/libusal/scsi-remote.c:1070:19: branch_false: ...to here
cdrkit-1.1.11/libusal/scsi-remote.c:1070:19: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cdrkit-1.1.11/libusal/scsi-remote.c:1075:24: branch_true: ...to here
cdrkit-1.1.11/libusal/scsi-remote.c:1076:21: acquire_resource: opened here
cdrkit-1.1.11/libusal/scsi-remote.c:1076:20: danger: ‘dup2(pp[1], 0)’ leaks here; was opened at [(9)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/8)
# 1074|   
# 1075|   		(void) close(pp[0]);
# 1076|-> 		if (dup2(pp[1], 0) == -1 ||	/* Pipe becomes 'stdin'  */
# 1077|   		    dup2(0, 1) == -1) {		/* Pipe becomes 'stdout' */
# 1078|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def495]
cdrkit-1.1.11/libusal/scsi-remote.c:1076:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(0, 1)’
cdrkit-1.1.11/libusal/scsi-remote.c:1049:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libusal/scsi-remote.c:1062:13: branch_false: ...to here
cdrkit-1.1.11/libusal/scsi-remote.c:1062:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libusal/scsi-remote.c:1067:15: branch_false: ...to here
cdrkit-1.1.11/libusal/scsi-remote.c:1068:12: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cdrkit-1.1.11/libusal/scsi-remote.c:1070:19: branch_false: ...to here
cdrkit-1.1.11/libusal/scsi-remote.c:1070:19: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cdrkit-1.1.11/libusal/scsi-remote.c:1075:24: branch_true: ...to here
cdrkit-1.1.11/libusal/scsi-remote.c:1076:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/libusal/scsi-remote.c:1077:21: branch_false: ...to here
cdrkit-1.1.11/libusal/scsi-remote.c:1077:21: acquire_resource: opened here
cdrkit-1.1.11/libusal/scsi-remote.c:1076:21: danger: ‘dup2(0, 1)’ leaks here; was opened at [(11)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/10)
# 1074|   
# 1075|   		(void) close(pp[0]);
# 1076|-> 		if (dup2(pp[1], 0) == -1 ||	/* Pipe becomes 'stdin'  */
# 1077|   		    dup2(0, 1) == -1) {		/* Pipe becomes 'stdout' */
# 1078|   

Error: COMPILER_WARNING (CWE-1164): [#def496]
cdrkit-1.1.11/readom/readom.c: scope_hint: At top level
cdrkit-1.1.11/readom/readom.c:593:1: warning[-Wunused-function]: ‘excdr’ defined but not used
#  593 | excdr(int excode, void *arg)
#      | ^~~~~
#  591|   
#  592|   static void
#  593|-> excdr(int excode, void *arg)
#  594|   {
#  595|   	exscsi(excode, arg);

Error: COMPILER_WARNING (CWE-563): [#def497]
cdrkit-1.1.11/readom/readom.c: scope_hint: In function ‘prstats’
cdrkit-1.1.11/readom/readom.c:610:17: warning[-Wunused-but-set-variable]: variable ‘tmsec’ set but not used
#  610 |         int     tmsec;
#      |                 ^~~~~
#  608|   	int	sec;
#  609|   	int	usec;
#  610|-> 	int	tmsec;
#  611|   
#  612|   	if (gettimeofday(&stoptime, (struct timezone *)0) < 0)

Error: COMPILER_WARNING (CWE-563): [#def498]
cdrkit-1.1.11/readom/readom.c: scope_hint: In function ‘prstats_silent’
cdrkit-1.1.11/readom/readom.c:638:17: warning[-Wunused-but-set-variable]: variable ‘tmsec’ set but not used
#  638 |         int     tmsec;
#      |                 ^~~~~
#  636|   	int	sec;
#  637|   	int	usec;
#  638|-> 	int	tmsec;
#  639|   
#  640|   	if (gettimeofday(&stoptime, (struct timezone *)0) < 0)

Error: CPPCHECK_WARNING (CWE-457): [#def499]
cdrkit-1.1.11/readom/readom.c:927: error[uninitvar]: Uninitialized variable: tp->first
#  925|   	}
#  926|   	len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2;
#  927|-> 	fprintf(stderr, "TOC len: %d. First Session: %d Last Session: %d.\n", len, tp->first, tp->last);
#  928|   
#  929|   	if (read_toc(usalp, xxb, 0, len, 0, FMT_FULLTOC) < 0) {

Error: CPPCHECK_WARNING (CWE-457): [#def500]
cdrkit-1.1.11/readom/readom.c:1573: warning[uninitvar]: Uninitialized variable: parmp->askrange
# 1571|   	}
# 1572|   
# 1573|-> 	if (parmp == NULL || parmp->askrange)
# 1574|   		askrange = TRUE;
# 1575|   	if (parmp != NULL && !askrange && (parmp->start <= parmp->end))

Error: CPPCHECK_WARNING (CWE-457): [#def501]
cdrkit-1.1.11/readom/readom.c:1757: error[legacyUninitvar]: Uninitialized variable: end
# 1755|   	}
# 1756|   
# 1757|-> 	if (end <= 1)
# 1758|   		end = 10000000;	/* Hack to write empty disks */
# 1759|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def502]
cdrkit-1.1.11/readom/readom.c:2175:17: warning[-Wanalyzer-malloc-leak]: leak of ‘badsecs’
cdrkit-1.1.11/readom/readom.c:2167:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/readom/readom.c:2168:17: branch_true: ...to here
cdrkit-1.1.11/readom/readom.c:2169:27: acquire_memory: allocated here
cdrkit-1.1.11/readom/readom.c:2170:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/readom/readom.c:2173:13: branch_false: ...to here
cdrkit-1.1.11/readom/readom.c:2173:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/readom/readom.c:2174:24: branch_true: ...to here
cdrkit-1.1.11/readom/readom.c:2175:17: danger: ‘badsecs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 2173|   	if (nbad >= maxbad) {
# 2174|   		maxbad += BAD_INC;
# 2175|-> 		badsecs = realloc(badsecs, maxbad * sizeof (long));
# 2176|   		if (badsecs == NULL)
# 2177|   			comerr("No memory to grow bad sector list\n.");

Error: GCC_ANALYZER_WARNING (CWE-457): [#def503]
cdrkit-1.1.11/redhat-linux-build/CMakeFiles/CMakeScratch/TryCompile-2nT7lV/src.c:7:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘in’

Error: COMPILER_WARNING: [#def504] [important]
cdrkit-1.1.11/redhat-linux-build/CMakeFiles/CMakeScratch/TryCompile-QtB8EP/src.c:3:29: error[-Wimplicit-function-declaration]: implicit declaration of function ‘drand’; did you mean ‘srand’?

Error: COMPILER_WARNING: [#def505]
cdrkit-1.1.11/redhat-linux-build/CMakeFiles/CMakeScratch/TryCompile-b8kWW2/HAVE_CAMLIB_H.c:3:10: warning[fatal error]: camlib.h: No such file or directory

Error: COMPILER_WARNING: [#def506]
cdrkit-1.1.11/wodim/../include/usal/scsicdb.h:125:17: note[note]: at offset 2 into destination object ‘count’ of size 2
#  123|   	Uchar	addr[4];	/* logical block address */
#  124|   	Uchar	res6;		/* reserved byte 6 */
#  125|-> 	Uchar	count[2];	/* transfer length */
#  126|   	Ucbit	link	  : 1;	/* link (another command follows) */
#  127|   	Ucbit	fr	  : 1;	/* flag request (interrupt at completion) */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def507]
cdrkit-1.1.11/wodim/auinfo.c:187:25: warning[-Wanalyzer-malloc-leak]: leak of ‘savestr(readtstr("Albumperformer"))’
cdrkit-1.1.11/wodim/auinfo.c:148:1: enter_function: entry to ‘auinfo’
cdrkit-1.1.11/wodim/auinfo.c:165:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/wodim/auinfo.c:167:21: branch_true: ...to here
cdrkit-1.1.11/wodim/auinfo.c:184:21: call_function: calling ‘readtstr’ from ‘auinfo’
cdrkit-1.1.11/wodim/auinfo.c:184:21: return_function: returning to ‘auinfo’ from ‘readtstr’
cdrkit-1.1.11/wodim/auinfo.c:185:20: branch_true: following ‘true’ branch...
cdrkit-1.1.11/wodim/auinfo.c:186:31: call_function: calling ‘gettextptr’ from ‘auinfo’
cdrkit-1.1.11/wodim/auinfo.c:186:31: return_function: returning to ‘auinfo’ from ‘gettextptr’
cdrkit-1.1.11/wodim/auinfo.c:187:45: call_function: calling ‘savestr’ from ‘auinfo’
cdrkit-1.1.11/wodim/auinfo.c:187:45: return_function: returning to ‘auinfo’ from ‘savestr’
cdrkit-1.1.11/wodim/auinfo.c:187:25: danger: ‘savestr(readtstr("Albumperformer"))’ leaks here; was allocated at [(21)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/20)
#  185|   		if (p && *p) {
#  186|   			txp = gettextptr(0, trackp); /* Album perf. in trk 0*/
#  187|-> 			txp->tc_performer = savestr(p);
#  188|   		}
#  189|   		p = readtstr("Performer");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def508]
cdrkit-1.1.11/wodim/auinfo.c:192:25: warning[-Wanalyzer-malloc-leak]: leak of ‘savestr(readtstr("Performer"))’
cdrkit-1.1.11/wodim/auinfo.c:148:1: enter_function: entry to ‘auinfo’
cdrkit-1.1.11/wodim/auinfo.c:165:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/wodim/auinfo.c:167:21: branch_true: ...to here
cdrkit-1.1.11/wodim/auinfo.c:185:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/wodim/auinfo.c:189:21: branch_false: ...to here
cdrkit-1.1.11/wodim/auinfo.c:189:21: call_function: calling ‘readtstr’ from ‘auinfo’
cdrkit-1.1.11/wodim/auinfo.c:189:21: return_function: returning to ‘auinfo’ from ‘readtstr’
cdrkit-1.1.11/wodim/auinfo.c:190:20: branch_true: following ‘true’ branch...
cdrkit-1.1.11/wodim/auinfo.c:191:31: call_function: calling ‘gettextptr’ from ‘auinfo’
cdrkit-1.1.11/wodim/auinfo.c:191:31: return_function: returning to ‘auinfo’ from ‘gettextptr’
cdrkit-1.1.11/wodim/auinfo.c:192:45: call_function: calling ‘savestr’ from ‘auinfo’
cdrkit-1.1.11/wodim/auinfo.c:192:45: return_function: returning to ‘auinfo’ from ‘savestr’
cdrkit-1.1.11/wodim/auinfo.c:192:25: danger: ‘savestr(readtstr("Performer"))’ leaks here; was allocated at [(23)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/22)
#  190|   		if (p && *p) {
#  191|   			txp = gettextptr(track, trackp);
#  192|-> 			txp->tc_performer = savestr(p);
#  193|   		}
#  194|   		p = readtstr("Albumtitle");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def509]
cdrkit-1.1.11/wodim/auinfo.c:197:25: warning[-Wanalyzer-malloc-leak]: leak of ‘savestr(readtstr("Albumtitle"))’
cdrkit-1.1.11/wodim/auinfo.c:148:1: enter_function: entry to ‘auinfo’
cdrkit-1.1.11/wodim/auinfo.c:165:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/wodim/auinfo.c:167:21: branch_true: ...to here
cdrkit-1.1.11/wodim/auinfo.c:185:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/wodim/auinfo.c:189:21: branch_false: ...to here
cdrkit-1.1.11/wodim/auinfo.c:190:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/wodim/auinfo.c:194:21: branch_false: ...to here
cdrkit-1.1.11/wodim/auinfo.c:194:21: call_function: calling ‘readtstr’ from ‘auinfo’
cdrkit-1.1.11/wodim/auinfo.c:194:21: return_function: returning to ‘auinfo’ from ‘readtstr’
cdrkit-1.1.11/wodim/auinfo.c:195:20: branch_true: following ‘true’ branch...
cdrkit-1.1.11/wodim/auinfo.c:196:31: call_function: calling ‘gettextptr’ from ‘auinfo’
cdrkit-1.1.11/wodim/auinfo.c:196:31: return_function: returning to ‘auinfo’ from ‘gettextptr’
cdrkit-1.1.11/wodim/auinfo.c:197:41: call_function: calling ‘savestr’ from ‘auinfo’
cdrkit-1.1.11/wodim/auinfo.c:197:41: return_function: returning to ‘auinfo’ from ‘savestr’
cdrkit-1.1.11/wodim/auinfo.c:197:25: danger: ‘savestr(readtstr("Albumtitle"))’ leaks here; was allocated at [(25)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/24)
#  195|   		if (p && *p) {
#  196|   			txp = gettextptr(0, trackp); /* Album title in trk 0*/
#  197|-> 			txp->tc_title = savestr(p);
#  198|   		}
#  199|   		p = readtstr("Tracktitle");

Error: CPPCHECK_WARNING (CWE-476): [#def510]
cdrkit-1.1.11/wodim/auinfo.c:381: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
#  379|   	}
#  380|   	p = malloc(14);
#  381|-> 	strcpy(p, mcn);
#  382|   	trackp->isrc = p;
#  383|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def511]
cdrkit-1.1.11/wodim/auinfo.c:381:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘p’ where non-null expected
cdrkit-1.1.11/wodim/auinfo.c:380:13: acquire_memory: this call could return NULL
cdrkit-1.1.11/wodim/auinfo.c:381:9: danger: argument 1 (‘p’) from [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  379|   	}
#  380|   	p = malloc(14);
#  381|-> 	strcpy(p, mcn);
#  382|   	trackp->isrc = p;
#  383|   

Error: CPPCHECK_WARNING (CWE-476): [#def512]
cdrkit-1.1.11/wodim/auinfo.c:473: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
#  471|   	*ip = '\0';
#  472|   	p = malloc(13);
#  473|-> 	strcpy(p, ibuf);
#  474|   	trackp->isrc = p;
#  475|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def513]
cdrkit-1.1.11/wodim/auinfo.c:473:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘p’ where non-null expected
cdrkit-1.1.11/wodim/auinfo.c:427:42: branch_true: following ‘true’ branch (when ‘i != 2’)...
cdrkit-1.1.11/wodim/auinfo.c:428:18: branch_true: ...to here
cdrkit-1.1.11/wodim/auinfo.c:429:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/wodim/auinfo.c:427:49: branch_false: ...to here
cdrkit-1.1.11/wodim/auinfo.c:446:21: branch_true: following ‘true’ branch (when ‘i != 3’)...
cdrkit-1.1.11/wodim/auinfo.c:447:18: branch_true: ...to here
cdrkit-1.1.11/wodim/auinfo.c:448:20: branch_true: following ‘true’ branch...
cdrkit-1.1.11/wodim/auinfo.c:448:20: branch_true: ...to here
cdrkit-1.1.11/wodim/auinfo.c:460:21: branch_true: following ‘true’ branch (when ‘i != 7’)...
cdrkit-1.1.11/wodim/auinfo.c:461:18: branch_true: ...to here
cdrkit-1.1.11/wodim/auinfo.c:462:20: branch_true: following ‘true’ branch...
cdrkit-1.1.11/wodim/auinfo.c:462:20: branch_true: ...to here
cdrkit-1.1.11/wodim/auinfo.c:472:13: acquire_memory: this call could return NULL
cdrkit-1.1.11/wodim/auinfo.c:473:9: danger: argument 1 (‘p’) from [(15)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/14) could be NULL where non-null expected
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  471|   	*ip = '\0';
#  472|   	p = malloc(13);
#  473|-> 	strcpy(p, ibuf);
#  474|   	trackp->isrc = p;
#  475|   

Error: CPPCHECK_WARNING (CWE-476): [#def514]
cdrkit-1.1.11/wodim/auinfo.c:495: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: idxlist
#  493|   	idxlist = malloc(100*sizeof (long));
#  494|   	p = tindex;
#  495|-> 	idxlist[0] = 0;
#  496|   	i = 0;
#  497|   	while (*p) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def515]
cdrkit-1.1.11/wodim/auinfo.c:495:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘idxlist’
cdrkit-1.1.11/wodim/auinfo.c:493:19: acquire_memory: this call could return NULL
cdrkit-1.1.11/wodim/auinfo.c:495:9: danger: ‘idxlist’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  493|   	idxlist = malloc(100*sizeof (long));
#  494|   	p = tindex;
#  495|-> 	idxlist[0] = 0;
#  496|   	i = 0;
#  497|   	while (*p) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def516]
cdrkit-1.1.11/wodim/auinfo.c:524:9: warning[-Wanalyzer-malloc-leak]: leak of ‘idxlist’
cdrkit-1.1.11/wodim/auinfo.c:493:19: acquire_memory: allocated here
cdrkit-1.1.11/wodim/auinfo.c:497:16: branch_true: following ‘true’ branch...
cdrkit-1.1.11/wodim/auinfo.c:498:21: branch_true: ...to here
cdrkit-1.1.11/wodim/auinfo.c:524:9: danger: ‘idxlist’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  522|   	return;
#  523|   illchar:
#  524|-> 	comerrno(EX_BAD, "Index '%s' contains illegal character '%c'.\n", tindex, *p);
#  525|   }

Error: CPPCHECK_WARNING (CWE-457): [#def517]
cdrkit-1.1.11/wodim/cdr_drv.c:202: error[uninitvar]: Uninitialized variable: &n
#  200|   	for (d = drivers; *d != (cdr_t *)NULL; d++) {
#  201|   		fprintf(stderr, "%s%n",
#  202|-> 			(*d)->cdr_drname, &n);
#  203|   		fprintf(stderr, "%*s%s\n",
#  204|   			20-n, "",

Error: GCC_ANALYZER_WARNING (CWE-457): [#def518]
cdrkit-1.1.11/wodim/cdr_drv.c:203:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘n’
cdrkit-1.1.11/wodim/cdr_drv.c:193:12: branch_false: following ‘false’ branch (when ‘dpp’ is non-NULL)...
cdrkit-1.1.11/wodim/cdr_drv.c:196:14: branch_false: ...to here
cdrkit-1.1.11/wodim/cdr_drv.c:200:27: branch_true: following ‘true’ branch...
cdrkit-1.1.11/wodim/cdr_drv.c:201:17: branch_true: ...to here
cdrkit-1.1.11/wodim/cdr_drv.c:203:17: danger: use of uninitialized value ‘n’ here
#  201|   		fprintf(stderr, "%s%n",
#  202|   			(*d)->cdr_drname, &n);
#  203|-> 		fprintf(stderr, "%*s%s\n",
#  204|   			20-n, "",
#  205|   			(*d)->cdr_drtext);

Error: COMPILER_WARNING (CWE-1164): [#def519]
cdrkit-1.1.11/wodim/cdtext.c:529:13: warning[-Wunused-function]: ‘six2eight’ defined but not used
#  529 | static void six2eight(register Uchar *in, register Uchar *out)
#      |             ^~~~~~~~~
#  527|    * 4 input bytes (6 bit based) are converted into 3 output bytes (8 bit based).
#  528|    */
#  529|-> static void six2eight(register Uchar *in, register Uchar *out)
#  530|   {
#  531|   	register int	c;

Error: GCC_ANALYZER_WARNING: [#def520]
cdrkit-1.1.11/wodim/clone.c:101:15: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘open(&filename, 0)’
cdrkit-1.1.11/wodim/clone.c:98:13: acquire_resource: opened here
cdrkit-1.1.11/wodim/clone.c:99:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/wodim/clone.c:100:17: branch_true: ...to here
cdrkit-1.1.11/wodim/clone.c:101:15: danger: ‘open(&filename, 0)’ could be invalid: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   99|   	if (f < 0)
#  100|   		comerr("Cannot open '%s'.\n", filename);
#  101|-> 	amt = read(f, buf, sizeof (buf));
#  102|   
#  103|   	if (amt == sizeof (buf))

Error: COMPILER_WARNING: [#def521]
cdrkit-1.1.11/wodim/cue.c: scope_hint: In function ‘parse_file.isra.0’
cdrkit-1.1.11/wodim/cue.c:477:39: warning[-Wformat-truncation=]: ‘__snprintf_chk’ output may be truncated before the last format character
#  477 |                                 "%s/%s", cname, word);
#      |                                       ^
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 2 or more bytes (assuming 1025) into a destination of size 1024
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  475|   				*p = '\0';
#  476|   			snprintf(newname, sizeof (newname),
#  477|-> 				"%s/%s", cname, word);
#  478|   			word = newname;
#  479|   			sp->xfp = xopen(word, O_RDONLY|O_BINARY, 0);

Error: COMPILER_WARNING (CWE-1164): [#def522]
cdrkit-1.1.11/wodim/cue.c:1006:1: warning[-Wunused-function]: ‘wdebug’ defined but not used
# 1006 | wdebug()
#      | ^~~~~~
# 1004|   
# 1005|   static void 
# 1006|-> wdebug()
# 1007|   {
# 1008|   /*		printf("WORD: '%s' rest '%s'\n", word, peekword());*/

Error: COMPILER_WARNING (CWE-1164): [#def523]
cdrkit-1.1.11/wodim/cue.c:1060:1: warning[-Wunused-function]: ‘ungetline’ defined but not used
# 1060 | ungetline()
#      | ^~~~~~~~~
# 1058|   
# 1059|   static void 
# 1060|-> ungetline()
# 1061|   {
# 1062|   	linelen = olinelen;

Error: COMPILER_WARNING (CWE-1164): [#def524]
cdrkit-1.1.11/wodim/cue.c:1153:1: warning[-Wunused-function]: ‘nextword’ defined but not used
# 1153 | nextword()
#      | ^~~~~~~~
# 1151|   
# 1152|   static char *
# 1153|-> nextword()
# 1154|   {
# 1155|   	return (getnextitem(worddelim));

Error: COMPILER_WARNING (CWE-1164): [#def525]
cdrkit-1.1.11/wodim/cue.c:1165:1: warning[-Wunused-function]: ‘curword’ defined but not used
# 1165 | curword()
#      | ^~~~~~~
# 1163|   
# 1164|   static char *
# 1165|-> curword()
# 1166|   {
# 1167|   	return (linep);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def526]
cdrkit-1.1.11/wodim/defaults.c:139:1: warning[-Wanalyzer-malloc-leak]: leak of ‘devcand’
cdrkit-1.1.11/wodim/defaults.c:49:16: branch_false: following ‘false’ branch (when ‘t’ is NULL)...
cdrkit-1.1.11/wodim/defaults.c:51:26: branch_false: ...to here
cdrkit-1.1.11/wodim/defaults.c:51:16: branch_true: following ‘true’ branch...
cdrkit-1.1.11/wodim/defaults.c:52:25: branch_true: ...to here
cdrkit-1.1.11/wodim/defaults.c:52:25: acquire_memory: allocated here
cdrkit-1.1.11/wodim/defaults.c:54:11: branch_true: following ‘true’ branch (when ‘devcand’ is non-NULL)...
cdrkit-1.1.11/wodim/defaults.c:54:34: branch_true: ...to here
cdrkit-1.1.11/wodim/defaults.c:101:11: branch_false: following ‘false’ branch (when ‘p_fifosize’ is NULL)...
cdrkit-1.1.11/wodim/defaults.c:134:11: branch_false: ...to here
cdrkit-1.1.11/wodim/defaults.c:139:1: danger: ‘devcand’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  137|     cfg_close();
#  138|   
#  139|-> }

Error: GCC_ANALYZER_WARNING (CWE-131): [#def527]
cdrkit-1.1.11/wodim/drv_7501.c:729:15: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
#  727|   	int	scms;
#  728|   
#  729|-> 	cue = malloc(1);
#  730|   
#  731|   	for (i = 0; i <= tracks; i++) {

Error: CPPCHECK_WARNING (CWE-401): [#def528]
cdrkit-1.1.11/wodim/drv_7501.c:739: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
#  737|   		if (trackp[i].isrc) {	/* MCN or ISRC */
#  738|   			ncue += 2;
#  739|-> 			cue = realloc(cue, ncue * sizeof (*cue));
#  740|   			cp = &cue[icue++];
#  741|   			if (i == 0) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def529]
cdrkit-1.1.11/wodim/drv_7501.c:742:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cp’
cdrkit-1.1.11/wodim/drv_7501.c:731:21: branch_true: following ‘true’ branch (when ‘i <= tracks’)...
cdrkit-1.1.11/wodim/drv_7501.c:732:38: branch_true: ...to here
cdrkit-1.1.11/wodim/drv_7501.c:737:20: branch_true: following ‘true’ branch...
cdrkit-1.1.11/wodim/drv_7501.c:738:25: branch_true: ...to here
cdrkit-1.1.11/wodim/drv_7501.c:740:25: release_memory: ‘cue’ is NULL
cdrkit-1.1.11/wodim/drv_7501.c:741:28: branch_true: following ‘true’ branch (when ‘i == 0’)...
cdrkit-1.1.11/wodim/drv_7501.c:742:33: branch_true: ...to here
cdrkit-1.1.11/wodim/drv_7501.c:742:33: danger: dereference of NULL ‘cp’
#  740|   			cp = &cue[icue++];
#  741|   			if (i == 0) {
#  742|-> 				cp->cs_ctladr = 0x02;
#  743|   				movebytes(&trackp[i].isrc[0], &cp->cs_tno, 7);
#  744|   				cp = &cue[icue++];

Error: CPPCHECK_WARNING (CWE-401): [#def530]
cdrkit-1.1.11/wodim/drv_7501.c:759: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
#  757|   		if (i == 0) {	/* Lead in */
#  758|   			lba_to_msf(-150, &m);
#  759|-> 			cue = realloc(cue, ++ncue * sizeof (*cue));
#  760|   			cp = &cue[icue++];
#  761|   			fillcue(cp, ctl|0x01, i, 0, df, 0, &m);

Error: CPPCHECK_WARNING (CWE-401): [#def531]
cdrkit-1.1.11/wodim/drv_7501.c:771: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
#  769|   				pgsize++;
#  770|   			lba_to_msf(trackp[i].trackstart-pgsize, &m);
#  771|-> 			cue = realloc(cue, ++ncue * sizeof (*cue));
#  772|   			cp = &cue[icue++];
#  773|   			fillcue(cp, ctl|0x01, i, 0, df, scms, &m);

Error: CPPCHECK_WARNING (CWE-401): [#def532]
cdrkit-1.1.11/wodim/drv_7501.c:777: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
#  775|   			if (trackp[i].nindex == 1) {
#  776|   				lba_to_msf(trackp[i].trackstart, &m);
#  777|-> 				cue = realloc(cue, ++ncue * sizeof (*cue));
#  778|   				cp = &cue[icue++];
#  779|   				fillcue(cp, ctl|0x01, i, 1, df, scms, &m);

Error: CPPCHECK_WARNING (CWE-401): [#def533]
cdrkit-1.1.11/wodim/drv_7501.c:786: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
#  784|   				ncue += trackp[i].nindex;
#  785|   				idxlist = trackp[i].tindex;
#  786|-> 				cue = realloc(cue, ncue * sizeof (*cue));
#  787|   
#  788|   				for (idx = 1; idx <= trackp[i].nindex; idx++) {

Error: CPPCHECK_WARNING (CWE-401): [#def534]
cdrkit-1.1.11/wodim/drv_7501.c:800: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
#  798|   	df = db2phys[trackp[tracks+1].dbtype & 0x0F];
#  799|   	lba_to_msf(trackp[tracks+1].trackstart, &m);
#  800|-> 	cue = realloc(cue, ++ncue * sizeof (*cue));
#  801|   	cp = &cue[icue++];
#  802|   	fillcue(cp, ctl|0x01, 0xAA, 1, df, 0, &m);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def535]
cdrkit-1.1.11/wodim/drv_7501.c:813:16: warning[-Wanalyzer-malloc-leak]: leak of ‘cue’
cdrkit-1.1.11/wodim/drv_7501.c:714:1: enter_function: entry to ‘cw7501_gen_cue’
cdrkit-1.1.11/wodim/drv_7501.c:729:15: acquire_memory: allocated here
cdrkit-1.1.11/wodim/drv_7501.c:731:21: branch_true: following ‘true’ branch (when ‘i <= tracks’)...
cdrkit-1.1.11/wodim/drv_7501.c:732:38: branch_true: ...to here
cdrkit-1.1.11/wodim/drv_7501.c:737:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/wodim/drv_7501.c:757:20: branch_false: ...to here
cdrkit-1.1.11/wodim/drv_7501.c:757:20: branch_true: following ‘true’ branch (when ‘i == 0’)...
cdrkit-1.1.11/wodim/drv_7501.c:758:25: branch_true: ...to here
cdrkit-1.1.11/wodim/drv_7501.c:761:25: call_function: calling ‘fillcue’ from ‘cw7501_gen_cue’
cdrkit-1.1.11/wodim/drv_7501.c:761:25: return_function: returning to ‘cw7501_gen_cue’ from ‘fillcue’
cdrkit-1.1.11/wodim/drv_7501.c:731:21: branch_false: following ‘false’ branch (when ‘i > tracks’)...
cdrkit-1.1.11/wodim/drv_7501.c:797:30: branch_false: ...to here
cdrkit-1.1.11/wodim/drv_7501.c:802:9: call_function: calling ‘fillcue’ from ‘cw7501_gen_cue’
cdrkit-1.1.11/wodim/drv_7501.c:802:9: return_function: returning to ‘cw7501_gen_cue’ from ‘fillcue’
cdrkit-1.1.11/wodim/drv_7501.c:804:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/wodim/drv_7501.c:809:12: branch_false: ...to here
cdrkit-1.1.11/wodim/drv_7501.c:809:12: branch_true: following ‘true’ branch (when ‘vcuep’ is non-NULL)...
cdrkit-1.1.11/wodim/drv_7501.c:810:17: branch_true: ...to here
cdrkit-1.1.11/wodim/drv_7501.c:813:16: danger: ‘cue’ leaks here; was allocated at [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1)
#  811|   	else
#  812|   		free(cue);
#  813|-> 	return (ncue);
#  814|   }
#  815|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def536]
cdrkit-1.1.11/wodim/drv_7501.c:825:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cp’
cdrkit-1.1.11/wodim/drv_7501.c:714:1: enter_function: entry to ‘cw7501_gen_cue’
cdrkit-1.1.11/wodim/drv_7501.c:731:21: branch_false: following ‘false’ branch (when ‘i > tracks’)...
cdrkit-1.1.11/wodim/drv_7501.c:797:30: branch_false: ...to here
cdrkit-1.1.11/wodim/drv_7501.c:801:9: release_memory: ‘cue’ is NULL
cdrkit-1.1.11/wodim/drv_7501.c:802:9: call_function: calling ‘fillcue’ from ‘cw7501_gen_cue’
#  823|           msf_t *mp				/* MSF value for this entry */)
#  824|   {
#  825|-> 	cp->cs_ctladr = ca;
#  826|   	if (tno <= 99)
#  827|   		cp->cs_tno = to_bcd(tno);

Error: COMPILER_WARNING (CWE-563): [#def537]
cdrkit-1.1.11/wodim/drv_jvc.c: scope_hint: In function ‘teac_getdisktype’
cdrkit-1.1.11/wodim/drv_jvc.c:313:17: warning[-Wunused-but-set-variable]: variable ‘len’ set but not used
#  313 |         int     len;
#      |                 ^~~
#  311|   	int	count = sizeof (struct scsi_mode_header) +
#  312|   			sizeof (struct scsi_mode_blockdesc);
#  313|-> 	int	len;
#  314|   	int	page = 0;
#  315|   	long	l;

Error: COMPILER_WARNING (CWE-563): [#def538]
cdrkit-1.1.11/wodim/drv_jvc.c: scope_hint: In function ‘select_secsize_teac’
cdrkit-1.1.11/wodim/drv_jvc.c:380:17: warning[-Wunused-but-set-variable]: variable ‘len’ set but not used
#  380 |         int     len;
#      |                 ^~~
#  378|   	int	count = sizeof (struct scsi_mode_header) +
#  379|   			sizeof (struct scsi_mode_blockdesc);
#  380|-> 	int	len;
#  381|   	int	page = 0;
#  382|   

Error: COMPILER_WARNING (CWE-1164): [#def539]
cdrkit-1.1.11/wodim/drv_jvc.c:1012:1: warning[-Wunused-function]: ‘read_disk_info_teac’ defined but not used
# 1012 | read_disk_info_teac(SCSI *usalp, Uchar *data, int length, int type)
#      | ^~~~~~~~~~~~~~~~~~~
# 1010|   
# 1011|   static int 
# 1012|-> read_disk_info_teac(SCSI *usalp, Uchar *data, int length, int type)
# 1013|   {
# 1014|   	register struct	usal_cmd	*scmd = usalp->scmd;

Error: COMPILER_WARNING (CWE-1164): [#def540]
cdrkit-1.1.11/wodim/drv_jvc.c: scope_hint: At top level
cdrkit-1.1.11/wodim/drv_jvc.c:1249:1: warning[-Wunused-function]: ‘buffer_inquiry_teac’ defined but not used
# 1249 | buffer_inquiry_teac(SCSI *usalp, int fmt)
#      | ^~~~~~~~~~~~~~~~~~~
# 1247|   
# 1248|   static int 
# 1249|-> buffer_inquiry_teac(SCSI *usalp, int fmt)
# 1250|   {
# 1251|   	Uchar	xx[448];

Error: COMPILER_WARNING (CWE-563): [#def541]
cdrkit-1.1.11/wodim/drv_mmc.c: scope_hint: In function ‘hasdrvopt’
cdrkit-1.1.11/wodim/drv_mmc.c:510:17: warning[-Wunused-but-set-variable]: variable ‘optnamelen’ set but not used
#  510 |         int     optnamelen;
#      |                 ^~~~~~~~~~
#  508|   	char	*np;
#  509|   	char	*ret = NULL;
#  510|-> 	int	optnamelen;
#  511|   	int	optlen;
#  512|   	BOOL	not = FALSE;

Error: COMPILER_WARNING (CWE-1164): [#def542]
cdrkit-1.1.11/wodim/drv_mmc.c:1458:1: warning[-Wunused-function]: ‘get_pma’ defined but not used
# 1458 | get_pma(SCSI *usalp)
#      | ^~~~~~~
# 1456|   
# 1457|   static int 
# 1458|-> get_pma(SCSI *usalp)
# 1459|   {
# 1460|   	int	len;

Error: COMPILER_WARNING (CWE-483): [#def543]
cdrkit-1.1.11/wodim/drv_mmc.c: scope_hint: In function ‘getdisktype_mdvd’
cdrkit-1.1.11/wodim/drv_mmc.c:1515:5: warning[-Wmisleading-indentation]: this ‘if’ clause does not guard...
# 1515 |     if(lverbose)
#      |     ^~
cdrkit-1.1.11/wodim/drv_mmc.c:1523:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
# 1523 |         if(read_rzone_info(usalp, (caddr_t)&track_info, sizeof(track_info))>=0)
#      |         ^~
# 1513|   	int profile;
# 1514|   
# 1515|->     if(lverbose)
# 1516|           printf("HINT: use dvd+rw-mediainfo from dvd+rw-tools for information extraction.\n");
# 1517|   	/* if(getdisktype_mmc(usalp, dp)<0)

Error: CPPCHECK_WARNING (CWE-457): [#def544]
cdrkit-1.1.11/wodim/drv_mmc.c:1523: error[uninitvar]: Uninitialized variable: track_info
# 1521|   	/* read rzone info to get the space left on disk */
# 1522|   	/*ds_trlast is the last rzone on disk, can be invisible */
# 1523|-> 	if(read_rzone_info(usalp, (caddr_t)&track_info, sizeof(track_info))>=0)
# 1524|   		dsp->ds_maxblocks=a_to_u_4_byte(track_info.free_blocks)+a_to_4_byte(track_info.next_writable_addr);
# 1525|   

Error: COMPILER_WARNING (CWE-1164): [#def545]
cdrkit-1.1.11/wodim/drv_mmc.c: scope_hint: At top level
cdrkit-1.1.11/wodim/drv_mmc.c:1704:1: warning[-Wunused-function]: ‘print_di’ defined but not used
# 1704 | print_di(struct disk_info *dip)
#      | ^~~~~~~~
# 1702|   
# 1703|   static void 
# 1704|-> print_di(struct disk_info *dip)
# 1705|   {
# 1706|   	static	char *ds_name[] = { "empty", "incomplete/appendable", "complete", "illegal" };

Error: CPPCHECK_WARNING (CWE-457): [#def546]
cdrkit-1.1.11/wodim/drv_mmc.c:2134: error[uninitvar]: Uninitialized variable: track_info
# 2132|   	if (trackp != 0 && trackp->track > 0 && is_packet(trackp)) {
# 2133|   		usalp->silent++;
# 2134|-> 		result = read_track_info(usalp, (caddr_t)&track_info, TI_TYPE_TRACK,
# 2135|   							trackp->trackno,
# 2136|   							sizeof (track_info));

Error: CPPCHECK_WARNING (CWE-457): [#def547]
cdrkit-1.1.11/wodim/drv_mmc.c:2263: error[uninitvar]: Uninitialized variable: track_info
# 2261|   	if (trackp != 0 && track > 0 && is_packet(trackp)) {
# 2262|   		usalp->silent++;
# 2263|-> 		result = read_track_info(usalp, (caddr_t)&track_info, TI_TYPE_SESS, track, sizeof(track_info));
# 2264|   		usalp->silent--;
# 2265|   		if (scsi_in_progress(usalp)){

Error: CPPCHECK_WARNING (CWE-457): [#def548]
cdrkit-1.1.11/wodim/drv_mmc.c:2273: error[uninitvar]: Uninitialized variable: disk_info
# 2271|   	if (result < 0) {
# 2272|   	  /* Get the last rzone*/
# 2273|-> 	        if(read_disk_info(usalp,(caddr_t)&disk_info,8)<0)
# 2274|   		  return (-1);
# 2275|   	     

Error: GCC_ANALYZER_WARNING (CWE-131): [#def549]
cdrkit-1.1.11/wodim/drv_mmc.c:3193:15: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
# 3191|   	int	scms;
# 3192|   
# 3193|-> 	cue = malloc(1);
# 3194|   
# 3195|   	for (i = 0; i <= tracks; i++) {

Error: CPPCHECK_WARNING (CWE-401): [#def550]
cdrkit-1.1.11/wodim/drv_mmc.c:3213: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
# 3211|   		if (trackp[i].isrc) {	/* MCN or ISRC */
# 3212|   			ncue += 2;
# 3213|-> 			cue = realloc(cue, ncue * sizeof (*cue));
# 3214|   			cp = &cue[icue++];
# 3215|   			if (i == 0) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def551]
cdrkit-1.1.11/wodim/drv_mmc.c:3216:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cp’
cdrkit-1.1.11/wodim/drv_mmc.c:3195:21: branch_true: following ‘true’ branch (when ‘i <= tracks’)...
cdrkit-1.1.11/wodim/drv_mmc.c:3196:38: branch_true: ...to here
cdrkit-1.1.11/wodim/drv_mmc.c:3211:20: branch_true: following ‘true’ branch...
cdrkit-1.1.11/wodim/drv_mmc.c:3212:25: branch_true: ...to here
cdrkit-1.1.11/wodim/drv_mmc.c:3214:25: release_memory: ‘cue’ is NULL
cdrkit-1.1.11/wodim/drv_mmc.c:3215:28: branch_true: following ‘true’ branch (when ‘i == 0’)...
cdrkit-1.1.11/wodim/drv_mmc.c:3216:33: branch_true: ...to here
cdrkit-1.1.11/wodim/drv_mmc.c:3216:33: danger: dereference of NULL ‘cp’
# 3214|   			cp = &cue[icue++];
# 3215|   			if (i == 0) {
# 3216|-> 				cp->cs_ctladr = 0x02;
# 3217|   				movebytes(&trackp[i].isrc[0], &cp->cs_tno, 7);
# 3218|   				cp = &cue[icue++];

Error: CPPCHECK_WARNING (CWE-401): [#def552]
cdrkit-1.1.11/wodim/drv_mmc.c:3240: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
# 3238|   				df |= 0x40;
# 3239|   			lba_to_msf(-150, &m);
# 3240|-> 			cue = realloc(cue, ++ncue * sizeof (*cue));
# 3241|   			cp = &cue[icue++];
# 3242|   			fillcue(cp, ctl|0x01, i, 0, df, 0, &m);

Error: CPPCHECK_WARNING (CWE-401): [#def553]
cdrkit-1.1.11/wodim/drv_mmc.c:3252: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
# 3250|   				pgsize++;
# 3251|   			lba_to_msf(trackp[i].trackstart-pgsize, &m);
# 3252|-> 			cue = realloc(cue, ++ncue * sizeof (*cue));
# 3253|   			cp = &cue[icue++];
# 3254|   			fillcue(cp, ctl|0x01, i, 0, df, scms, &m);

Error: CPPCHECK_WARNING (CWE-401): [#def554]
cdrkit-1.1.11/wodim/drv_mmc.c:3258: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
# 3256|   			if (trackp[i].nindex == 1) {
# 3257|   				lba_to_msf(trackp[i].trackstart, &m);
# 3258|-> 				cue = realloc(cue, ++ncue * sizeof (*cue));
# 3259|   				cp = &cue[icue++];
# 3260|   				fillcue(cp, ctl|0x01, i, 1, df, scms, &m);

Error: CPPCHECK_WARNING (CWE-401): [#def555]
cdrkit-1.1.11/wodim/drv_mmc.c:3267: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
# 3265|   				ncue += trackp[i].nindex;
# 3266|   				idxlist = trackp[i].tindex;
# 3267|-> 				cue = realloc(cue, ncue * sizeof (*cue));
# 3268|   
# 3269|   				for (idx = 1; idx <= trackp[i].nindex; idx++) {

Error: CPPCHECK_WARNING (CWE-401): [#def556]
cdrkit-1.1.11/wodim/drv_mmc.c:3298: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
# 3296|   		df |= 4;
# 3297|   	lba_to_msf(trackp[tracks+1].trackstart, &m);
# 3298|-> 	cue = realloc(cue, ++ncue * sizeof (*cue));
# 3299|   	cp = &cue[icue++];
# 3300|   	fillcue(cp, ctl|0x01, 0xAA, 1, df, 0, &m);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def557]
cdrkit-1.1.11/wodim/drv_mmc.c:3311:16: warning[-Wanalyzer-malloc-leak]: leak of ‘cue’
cdrkit-1.1.11/wodim/drv_mmc.c:3193:15: acquire_memory: allocated here
cdrkit-1.1.11/wodim/drv_mmc.c:3195:21: branch_true: following ‘true’ branch (when ‘i <= tracks’)...
cdrkit-1.1.11/wodim/drv_mmc.c:3196:38: branch_true: ...to here
cdrkit-1.1.11/wodim/drv_mmc.c:3211:20: branch_false: following ‘false’ branch...
cdrkit-1.1.11/wodim/drv_mmc.c:3231:20: branch_false: ...to here
cdrkit-1.1.11/wodim/drv_mmc.c:3231:20: branch_true: following ‘true’ branch (when ‘i == 0’)...
cdrkit-1.1.11/wodim/drv_mmc.c:3232:25: branch_true: ...to here
cdrkit-1.1.11/wodim/drv_mmc.c:3195:21: branch_false: following ‘false’ branch (when ‘i > tracks’)...
cdrkit-1.1.11/wodim/drv_mmc.c:3278:30: branch_false: ...to here
cdrkit-1.1.11/wodim/drv_mmc.c:3302:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/wodim/drv_mmc.c:3307:12: branch_false: ...to here
cdrkit-1.1.11/wodim/drv_mmc.c:3307:12: branch_true: following ‘true’ branch (when ‘vcuep’ is non-NULL)...
cdrkit-1.1.11/wodim/drv_mmc.c:3308:17: branch_true: ...to here
cdrkit-1.1.11/wodim/drv_mmc.c:3311:16: danger: ‘cue’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 3309|   	else
# 3310|   		free(cue);
# 3311|-> 	return (ncue);
# 3312|   }
# 3313|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def558]
cdrkit-1.1.11/wodim/drv_mmc.c:3323:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cp’
cdrkit-1.1.11/wodim/drv_mmc.c:3195:21: branch_false: following ‘false’ branch (when ‘i > tracks’)...
cdrkit-1.1.11/wodim/drv_mmc.c:3278:30: branch_false: ...to here
cdrkit-1.1.11/wodim/drv_mmc.c:3299:9: release_memory: ‘cue’ is NULL
cdrkit-1.1.11/wodim/drv_mmc.c:3300:9: call_function: inlined call to ‘fillcue’ from ‘gen_cue_mmc’
# 3321|           msf_t *mp           /* MSF value for this entry */)
# 3322|   {
# 3323|-> 	cp->cs_ctladr = ca;		/* XXX wie lead in */
# 3324|   	cp->cs_tno = tno;
# 3325|   	cp->cs_index = idx;

Error: COMPILER_WARNING: [#def559]
cdrkit-1.1.11/wodim/drv_mmc.c: scope_hint: In function ‘drivemode_plextor’
cdrkit-1.1.11/wodim/drv_mmc.c:3543:17: warning[-Wstringop-overflow=]: writing 1 byte into a region of size 0
# 3543 |                 i_to_2_byte(&scmd->cdb.g1_cdb.count[2], cnt);
#      |                 ^
cdrkit-1.1.11/libusal/usal/scsicdb.h:125:17: note: at offset 2 into destination object ‘count’ of size 2
#  125 |         Uchar   count[2];       /* transfer length */
#      |                 ^
# 3541|   		movebytes(modeval, &scmd->cdb.g1_cdb.addr[1], 6);
# 3542|   	else
# 3543|-> 		i_to_2_byte(&scmd->cdb.g1_cdb.count[2], cnt);
# 3544|   
# 3545|   	usalp->cmdname = "plextor drive mode";

Error: COMPILER_WARNING: [#def560]
cdrkit-1.1.11/wodim/drv_mmc.c:3543:17: warning[-Wstringop-overflow=]: writing 1 byte into a region of size 0
# 3541|   		movebytes(modeval, &scmd->cdb.g1_cdb.addr[1], 6);
# 3542|   	else
# 3543|-> 		i_to_2_byte(&scmd->cdb.g1_cdb.count[2], cnt);
# 3544|   
# 3545|   	usalp->cmdname = "plextor drive mode";

Error: CPPCHECK_WARNING (CWE-457): [#def561]
cdrkit-1.1.11/wodim/drv_philips.c:949: error[uninitvar]: Uninitialized variable: fwa
#  947|   	register struct	usal_cmd	*scmd = usalp->scmd;
#  948|   
#  949|-> 	fillbytes((caddr_t)&fwa, sizeof (fwa), '\0');
#  950|   	fillbytes((caddr_t)scmd, sizeof (*scmd), '\0');
#  951|   	scmd->addr = (caddr_t)&fwa;

Error: COMPILER_WARNING (CWE-1164): [#def562]
cdrkit-1.1.11/wodim/drv_sony.c:454:1: warning[-Wunused-function]: ‘flush_sony’ defined but not used
#  454 | flush_sony(SCSI *usalp, int track)
#      | ^~~~~~~~~~
#  452|   
#  453|   static int
#  454|-> flush_sony(SCSI *usalp, int track)
#  455|   {
#  456|   	register struct	usal_cmd	*scmd = usalp->scmd;

Error: COMPILER_WARNING (CWE-1164): [#def563]
cdrkit-1.1.11/wodim/drv_sony.c: scope_hint: At top level
cdrkit-1.1.11/wodim/drv_sony.c:498:1: warning[-Wunused-function]: ‘set_wr_parameter_sony’ defined but not used
#  498 | set_wr_parameter_sony(SCSI *usalp, caddr_t bp, int size)
#      | ^~~~~~~~~~~~~~~~~~~~~
#  496|   
#  497|   static int
#  498|-> set_wr_parameter_sony(SCSI *usalp, caddr_t bp, int size)
#  499|   {
#  500|   	register struct	usal_cmd	*scmd = usalp->scmd;

Error: COMPILER_WARNING (CWE-563): [#def564]
cdrkit-1.1.11/wodim/drv_sony.c: scope_hint: In function ‘get_page22_sony’
cdrkit-1.1.11/wodim/drv_sony.c:949:42: warning[-Wunused-but-set-variable]: variable ‘xp’ set but not used
#  949 |         struct sony_924_mode_page_22    *xp;
#      |                                          ^~
#  947|   	int	len = 0x30;
#  948|   	int	page = 0x22;
#  949|-> 	struct sony_924_mode_page_22	*xp;
#  950|   
#  951|   	fillbytes((caddr_t)mode, sizeof (mode), '\0');

Error: GCC_ANALYZER_WARNING (CWE-131): [#def565]
cdrkit-1.1.11/wodim/drv_sony.c:1012:15: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
# 1010|   	int	scms;
# 1011|   
# 1012|-> 	cue = malloc(1);
# 1013|   
# 1014|   	for (i = 0; i <= tracks; i++) {

Error: CPPCHECK_WARNING (CWE-401): [#def566]
cdrkit-1.1.11/wodim/drv_sony.c:1047: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
# 1045|   				df |= 0xC0;
# 1046|   			lba_to_msf(-150, &m);
# 1047|-> 			cue = realloc(cue, ++ncue * sizeof (*cue));
# 1048|   			cp = &cue[icue++];
# 1049|   			fillcue(cp, ctl|0x01, i, 0, df, 0, &m);

Error: CPPCHECK_WARNING (CWE-401): [#def567]
cdrkit-1.1.11/wodim/drv_sony.c:1059: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
# 1057|   				pgsize++;
# 1058|   			lba_to_msf(trackp[i].trackstart-pgsize, &m);
# 1059|-> 			cue = realloc(cue, ++ncue * sizeof (*cue));
# 1060|   			cp = &cue[icue++];
# 1061|   			fillcue(cp, ctl|0x01, i, 0, df, scms, &m);

Error: CPPCHECK_WARNING (CWE-401): [#def568]
cdrkit-1.1.11/wodim/drv_sony.c:1065: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
# 1063|   			if (trackp[i].nindex == 1) {
# 1064|   				lba_to_msf(trackp[i].trackstart, &m);
# 1065|-> 				cue = realloc(cue, ++ncue * sizeof (*cue));
# 1066|   				cp = &cue[icue++];
# 1067|   				fillcue(cp, ctl|0x01, i, 1, df, scms, &m);

Error: CPPCHECK_WARNING (CWE-401): [#def569]
cdrkit-1.1.11/wodim/drv_sony.c:1074: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
# 1072|   				ncue += trackp[i].nindex;
# 1073|   				idxlist = trackp[i].tindex;
# 1074|-> 				cue = realloc(cue, ncue * sizeof (*cue));
# 1075|   
# 1076|   				for (idx = 1; idx <= trackp[i].nindex; idx++) {

Error: CPPCHECK_WARNING (CWE-401): [#def570]
cdrkit-1.1.11/wodim/drv_sony.c:1089: error[memleakOnRealloc]: Common realloc mistake: 'cue' nulled but not freed upon failure
# 1087|   	df &= ~7;
# 1088|   	lba_to_msf(trackp[tracks+1].trackstart, &m);
# 1089|-> 	cue = realloc(cue, ++ncue * sizeof (*cue));
# 1090|   	cp = &cue[icue++];
# 1091|   	fillcue(cp, ctl|0x01, 0xAA, 1, df, 0, &m);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def571]
cdrkit-1.1.11/wodim/drv_sony.c:1102:16: warning[-Wanalyzer-malloc-leak]: leak of ‘cue’
cdrkit-1.1.11/wodim/drv_sony.c:997:1: enter_function: entry to ‘gen_cue_sony’
cdrkit-1.1.11/wodim/drv_sony.c:1012:15: acquire_memory: allocated here
cdrkit-1.1.11/wodim/drv_sony.c:1014:21: branch_true: following ‘true’ branch (when ‘i <= tracks’)...
cdrkit-1.1.11/wodim/drv_sony.c:1015:38: branch_true: ...to here
cdrkit-1.1.11/wodim/drv_sony.c:1042:20: branch_true: following ‘true’ branch (when ‘i == 0’)...
cdrkit-1.1.11/wodim/drv_sony.c:1043:25: branch_true: ...to here
cdrkit-1.1.11/wodim/drv_sony.c:1049:25: call_function: calling ‘fillcue’ from ‘gen_cue_sony’
cdrkit-1.1.11/wodim/drv_sony.c:1049:25: return_function: returning to ‘gen_cue_sony’ from ‘fillcue’
cdrkit-1.1.11/wodim/drv_sony.c:1014:21: branch_false: following ‘false’ branch (when ‘i > tracks’)...
cdrkit-1.1.11/wodim/drv_sony.c:1085:30: branch_false: ...to here
cdrkit-1.1.11/wodim/drv_sony.c:1091:9: call_function: calling ‘fillcue’ from ‘gen_cue_sony’
cdrkit-1.1.11/wodim/drv_sony.c:1091:9: return_function: returning to ‘gen_cue_sony’ from ‘fillcue’
cdrkit-1.1.11/wodim/drv_sony.c:1093:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/wodim/drv_sony.c:1098:12: branch_false: ...to here
cdrkit-1.1.11/wodim/drv_sony.c:1098:12: branch_true: following ‘true’ branch (when ‘vcuep’ is non-NULL)...
cdrkit-1.1.11/wodim/drv_sony.c:1099:17: branch_true: ...to here
cdrkit-1.1.11/wodim/drv_sony.c:1102:16: danger: ‘cue’ leaks here; was allocated at [(2)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/1)
# 1100|   	else
# 1101|   		free(cue);
# 1102|-> 	return (ncue);
# 1103|   }
# 1104|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def572]
cdrkit-1.1.11/wodim/drv_sony.c:1115:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cp’
cdrkit-1.1.11/wodim/drv_sony.c:997:1: enter_function: entry to ‘gen_cue_sony’
cdrkit-1.1.11/wodim/drv_sony.c:1014:21: branch_false: following ‘false’ branch (when ‘i > tracks’)...
cdrkit-1.1.11/wodim/drv_sony.c:1085:30: branch_false: ...to here
cdrkit-1.1.11/wodim/drv_sony.c:1090:9: release_memory: ‘cue’ is NULL
cdrkit-1.1.11/wodim/drv_sony.c:1091:9: call_function: calling ‘fillcue’ from ‘gen_cue_sony’
# 1113|           msf_t *mp               /* MSF value for this entry */)
# 1114|   {
# 1115|-> 	cp->cs_ctladr = ca;
# 1116|   	if (tno <= 99)
# 1117|   		cp->cs_tno = to_bcd(tno);

Error: COMPILER_WARNING (CWE-563): [#def573]
cdrkit-1.1.11/wodim/drv_sony.c: scope_hint: In function ‘send_cue_sony’
cdrkit-1.1.11/wodim/drv_sony.c:1137:25: warning[-Wunused-but-set-variable]: variable ‘disktype’ set but not used
# 1137 |         int             disktype;
#      |                         ^~~~~~~~
# 1135|   	struct timeval starttime;
# 1136|   	struct timeval stoptime;
# 1137|-> 	int		disktype;
# 1138|   
# 1139|   	disktype = toc2sess[track_base(trackp)->tracktype & TOC_MASK];

Error: COMPILER_WARNING (CWE-563): [#def574]
cdrkit-1.1.11/wodim/isosize.c: scope_hint: In function ‘isosize’
cdrkit-1.1.11/wodim/isosize.c:72:24: warning[-Wunused-but-set-variable]: variable ‘ret’ set but not used
#   72 |                 do{int ret;ret=read(f, &vd, sizeof (vd));}while(0); /* FIXME: check return value */
#      |                        ^~~
#   70|   
#   71|   	do {
#   72|-> 		do{int ret;ret=read(f, &vd, sizeof (vd));}while(0); /* FIXME: check return value */
#   73|   		if (GET_UBYTE(vd.vd_type) == VD_PRIMARY)
#   74|   			break;

Error: COMPILER_WARNING (CWE-805): [#def575]
cdrkit-1.1.11/wodim/scsi_cdr.c: scope_hint: In function ‘getdev’
cdrkit-1.1.11/wodim/scsi_cdr.c:2150:55: warning[-Wsizeof-pointer-memaccess]: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination?
# 2150 |         strncpy(vendor_info, inq->vendor_info, sizeof (inq->vendor_info));
#      |                                                       ^
# 2148|   	}
# 2149|   
# 2150|-> 	strncpy(vendor_info, inq->vendor_info, sizeof (inq->vendor_info));
# 2151|   	strncpy(prod_ident, inq->prod_ident, sizeof (inq->prod_ident));
# 2152|   	strncpy(prod_revision, inq->prod_revision, sizeof (inq->prod_revision));

Error: COMPILER_WARNING (CWE-805): [#def576]
cdrkit-1.1.11/wodim/scsi_cdr.c:2151:53: warning[-Wsizeof-pointer-memaccess]: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination?
# 2151 |         strncpy(prod_ident, inq->prod_ident, sizeof (inq->prod_ident));
#      |                                                     ^
# 2149|   
# 2150|   	strncpy(vendor_info, inq->vendor_info, sizeof (inq->vendor_info));
# 2151|-> 	strncpy(prod_ident, inq->prod_ident, sizeof (inq->prod_ident));
# 2152|   	strncpy(prod_revision, inq->prod_revision, sizeof (inq->prod_revision));
# 2153|   

Error: COMPILER_WARNING (CWE-805): [#def577]
cdrkit-1.1.11/wodim/scsi_cdr.c:2152:59: warning[-Wsizeof-pointer-memaccess]: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination?
# 2152 |         strncpy(prod_revision, inq->prod_revision, sizeof (inq->prod_revision));
#      |                                                           ^
# 2150|   	strncpy(vendor_info, inq->vendor_info, sizeof (inq->vendor_info));
# 2151|   	strncpy(prod_ident, inq->prod_ident, sizeof (inq->prod_ident));
# 2152|-> 	strncpy(prod_revision, inq->prod_revision, sizeof (inq->prod_revision));
# 2153|   
# 2154|   	vendor_info[sizeof (inq->vendor_info)] = '\0';

Error: COMPILER_WARNING: [#def578]
cdrkit-1.1.11/wodim/scsi_cdr.c:2184:33: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length
# 2184 |                                 strncpy(inq->vendor_info, "ADAPTEC ", 8);
#      |                                 ^
# 2182|   			if (usalp->dev == DEV_UNKNOWN && got_inquiry) {
# 2183|   				usalp->dev = DEV_ACB5500;
# 2184|-> 				strncpy(inq->vendor_info, "ADAPTEC ", 8);
# 2185|   				strncpy(inq->prod_ident,"ACB-5500        ", 16);
# 2186|   				strncpy(inq->prod_revision, "FAKE", 4);

Error: COMPILER_WARNING: [#def579]
cdrkit-1.1.11/wodim/scsi_cdr.c:2185:33: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 16 bytes from a string of the same length
# 2185 |                                 strncpy(inq->prod_ident,"ACB-5500        ", 16);
#      |                                 ^
# 2183|   				usalp->dev = DEV_ACB5500;
# 2184|   				strncpy(inq->vendor_info, "ADAPTEC ", 8);
# 2185|-> 				strncpy(inq->prod_ident,"ACB-5500        ", 16);
# 2186|   				strncpy(inq->prod_revision, "FAKE", 4);
# 2187|   

Error: COMPILER_WARNING: [#def580]
cdrkit-1.1.11/wodim/scsi_cdr.c: scope_hint: In function ‘getdev’
cdrkit-1.1.11/wodim/scsi_cdr.c:2186:33: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length
# 2186 |                                 strncpy(inq->prod_revision, "FAKE", 4);
#      |                                 ^
# 2184|   				strncpy(inq->vendor_info, "ADAPTEC ", 8);
# 2185|   				strncpy(inq->prod_ident,"ACB-5500        ", 16);
# 2186|-> 				strncpy(inq->prod_revision, "FAKE", 4);
# 2187|   
# 2188|   			} else switch (usalp->dev) {

Error: COMPILER_WARNING: [#def581]
cdrkit-1.1.11/wodim/scsi_cdr.c:2190:41: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length
# 2190 |                                         strncpy(inq->vendor_info, "ADAPTEC ", 8);
#      |                                         ^
# 2188|   			} else switch (usalp->dev) {
# 2189|   				case DEV_ACB40X0:
# 2190|-> 					strncpy(inq->vendor_info, "ADAPTEC ", 8);
# 2191|   					strncpy(inq->prod_ident, "ACB-40X0        ",16);
# 2192|   					strncpy(inq->prod_revision, "FAKE", 4);

Error: COMPILER_WARNING: [#def582]
cdrkit-1.1.11/wodim/scsi_cdr.c:2191:41: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 16 bytes from a string of the same length
# 2191 |                                         strncpy(inq->prod_ident, "ACB-40X0        ",16);
#      |                                         ^
# 2189|   				case DEV_ACB40X0:
# 2190|   					strncpy(inq->vendor_info, "ADAPTEC ", 8);
# 2191|-> 					strncpy(inq->prod_ident, "ACB-40X0        ",16);
# 2192|   					strncpy(inq->prod_revision, "FAKE", 4);
# 2193|   					break;

Error: COMPILER_WARNING: [#def583]
cdrkit-1.1.11/wodim/scsi_cdr.c:2192:41: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length
# 2192 |                                         strncpy(inq->prod_revision, "FAKE", 4);
#      |                                         ^
# 2190|   					strncpy(inq->vendor_info, "ADAPTEC ", 8);
# 2191|   					strncpy(inq->prod_ident, "ACB-40X0        ",16);
# 2192|-> 					strncpy(inq->prod_revision, "FAKE", 4);
# 2193|   					break;
# 2194|   				case DEV_ACB4000:

Error: COMPILER_WARNING: [#def584]
cdrkit-1.1.11/wodim/scsi_cdr.c:2195:41: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length
# 2195 |                                         strncpy(inq->vendor_info, "ADAPTEC ",8);
#      |                                         ^
# 2193|   					break;
# 2194|   				case DEV_ACB4000:
# 2195|-> 					strncpy(inq->vendor_info, "ADAPTEC ",8);
# 2196|   					strncpy(inq->prod_ident, "ACB-4000        ",16);
# 2197|   					strncpy(inq->prod_revision, "FAKE",4);

Error: COMPILER_WARNING: [#def585]
cdrkit-1.1.11/wodim/scsi_cdr.c:2196:41: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 16 bytes from a string of the same length
# 2196 |                                         strncpy(inq->prod_ident, "ACB-4000        ",16);
#      |                                         ^
# 2194|   				case DEV_ACB4000:
# 2195|   					strncpy(inq->vendor_info, "ADAPTEC ",8);
# 2196|-> 					strncpy(inq->prod_ident, "ACB-4000        ",16);
# 2197|   					strncpy(inq->prod_revision, "FAKE",4);
# 2198|   					break;

Error: COMPILER_WARNING: [#def586]
cdrkit-1.1.11/wodim/scsi_cdr.c:2197:41: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length
# 2197 |                                         strncpy(inq->prod_revision, "FAKE",4);
#      |                                         ^
# 2195|   					strncpy(inq->vendor_info, "ADAPTEC ",8);
# 2196|   					strncpy(inq->prod_ident, "ACB-4000        ",16);
# 2197|-> 					strncpy(inq->prod_revision, "FAKE",4);
# 2198|   					break;
# 2199|   				case DEV_ACB4010:

Error: COMPILER_WARNING: [#def587]
cdrkit-1.1.11/wodim/scsi_cdr.c:2200:41: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length
# 2200 |                                         strncpy(inq->vendor_info, "ADAPTEC ",8);
#      |                                         ^
# 2198|   					break;
# 2199|   				case DEV_ACB4010:
# 2200|-> 					strncpy(inq->vendor_info, "ADAPTEC ",8);
# 2201|   					strncpy(inq->prod_ident, "ACB-4010        ",16);
# 2202|   					strncpy(inq->prod_revision, "FAKE",4);

Error: COMPILER_WARNING: [#def588]
cdrkit-1.1.11/wodim/scsi_cdr.c:2201:41: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 16 bytes from a string of the same length
# 2201 |                                         strncpy(inq->prod_ident, "ACB-4010        ",16);
#      |                                         ^
# 2199|   				case DEV_ACB4010:
# 2200|   					strncpy(inq->vendor_info, "ADAPTEC ",8);
# 2201|-> 					strncpy(inq->prod_ident, "ACB-4010        ",16);
# 2202|   					strncpy(inq->prod_revision, "FAKE",4);
# 2203|   					break;

Error: COMPILER_WARNING: [#def589]
cdrkit-1.1.11/wodim/scsi_cdr.c:2202:41: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length
# 2202 |                                         strncpy(inq->prod_revision, "FAKE",4);
#      |                                         ^
# 2200|   					strncpy(inq->vendor_info, "ADAPTEC ",8);
# 2201|   					strncpy(inq->prod_ident, "ACB-4010        ",16);
# 2202|-> 					strncpy(inq->prod_revision, "FAKE",4);
# 2203|   					break;
# 2204|   				case DEV_ACB4070:

Error: COMPILER_WARNING: [#def590]
cdrkit-1.1.11/wodim/scsi_cdr.c:2205:41: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length
# 2205 |                                         strncpy(inq->vendor_info,"ADAPTEC ",8);
#      |                                         ^
# 2203|   					break;
# 2204|   				case DEV_ACB4070:
# 2205|-> 					strncpy(inq->vendor_info,"ADAPTEC ",8);
# 2206|   					strncpy(inq->prod_ident, "ACB-4070        ", 16);
# 2207|   					strncpy(inq->prod_revision, "FAKE",4 );

Error: COMPILER_WARNING: [#def591]
cdrkit-1.1.11/wodim/scsi_cdr.c:2206:41: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 16 bytes from a string of the same length
# 2206 |                                         strncpy(inq->prod_ident, "ACB-4070        ", 16);
#      |                                         ^
# 2204|   				case DEV_ACB4070:
# 2205|   					strncpy(inq->vendor_info,"ADAPTEC ",8);
# 2206|-> 					strncpy(inq->prod_ident, "ACB-4070        ", 16);
# 2207|   					strncpy(inq->prod_revision, "FAKE",4 );
# 2208|   					break;

Error: COMPILER_WARNING: [#def592]
cdrkit-1.1.11/wodim/scsi_cdr.c:2207:41: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length
# 2207 |                                         strncpy(inq->prod_revision, "FAKE",4 );
#      |                                         ^
# 2205|   					strncpy(inq->vendor_info,"ADAPTEC ",8);
# 2206|   					strncpy(inq->prod_ident, "ACB-4070        ", 16);
# 2207|-> 					strncpy(inq->prod_revision, "FAKE",4 );
# 2208|   					break;
# 2209|   			}

Error: COMPILER_WARNING: [#def593]
cdrkit-1.1.11/wodim/scsi_cdr.c:2237:25: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length
# 2237 |                         strncpy(inq->vendor_info,"SYSGEN  ",8);
#      |                         ^
# 2235|   	case INQ_SEQD:
# 2236|   		if (usalp->dev == DEV_SC4000) {
# 2237|-> 			strncpy(inq->vendor_info,"SYSGEN  ",8);
# 2238|   			strncpy(inq->prod_ident, "SC4000          ",16);
# 2239|   			strncpy(inq->prod_revision, "FAKE",4);

Error: COMPILER_WARNING: [#def594]
cdrkit-1.1.11/wodim/scsi_cdr.c:2238:25: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 16 bytes from a string of the same length
# 2238 |                         strncpy(inq->prod_ident, "SC4000          ",16);
#      |                         ^
# 2236|   		if (usalp->dev == DEV_SC4000) {
# 2237|   			strncpy(inq->vendor_info,"SYSGEN  ",8);
# 2238|-> 			strncpy(inq->prod_ident, "SC4000          ",16);
# 2239|   			strncpy(inq->prod_revision, "FAKE",4);
# 2240|   		} else if (inq->add_len == 0 &&

Error: COMPILER_WARNING: [#def595]
cdrkit-1.1.11/wodim/scsi_cdr.c:2239:25: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length
# 2239 |                         strncpy(inq->prod_revision, "FAKE",4);
#      |                         ^
# 2237|   			strncpy(inq->vendor_info,"SYSGEN  ",8);
# 2238|   			strncpy(inq->prod_ident, "SC4000          ",16);
# 2239|-> 			strncpy(inq->prod_revision, "FAKE",4);
# 2240|   		} else if (inq->add_len == 0 &&
# 2241|   					inq->removable &&

Error: COMPILER_WARNING: [#def596]
cdrkit-1.1.11/wodim/scsi_cdr.c:2244:25: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length
# 2244 |                         strncpy(inq->vendor_info,"EMULEX  ",8);
#      |                         ^
# 2242|   						inq->ansi_version == 1) {
# 2243|   			usalp->dev = DEV_MT02;
# 2244|-> 			strncpy(inq->vendor_info,"EMULEX  ",8);
# 2245|   			strncpy(inq->prod_ident, "MT02            ",16);
# 2246|   			strncpy(inq->prod_revision, "FAKE",4);

Error: COMPILER_WARNING: [#def597]
cdrkit-1.1.11/wodim/scsi_cdr.c:2245:25: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 16 bytes from a string of the same length
# 2245 |                         strncpy(inq->prod_ident, "MT02            ",16);
#      |                         ^
# 2243|   			usalp->dev = DEV_MT02;
# 2244|   			strncpy(inq->vendor_info,"EMULEX  ",8);
# 2245|-> 			strncpy(inq->prod_ident, "MT02            ",16);
# 2246|   			strncpy(inq->prod_revision, "FAKE",4);
# 2247|   		}

Error: COMPILER_WARNING: [#def598]
cdrkit-1.1.11/wodim/scsi_cdr.c:2246:25: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length
# 2246 |                         strncpy(inq->prod_revision, "FAKE",4);
#      |                         ^
# 2244|   			strncpy(inq->vendor_info,"EMULEX  ",8);
# 2245|   			strncpy(inq->prod_ident, "MT02            ",16);
# 2246|-> 			strncpy(inq->prod_revision, "FAKE",4);
# 2247|   		}
# 2248|   		break;

Error: COMPILER_WARNING (CWE-563): [#def599]
cdrkit-1.1.11/wodim/scsi_cdr.c: scope_hint: In function ‘mmc_getval’
cdrkit-1.1.11/wodim/scsi_cdr.c:2708:17: warning[-Wunused-but-set-variable]: variable ‘iscd_wr’ set but not used
# 2708 |         BOOL    iscd_wr;                        /* CD  writer           */
#      |                 ^~~~~~~
# 2706|   	BOOL	isdvd;				/* Any DVD reader	*/
# 2707|   	BOOL	isdvd_wr;			/* DVD writer (R / RAM)	*/
# 2708|-> 	BOOL	iscd_wr;			/* CD  writer		*/
# 2709|   
# 2710|   	iscd_wr = (mp->cd_r_write != 0) ||	/* SCSI-3/mmc CD-R	*/

Error: COMPILER_WARNING: [#def600]
cdrkit-1.1.11/wodim/scsi_scan.c: scope_hint: In function ‘open_auto’
cdrkit-1.1.11/wodim/scsi_scan.c:159:49: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 5 bytes from a string of the same length
#  159 |                                                 strncpy(result, "/dev/", 5);
#      |                                                 ^
#  157|   								*(descptr--)='\0';
#  158|   						}
#  159|-> 						strncpy(result, "/dev/", 5);
#  160|   						break;
#  161|   					}

Error: COMPILER_WARNING (CWE-563): [#def601]
cdrkit-1.1.11/wodim/scsi_scan.c: scope_hint: In function ‘list_devices’
cdrkit-1.1.11/wodim/scsi_scan.c:196:17: warning[-Wunused-but-set-variable]: variable ‘initiator’ set but not used
#  196 |         int     initiator;
#      |                 ^~~~~~~~~
#  194|   
#  195|   int list_devices(SCSI *usalp, FILE *f, int pickup_first) {
#  196|-> 	int	initiator;
#  197|   	int	i;
#  198|   	int	bus;

Error: COMPILER_WARNING (CWE-563): [#def602]
cdrkit-1.1.11/wodim/scsi_scan.c: scope_hint: In function ‘select_target’
cdrkit-1.1.11/wodim/scsi_scan.c:298:17: warning[-Wunused-but-set-variable]: variable ‘high’ set but not used
#  298 |         int     high    = -1;
#      |                 ^~~~
#  296|   	int	n;
#  297|   	int	low	= -1;
#  298|-> 	int	high	= -1;
#  299|   	int	amt	= 0;
#  300|   	int	bus;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def603]
cdrkit-1.1.11/wodim/sector.c:154:23: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*trackp.secsize’
cdrkit-1.1.11/wodim/sector.c:106:1: enter_function: entry to ‘encspeed’
cdrkit-1.1.11/wodim/sector.c:121:21: branch_true: following ‘true’ branch (when ‘i != 2352’)...
cdrkit-1.1.11/wodim/sector.c:122:22: branch_true: ...to here
cdrkit-1.1.11/wodim/sector.c:126:21: branch_true: following ‘true’ branch (when ‘i != 75000’)...
cdrkit-1.1.11/wodim/sector.c:127:17: branch_true: ...to here
cdrkit-1.1.11/wodim/sector.c:127:17: call_function: calling ‘encsectors’ from ‘encspeed’
#  152|   		encodesector(bp, sectype, address);
#  153|   		address++;
#  154|-> 		bp += trackp->secsize;
#  155|   	}
#  156|   }

Error: COMPILER_WARNING (CWE-1164): [#def604]
cdrkit-1.1.11/wodim/subchan.c:970:1: warning[-Wunused-function]: ‘subinterleave’ defined but not used
#  970 | subinterleave(Uchar *sub)
#      | ^~~~~~~~~~~~~
#  968|    */
#  969|   static void
#  970|-> subinterleave(Uchar *sub)
#  971|   {
#  972|   	Uchar	*p;

Error: COMPILER_WARNING (CWE-1164): [#def605]
cdrkit-1.1.11/wodim/wodim.c: scope_hint: At top level
cdrkit-1.1.11/wodim/wodim.c:256:17: warning[-Wunused-function]: ‘linuxcheck’ declared ‘static’ but never defined
#  256 | static  void    linuxcheck(void);
#      |                 ^~~~~~~~~~
#  254|   static	BOOL	check_wrmode(cdr_t *dp, int wmode, int tflags);
#  255|   static	void	set_wrmode(cdr_t *dp, int wmode, int tflags);
#  256|-> static	void	linuxcheck(void);
#  257|   
#  258|   #ifdef __linux__

Error: COMPILER_WARNING (CWE-670): [#def606]
cdrkit-1.1.11/wodim/wodim.c: scope_hint: In function ‘printdata’
cdrkit-1.1.11/wodim/wodim.c:2487:63: warning[-Wint-in-bool-context]: ‘?:’ using integer constants in boolean context
# 2487 |         if (trackp->pregapsize != (trackp->flags & TI_DVD)? 0 : 150) {
#      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
# 2485|   			printf(" padsize: %4lld KB", (Llong)(padbytes >> 10));
# 2486|   	}
# 2487|-> 	if (trackp->pregapsize != (trackp->flags & TI_DVD)? 0 : 150) {
# 2488|   		printf(" pregapsize: %3ld", trackp->pregapsize);
# 2489|   	}

Error: COMPILER_WARNING (CWE-563): [#def607]
cdrkit-1.1.11/wodim/wodim.c: scope_hint: In function ‘audioread’
cdrkit-1.1.11/wodim/wodim.c:4094:16: warning[-Wunused-but-set-variable]: variable ‘ret’ set but not used
# 4094 |         do{int ret;ret=write(1, buf, 512);}while(0); /* FIXME: handle return value */
#      |                ^~~
# 4092|   	read_scsi(usalp, buf, 1000, 1);
# 4093|   	printf("XXX:\n");
# 4094|-> 	do{int ret;ret=write(1, buf, 512);}while(0); /* FIXME: handle return value */
# 4095|   	unload_media(usalp, dp, flags);
# 4096|   	comexit(0);

Error: CPPCHECK_WARNING (CWE-401): [#def608]
cdrkit-1.1.11/wodim/xio.c:84: error[memleak]: Memory leak: xp.x_name
#   82|   	xp->x_oflag = 0;
#   83|   	xp->x_omode = 0;
#   84|-> 	return (xp);
#   85|   }
#   86|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def609]
cdrkit-1.1.11/wodim/xio.c:154:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp’
cdrkit-1.1.11/wodim/xio.c:140:12: branch_false: following ‘false’ branch...
cdrkit-1.1.11/wodim/xio.c:142:13: branch_false: ...to here
cdrkit-1.1.11/wodim/xio.c:145:12: branch_true: following ‘true’ branch...
cdrkit-1.1.11/wodim/xio.c:146:23: branch_true: ...to here
cdrkit-1.1.11/wodim/xio.c:147:24: branch_false: following ‘false’ branch (when ‘pp’ is NULL)...
cdrkit-1.1.11/wodim/xio.c:154:21: branch_false: ...to here
cdrkit-1.1.11/wodim/xio.c:154:21: danger: dereference of NULL ‘pp’
#  152|   			pp = pp->x_next;
#  153|   		}
#  154|-> 		if (pp->x_next == xp) {
#  155|   			if (x_tail == &xp->x_next)
#  156|   				x_tail = &pp->x_next;

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-106.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namecdrkit-1.1.11-59.fc43
store-results-to/tmp/tmp_q06s54z/cdrkit-1.1.11-59.fc43.tar.xz
time-created2025-04-25 12:09:12
time-finished2025-04-25 12:11:11
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp_q06s54z/cdrkit-1.1.11-59.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp_q06s54z/cdrkit-1.1.11-59.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9