Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/spaln-2.4.0+dfsg/src/adddef.h Examining data/spaln-2.4.0+dfsg/src/aln.h Examining data/spaln-2.4.0+dfsg/src/aln2.c Examining data/spaln-2.4.0+dfsg/src/bitpat.c Examining data/spaln-2.4.0+dfsg/src/bitpat.h Examining data/spaln-2.4.0+dfsg/src/blksrc.c Examining data/spaln-2.4.0+dfsg/src/blksrc.h Examining data/spaln-2.4.0+dfsg/src/clib.c Examining data/spaln-2.4.0+dfsg/src/clib.h Examining data/spaln-2.4.0+dfsg/src/cmn.h Examining data/spaln-2.4.0+dfsg/src/codepot.c Examining data/spaln-2.4.0+dfsg/src/codepot.h Examining data/spaln-2.4.0+dfsg/src/dbs.c Examining data/spaln-2.4.0+dfsg/src/divseq.c Examining data/spaln-2.4.0+dfsg/src/divseq.h Examining data/spaln-2.4.0+dfsg/src/fwd2b1.c Examining data/spaln-2.4.0+dfsg/src/fwd2d1.c Examining data/spaln-2.4.0+dfsg/src/fwd2h1.c Examining data/spaln-2.4.0+dfsg/src/fwd2s1.c Examining data/spaln-2.4.0+dfsg/src/gaps.c Examining data/spaln-2.4.0+dfsg/src/gaps.h Examining data/spaln-2.4.0+dfsg/src/gsinfo.c Examining data/spaln-2.4.0+dfsg/src/gsinfo.h Examining data/spaln-2.4.0+dfsg/src/iolib.c Examining data/spaln-2.4.0+dfsg/src/makdbs.c Examining data/spaln-2.4.0+dfsg/src/makmdm.c Examining data/spaln-2.4.0+dfsg/src/mdm.h Examining data/spaln-2.4.0+dfsg/src/mfile.c Examining data/spaln-2.4.0+dfsg/src/mfile.h Examining data/spaln-2.4.0+dfsg/src/seq.c Examining data/spaln-2.4.0+dfsg/src/seq.h Examining data/spaln-2.4.0+dfsg/src/sets.c Examining data/spaln-2.4.0+dfsg/src/sets.h Examining data/spaln-2.4.0+dfsg/src/simmtx.c Examining data/spaln-2.4.0+dfsg/src/simmtx.h Examining data/spaln-2.4.0+dfsg/src/sortgrcd.c Examining data/spaln-2.4.0+dfsg/src/sortgrcd.h Examining data/spaln-2.4.0+dfsg/src/spaln.c Examining data/spaln-2.4.0+dfsg/src/sqpr.c Examining data/spaln-2.4.0+dfsg/src/stdtype.h Examining data/spaln-2.4.0+dfsg/src/supprime.c Examining data/spaln-2.4.0+dfsg/src/utilseq.c Examining data/spaln-2.4.0+dfsg/src/utilseq.h Examining data/spaln-2.4.0+dfsg/src/vmf.c Examining data/spaln-2.4.0+dfsg/src/vmf.h Examining data/spaln-2.4.0+dfsg/src/wln.c Examining data/spaln-2.4.0+dfsg/src/wln.h FINAL RESULTS: data/spaln-2.4.0+dfsg/src/blksrc.c:270:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(entryprv, pe); data/spaln-2.4.0+dfsg/src/blksrc.c:550:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(block_fn, WriteFile); data/spaln-2.4.0+dfsg/src/blksrc.c:560:16: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). if (isaa) strcat(block_fn, BKA_EXT); data/spaln-2.4.0+dfsg/src/blksrc.c:561:23: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). else if (istron) strcat(block_fn, BKP_EXT); data/spaln-2.4.0+dfsg/src/blksrc.c:562:11: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). else strcat(block_fn, BKN_EXT); data/spaln-2.4.0+dfsg/src/blksrc.c:567:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(block_fn, gz_ext); data/spaln-2.4.0+dfsg/src/blksrc.c:665:20: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). case PROTEIN: strcat(str, BKA_EXT); break; data/spaln-2.4.0+dfsg/src/blksrc.c:666:18: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). case DNA: strcat(str, BKN_EXT); break; data/spaln-2.4.0+dfsg/src/blksrc.c:667:18: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). case TRON: strcat(str, BKP_EXT); break; data/spaln-2.4.0+dfsg/src/blksrc.c:670:23: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). if (!file_size(str)) strcat(str, gz_ext); data/spaln-2.4.0+dfsg/src/blksrc.c:682:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, WriteFile); data/spaln-2.4.0+dfsg/src/blksrc.c:1011:18: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). case DNA: strcat(str, LUN_EXT); break; data/spaln-2.4.0+dfsg/src/blksrc.c:1012:18: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). case TRON: strcat(str, LUP_EXT); break; data/spaln-2.4.0+dfsg/src/blksrc.c:1015:23: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). if (!file_size(str)) strcat(str, gz_ext); data/spaln-2.4.0+dfsg/src/blksrc.c:1874:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). if (!*str) strcpy(str, fn); data/spaln-2.4.0+dfsg/src/blksrc.c:1880:29: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). if (!strcmp(dot, BKN_EXT)) strcpy(dot, LUN_EXT); data/spaln-2.4.0+dfsg/src/blksrc.c:1881:34: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else if (!strcmp(dot, BKP_EXT)) strcpy(dot, LUP_EXT); data/spaln-2.4.0+dfsg/src/blksrc.c:1887:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, gz_ext); data/spaln-2.4.0+dfsg/src/blksrc.c:2141:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, fn); data/spaln-2.4.0+dfsg/src/blksrc.c:2148:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, pwd->DvsP? LUP_EXT: LUN_EXT); data/spaln-2.4.0+dfsg/src/blksrc.c:2383:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "$%s %d %d <", (*b->sname)[0], data/spaln-2.4.0+dfsg/src/blksrc.c:2386:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "$%s %d %d", (*b->sname)[0], data/spaln-2.4.0+dfsg/src/blksrc.c:2755:6: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(ofmt, query->sqname(), dir[d / 2], query->left, query->right, cid, p, q, data/spaln-2.4.0+dfsg/src/clib.c:70:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). return (strcpy(dst, src)); data/spaln-2.4.0+dfsg/src/clib.c:127:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). return (strcpy(dest, temp)); data/spaln-2.4.0+dfsg/src/clib.c:359:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strbuf, str); data/spaln-2.4.0+dfsg/src/clib.c:489:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). return strcpy(strbuf, str); data/spaln-2.4.0+dfsg/src/clib.c:516:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(word, str); // str may be a part of strbuf data/spaln-2.4.0+dfsg/src/clib.c:521:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(rv, word? word: str); data/spaln-2.4.0+dfsg/src/clib.c:548:15: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). arg_ext[0] = strcpy(ps, argv[0]); data/spaln-2.4.0+dfsg/src/clib.c:552:16: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). arg_ext[i] = strcpy(ps, argv[i]); data/spaln-2.4.0+dfsg/src/clib.c:556:20: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). arg_ext[i] = strcpy(ps, argv[i]); data/spaln-2.4.0+dfsg/src/clib.c:557:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(ps, ext); data/spaln-2.4.0+dfsg/src/clib.c:560:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(ps, ext); data/spaln-2.4.0+dfsg/src/clib.c:562:20: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). arg_ext[i] = strcpy(ps, argv[i]); data/spaln-2.4.0+dfsg/src/dbs.c:374:9: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. while (fscanf(fgrp, frmt, &grp.seqptr, &grp.recnbr, str) == 3) { data/spaln-2.4.0+dfsg/src/dbs.c:539:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(extgz, ext); data/spaln-2.4.0+dfsg/src/dbs.c:540:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(extgz, gz_ext); data/spaln-2.4.0+dfsg/src/divseq.c:215:6: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, frmt1, 100. * pc, 100. * sd, pamcorrect(pc)); data/spaln-2.4.0+dfsg/src/divseq.c:219:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, frmt2, fstt->val, data/spaln-2.4.0+dfsg/src/iolib.c:104:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else strcpy(res, org); data/spaln-2.4.0+dfsg/src/iolib.c:119:29: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). if (fnam == result) fnam = strcpy(buf, fnam); data/spaln-2.4.0+dfsg/src/iolib.c:202:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, extent); data/spaln-2.4.0+dfsg/src/iolib.c:204:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, name); data/spaln-2.4.0+dfsg/src/iolib.c:288:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, tabpath[i]); data/spaln-2.4.0+dfsg/src/iolib.c:291:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, subdir); data/spaln-2.4.0+dfsg/src/iolib.c:312:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, tabpath[i]); data/spaln-2.4.0+dfsg/src/iolib.c:314:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, subdir); data/spaln-2.4.0+dfsg/src/iolib.c:337:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, path); data/spaln-2.4.0+dfsg/src/iolib.c:342:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, defpath); data/spaln-2.4.0+dfsg/src/iolib.c:354:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, tabpath[i]); data/spaln-2.4.0+dfsg/src/iolib.c:356:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, dname); data/spaln-2.4.0+dfsg/src/iolib.c:498:17: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if (ps > str) sscanf(str, format, ptr); data/spaln-2.4.0+dfsg/src/iolib.c:520:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, str, (char) *c_ptr); break; data/spaln-2.4.0+dfsg/src/iolib.c:523:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, str, c_ptr); break; data/spaln-2.4.0+dfsg/src/iolib.c:531:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, str, "+++"); data/spaln-2.4.0+dfsg/src/iolib.c:533:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, str, "---"); data/spaln-2.4.0+dfsg/src/iolib.c:535:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, str, *i_ptr); data/spaln-2.4.0+dfsg/src/iolib.c:539:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, str, *u_ptr); break; data/spaln-2.4.0+dfsg/src/iolib.c:547:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, str, "+++"); data/spaln-2.4.0+dfsg/src/iolib.c:549:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, str, "---"); data/spaln-2.4.0+dfsg/src/iolib.c:550:12: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. else fprintf(stderr, str, *l_ptr); data/spaln-2.4.0+dfsg/src/iolib.c:561:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, str, "*"); data/spaln-2.4.0+dfsg/src/iolib.c:563:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, str, *d_ptr); data/spaln-2.4.0+dfsg/src/iolib.c:575:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void) vfprintf(stderr, format, args); data/spaln-2.4.0+dfsg/src/iolib.c:587:6: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, args); data/spaln-2.4.0+dfsg/src/iolib.c:599:6: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, args); data/spaln-2.4.0+dfsg/src/iolib.c:613:6: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/spaln-2.4.0+dfsg/src/iolib.c:638:6: [4] (buffer) vsscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. n = vsscanf(str, frmt, args); data/spaln-2.4.0+dfsg/src/iolib.c:658:6: [4] (buffer) vsscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. n = vsscanf(str, frmt, args); data/spaln-2.4.0+dfsg/src/iolib.c:660:14: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). n = raw_scn(strcpy(buf, str), frmt, args); data/spaln-2.4.0+dfsg/src/iolib.c:773:16: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (fg && bg) fprintf(fd, font_tag[2], fg, bg); data/spaln-2.4.0+dfsg/src/iolib.c:774:15: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. else if (fg) fprintf(fd, font_tag[0], fg); data/spaln-2.4.0+dfsg/src/iolib.c:775:15: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. else if (bg) fprintf(fd, font_tag[1], bg); data/spaln-2.4.0+dfsg/src/iolib.c:859:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, extent); data/spaln-2.4.0+dfsg/src/iolib.c:861:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, name); data/spaln-2.4.0+dfsg/src/makdbs.c:93:18: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (fmt && arg) fprintf(stderr, fmt, arg); data/spaln-2.4.0+dfsg/src/makdbs.c:326:30: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). if (!*dbname && db->DbName) strcpy(dbname, db->DbName); data/spaln-2.4.0+dfsg/src/makdbs.c:362:16: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). case 'd': strcpy(dbname, getarg(argc, argv)); break; data/spaln-2.4.0+dfsg/src/makmdm.c:88:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, format, matrix[i][j]); data/spaln-2.4.0+dfsg/src/makmdm.c:99:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, format, matrix[i][j]); data/spaln-2.4.0+dfsg/src/seq.c:232:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, fn); data/spaln-2.4.0+dfsg/src/seq.c:282:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(attr[which], cdr(fn)); data/spaln-2.4.0+dfsg/src/seq.c:291:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(attr[which], molc[which] == PROTEIN? "P": "D"); data/spaln-2.4.0+dfsg/src/seq.c:313:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(attr[which], molc[which] == PROTEIN? "P": "D"); data/spaln-2.4.0+dfsg/src/seq.h:628:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). ps = strcpy(str, ps); data/spaln-2.4.0+dfsg/src/seq.h:900:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, str); data/spaln-2.4.0+dfsg/src/sortgrcd.c:238:28: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (OutMode < 8 && niso) fprintf(out_fd, GeneDelim, niso); data/spaln-2.4.0+dfsg/src/sortgrcd.c:267:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fd, sfmt, Rname, gdbs->entname(gwrk->Cid), data/spaln-2.4.0+dfsg/src/sortgrcd.c:274:6: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fd, tfmt, gdbs->entname(gwrk->Cid), gwrk->Csense? '-': '+', data/spaln-2.4.0+dfsg/src/sortgrcd.c:279:27: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (OutMode < 8 && niso) fprintf(out_fd, GeneDelim, niso); data/spaln-2.4.0+dfsg/src/sortgrcd.c:392:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fd, BedFrom, cid, l - 1, r, Rname, data/spaln-2.4.0+dfsg/src/sortgrcd.c:412:6: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fd, BedHeader, grdname); data/spaln-2.4.0+dfsg/src/sortgrcd.c:529:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(hv->intends, intends); data/spaln-2.4.0+dfsg/src/sortgrcd.c:607:28: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (OutMode < 8 && niso) fprintf(out_fd, GeneDelim, niso); data/spaln-2.4.0+dfsg/src/sortgrcd.c:658:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fd, fmt, gdbs->entname(gwrk->Cid), dir, l, r, fwrk->phase, data/spaln-2.4.0+dfsg/src/sortgrcd.c:669:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fd, fmt, gdbs->entname(gwrk->Cid), dir, ii->left, ii->right, ii->count, data/spaln-2.4.0+dfsg/src/sortgrcd.c:675:6: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fd, tfmt, gdbs->entname(gwrk->Cid), dir, data/spaln-2.4.0+dfsg/src/sortgrcd.c:680:27: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (OutMode < 8 && niso) fprintf(out_fd, GeneDelim, niso); data/spaln-2.4.0+dfsg/src/sortgrcd.c:749:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fd, fmt3r, gdbs->entname(gwrk->Cid), l, r); data/spaln-2.4.0+dfsg/src/sortgrcd.c:750:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fd, fmt3n, gdbs->entname(gwrk->Cid), "gene", l, r, Nexon, rvg); data/spaln-2.4.0+dfsg/src/sortgrcd.c:751:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fd, fmt3g, ++Gff3GID, gdbs->entname(gwrk->Cid), (l + r) / 2000, data/spaln-2.4.0+dfsg/src/sortgrcd.c:755:6: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fd, fmt3n, gdbs->entname(gwrk->Cid), "mRNA", data/spaln-2.4.0+dfsg/src/sortgrcd.c:757:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(mname, "%s_%d", gdbs->entname(gwrk->Cid), data/spaln-2.4.0+dfsg/src/sortgrcd.c:759:6: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fd, fmt3m, ++Gff3MID, Gff3GID, mname); data/spaln-2.4.0+dfsg/src/sortgrcd.c:765:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fd, fmt3p, gdbs->entname(gwrk->Cid), ltype, l, r, data/spaln-2.4.0+dfsg/src/sortgrcd.c:768:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fd, fmt3n, gdbs->entname(gwrk->Cid), ltype, l, r, data/spaln-2.4.0+dfsg/src/sortgrcd.c:775:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fd, fmt3c, ltype, eif->exonID, Gff3MID, mname); data/spaln-2.4.0+dfsg/src/sortgrcd.c:776:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out_fd, fmt3t, Rname, l, r, rvc); data/spaln-2.4.0+dfsg/src/sortgrcd.c:795:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, head); data/spaln-2.4.0+dfsg/src/sortgrcd.c:799:11: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). if (nth) strcat(str, ext); data/spaln-2.4.0+dfsg/src/sortgrcd.c:800:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else strcpy(pdot, ext); data/spaln-2.4.0+dfsg/src/sortgrcd.c:823:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, gz_ext); data/spaln-2.4.0+dfsg/src/sortgrcd.c:873:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, gz_ext); data/spaln-2.4.0+dfsg/src/sortgrcd.c:990:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, gz_ext); data/spaln-2.4.0+dfsg/src/sortgrcd.c:1024:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, gz_ext); data/spaln-2.4.0+dfsg/src/sortgrcd.c:1074:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, gz_ext); data/spaln-2.4.0+dfsg/src/sortgrcd.c:1111:6: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(tfmt, gdbs->entname(gwrk->Cid), gwrk->Csense? '-': '+', data/spaln-2.4.0+dfsg/src/spaln.c:1245:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s %d %d", whf->sname, whf->right, whf[1].left); data/spaln-2.4.0+dfsg/src/spaln.c:1248:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s %d %d <", whf->sname, whf[1].left, whf->right); data/spaln-2.4.0+dfsg/src/sqpr.c:369:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, gftcds); data/spaln-2.4.0+dfsg/src/sqpr.c:374:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, eftcds); data/spaln-2.4.0+dfsg/src/sqpr.c:378:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, cdsmsg); data/spaln-2.4.0+dfsg/src/sqpr.c:381:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, cmpl? "complement(join(": "join("); data/spaln-2.4.0+dfsg/src/sqpr.c:421:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, head); data/spaln-2.4.0+dfsg/src/sqpr.c:498:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(mname, "%s_%d", (*gene->sname)[0], (l + r) / 2000); data/spaln-2.4.0+dfsg/src/sqpr.c:507:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, fmt3n, (*gene->sname)[0], "gene", l, r, data/spaln-2.4.0+dfsg/src/sqpr.c:509:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, fmt3g, Gff3MID, mname); data/spaln-2.4.0+dfsg/src/sqpr.c:510:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, fmt3n, (*gene->sname)[0], "mRNA", l, r, data/spaln-2.4.0+dfsg/src/sqpr.c:512:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, fmt3m, Gff3MID, Gff3MID, mname); data/spaln-2.4.0+dfsg/src/sqpr.c:522:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, fmt3, (*gene->sname)[0], ltype, l, r, data/spaln-2.4.0+dfsg/src/sqpr.c:525:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, fmt3, (*gene->sname)[0], ltype, l, r, data/spaln-2.4.0+dfsg/src/sqpr.c:529:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, fmt3c, ltype, ++Gff3CID, Gff3MID, mname); data/spaln-2.4.0+dfsg/src/sqpr.c:530:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, fmt3t, (*qry->sname)[0], qry->SiteNo(wkr->rleft), data/spaln-2.4.0+dfsg/src/sqpr.c:569:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(mname, "%s_%d", (*gene->sname)[0], (l + r) / 2000); data/spaln-2.4.0+dfsg/src/sqpr.c:582:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, fmt3n, (*gene->sname)[0], ltype, l, r, data/spaln-2.4.0+dfsg/src/sqpr.c:584:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, fmt3c, Gff3MID, mname); data/spaln-2.4.0+dfsg/src/sqpr.c:585:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, fmt3t, (*qry->sname)[0], qry->SiteNo(wkr->rleft), data/spaln-2.4.0+dfsg/src/sqpr.c:742:16: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (!visit++) fprintf(fd, BedHeader, qry->sqname()); data/spaln-2.4.0+dfsg/src/sqpr.c:785:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, BedFrom, (*gene->sname)[0], gstart, gend, (*qry->sname)[0], data/spaln-2.4.0+dfsg/src/sqpr.c:832:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(intends, tmp_intends); data/spaln-2.4.0+dfsg/src/sqpr.c:837:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, prefix); data/spaln-2.4.0+dfsg/src/sqpr.c:839:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(bdy, grext); data/spaln-2.4.0+dfsg/src/sqpr.c:842:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, gz_ext); data/spaln-2.4.0+dfsg/src/sqpr.c:847:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(bdy, erext); data/spaln-2.4.0+dfsg/src/sqpr.c:850:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, gz_ext); data/spaln-2.4.0+dfsg/src/sqpr.c:855:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(bdy, qrext); data/spaln-2.4.0+dfsg/src/sqpr.c:858:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, gz_ext); data/spaln-2.4.0+dfsg/src/sqpr.c:909:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, fmt, data/spaln-2.4.0+dfsg/src/sqpr.c:962:6: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, tfmt, (*gene->sname)[0], gr.Csense? '-': '+', data/spaln-2.4.0+dfsg/src/sqpr.c:998:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(intends, tmp_intends); data/spaln-2.4.0+dfsg/src/sqpr.c:1013:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, fmt, (*gene->sname)[0], rvc, gene->SiteNo(prv->right), data/spaln-2.4.0+dfsg/src/sqpr.c:1028:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, tfmt, (*gene->sname)[0], gr.Csense? '-': '+', data/spaln-2.4.0+dfsg/src/sqpr.c:1263:6: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, attrfrmt, gene->Strand(), gene->len, data/spaln-2.4.0+dfsg/src/sqpr.c:1266:6: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, attrfrmt3, qry->many, qry->len, data/spaln-2.4.0+dfsg/src/sqpr.c:1285:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, out_form->SeqForm, m + 1); data/spaln-2.4.0+dfsg/src/sqpr.c:1329:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(prefix, OutPrm.out_file); data/spaln-2.4.0+dfsg/src/sqpr.c:1331:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(prefix, sl); data/spaln-2.4.0+dfsg/src/sqpr.c:1341:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, prefix); data/spaln-2.4.0+dfsg/src/sqpr.c:1629:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, attrfrmt2, sub? 1: many, len, data/spaln-2.4.0+dfsg/src/sqpr.c:1648:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, out_form->SeqForm, m + 1); data/spaln-2.4.0+dfsg/src/sqpr.c:1677:6: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, frm[0], senschar(), sqname(), many, len); data/spaln-2.4.0+dfsg/src/sqpr.c:1680:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(str, frm[0], senschar(), sqname(), many, len); data/spaln-2.4.0+dfsg/src/sqpr.c:1681:6: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, frm[n], str, SiteNo(left), SiteNo(right - 1)); data/spaln-2.4.0+dfsg/src/sqpr.c:1871:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fmt, "%%s:%%-%ds", sname->longest()); data/spaln-2.4.0+dfsg/src/sqpr.c:1880:10: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). if (tl) strcat(fmt, tl); data/spaln-2.4.0+dfsg/src/sqpr.c:1888:6: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, fmt, (taxon? taxon: unknown_taxon), (*sname)[i]); data/spaln-2.4.0+dfsg/src/sqpr.c:1890:6: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, fmt, (*sname)[i]); data/spaln-2.4.0+dfsg/src/sqpr.c:1916:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s: %s", seqnum == 1? "Prrn": "Aln", seqs[0]->sqname()); data/spaln-2.4.0+dfsg/src/sqpr.c:1919:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, seqs[n]->sqname()); data/spaln-2.4.0+dfsg/src/utilseq.c:571:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, form->SeqForm, i + 1); data/spaln-2.4.0+dfsg/src/utilseq.c:682:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, fname); data/spaln-2.4.0+dfsg/src/utilseq.c:688:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, fname); data/spaln-2.4.0+dfsg/src/utilseq.c:835:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, fname); data/spaln-2.4.0+dfsg/src/wln.c:1064:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, fname); data/spaln-2.4.0+dfsg/src/wln.c:1068:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, sq->isdrna()? LUN_EXT: LUP_EXT); data/spaln-2.4.0+dfsg/src/wln.c:1074:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, sq->isdrna()? LXN_EXT: LXP_EXT); data/spaln-2.4.0+dfsg/src/wln.c:1168:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, fname); data/spaln-2.4.0+dfsg/src/wln.c:1171:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, info.dvsp? LXP_EXT: LXN_EXT); data/spaln-2.4.0+dfsg/src/adddef.h:68:9: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define srand(x) srandom(x) data/spaln-2.4.0+dfsg/src/adddef.h:68:18: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define srand(x) srandom(x) data/spaln-2.4.0+dfsg/src/adddef.h:69:17: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define rand() random() data/spaln-2.4.0+dfsg/src/aln.h:305:7: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. void getopt(const char* arg); data/spaln-2.4.0+dfsg/src/blksrc.c:1839:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char* path = getenv(ALN_DBS); data/spaln-2.4.0+dfsg/src/clib.c:783:14: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. v1 = 2.*drand48()-1.; data/spaln-2.4.0+dfsg/src/clib.c:784:21: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. double v2 = 2.*drand48()-1.; data/spaln-2.4.0+dfsg/src/clib.c:795:13: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. double p = drand48(); data/spaln-2.4.0+dfsg/src/clib.c:799:29: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. for ( ; p >= mu; ++i) p *= drand48(); data/spaln-2.4.0+dfsg/src/clib.h:917:36: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. int get() {return buf[int(resol * drand48())];} data/spaln-2.4.0+dfsg/src/dbs.c:533:38: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. static const char* dbstab[3] = {".", getenv(ALN_DBS), DBS_DIR}; data/spaln-2.4.0+dfsg/src/iolib.c:335:24: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* path = envpath? getenv(envpath): 0; data/spaln-2.4.0+dfsg/src/makdbs.c:107:3: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. getenv(ALN_DBS), DBS_SDIR); data/spaln-2.4.0+dfsg/src/seq.c:908:14: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. double rn = drand48(); data/spaln-2.4.0+dfsg/src/seq.c:1997:21: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. int k = (int) (drand48() * area); data/spaln-2.4.0+dfsg/src/spaln.c:387:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. outputs.getopt(val); data/spaln-2.4.0+dfsg/src/sqpr.c:1303:19: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. void AlnOutModes::getopt(const char* val) data/spaln-2.4.0+dfsg/src/utilseq.c:679:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. ps = getenv(DEF_CDI); data/spaln-2.4.0+dfsg/src/adddef.h:62:25: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define movmem(x, y, l) bcopy(x, y, l) data/spaln-2.4.0+dfsg/src/adddef.h:63:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define memcpy(t, f, l) bcopy(f, t, l) data/spaln-2.4.0+dfsg/src/adddef.h:63:25: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define memcpy(t, f, l) bcopy(f, t, l) data/spaln-2.4.0+dfsg/src/blksrc.c:37:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char dir[2] = {'>', '<'}; data/spaln-2.4.0+dfsg/src/blksrc.c:88:35: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (isdigit(*val)) wcp.Nalpha = atoi(val); data/spaln-2.4.0+dfsg/src/blksrc.c:96:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). wcp.Nbitpat = atoi(val); data/spaln-2.4.0+dfsg/src/blksrc.c:100:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gene_rng_max_extend = atoi(val); data/spaln-2.4.0+dfsg/src/blksrc.c:107:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (*val) OutPrm.MaxOut2 = atoi(val); data/spaln-2.4.0+dfsg/src/blksrc.c:116:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (*val) wcp.afact = (SHORT) atoi(val); data/spaln-2.4.0+dfsg/src/blksrc.c:125:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (*val) Nascr = atoi(val); data/spaln-2.4.0+dfsg/src/blksrc.c:134:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (*val) gratio = atoi(val); data/spaln-2.4.0+dfsg/src/blksrc.c:140:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (*val) wcp.Ktuple = atoi(val); data/spaln-2.4.0+dfsg/src/blksrc.c:143:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (*val) MaxMmc = atoi(val); data/spaln-2.4.0+dfsg/src/blksrc.c:146:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). MinSigpr = (*val)? atoi(val): SHRT_MAX; data/spaln-2.4.0+dfsg/src/blksrc.c:149:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (*val) MaxNref = atoi(val); data/spaln-2.4.0+dfsg/src/blksrc.c:153:37: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (isdigit(*val)) blockpam = atoi(val); data/spaln-2.4.0+dfsg/src/blksrc.c:161:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (*val) MinOrf = atoi(val); data/spaln-2.4.0+dfsg/src/blksrc.c:164:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (*val) wcp.Nshift = atoi(val); data/spaln-2.4.0+dfsg/src/blksrc.c:170:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (*val) algmode.lvl = atoi(val); data/spaln-2.4.0+dfsg/src/blksrc.c:228:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/blksrc.c:549:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char block_fn[LINE_MAX]; data/spaln-2.4.0+dfsg/src/blksrc.c:577:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = fopen(block_fn, "wb"); data/spaln-2.4.0+dfsg/src/blksrc.c:680:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/blksrc.c:690:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(str, ".idx"); data/spaln-2.4.0+dfsg/src/blksrc.c:708:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(str, ".idx"); data/spaln-2.4.0+dfsg/src/blksrc.c:975:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = fopen(*seqdb, "r"); data/spaln-2.4.0+dfsg/src/blksrc.c:985:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fidx = fopen(fn, "r"); data/spaln-2.4.0+dfsg/src/blksrc.c:1148:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = fopen(*seqdb, "r"); data/spaln-2.4.0+dfsg/src/blksrc.c:1179:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = fopen(*seqdb, "r"); data/spaln-2.4.0+dfsg/src/blksrc.c:1496:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(blk->begin(), ps - margin, margin); data/spaln-2.4.0+dfsg/src/blksrc.c:1597:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = fopen(*seqdb, "r"); data/spaln-2.4.0+dfsg/src/blksrc.c:1633:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = fopen(*seqdb, "r"); data/spaln-2.4.0+dfsg/src/blksrc.c:1840:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX] = ""; data/spaln-2.4.0+dfsg/src/blksrc.c:1855:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = fopen(fn, "rb"); data/spaln-2.4.0+dfsg/src/blksrc.c:2012:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/blksrc.c:2013:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "Dbs%d %d %d", c, x + 1, y); data/spaln-2.4.0+dfsg/src/blksrc.c:2134:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = fopen(fn, "r"); data/spaln-2.4.0+dfsg/src/blksrc.c:2140:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/blksrc.c:2223:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = ftable.fopen(ipstat, "r"); data/spaln-2.4.0+dfsg/src/blksrc.c:2227:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/blksrc.c:2231:7: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (atoi(stl[2]) < 1000) break; data/spaln-2.4.0+dfsg/src/blksrc.c:2232:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). observed = atoi(stl[5]); data/spaln-2.4.0+dfsg/src/blksrc.c:2305:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = fopen("RandBscr", "w"); data/spaln-2.4.0+dfsg/src/blksrc.c:2381:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/blksrc.c:3169:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sqs[j]->jxt, jgr->jxt, (jgr->num + 1) * sizeof(JUXT)); data/spaln-2.4.0+dfsg/src/blksrc.h:93:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char entrystr[MAXL]; data/spaln-2.4.0+dfsg/src/blksrc.h:94:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char entryprv[MAXL]; data/spaln-2.4.0+dfsg/src/blksrc.h:330:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char entry[ENTSIZE + 1]; data/spaln-2.4.0+dfsg/src/clib.c:114:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp[MAXL]; data/spaln-2.4.0+dfsg/src/clib.c:459:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(strbuf, src.strbuf, totallen); data/spaln-2.4.0+dfsg/src/clib.c:475:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(strbuf, src.strbuf, totallen); data/spaln-2.4.0+dfsg/src/clib.c:515:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp, strbuf, totallen); data/spaln-2.4.0+dfsg/src/clib.h:640:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, --n); data/spaln-2.4.0+dfsg/src/codepot.c:124:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(jsp, spliced, 2); data/spaln-2.4.0+dfsg/src/codepot.c:352:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = ftable.fopen(fname, "r"); data/spaln-2.4.0+dfsg/src/dbs.c:368:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/dbs.c:538:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char extgz[10]; data/spaln-2.4.0+dfsg/src/dbs.c:563:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/dbs.c:564:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LINE_MAX]; data/spaln-2.4.0+dfsg/src/dbs.c:809:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char token[MAXL]; data/spaln-2.4.0+dfsg/src/dbs.c:820:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). INT n = atoi(term); data/spaln-2.4.0+dfsg/src/divseq.c:167:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). (DistCal) atoi(val): DynAln; data/spaln-2.4.0+dfsg/src/divseq.c:176:52: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). distPrm.corr_mhits = (*val && isdigit(*val))? atoi(val): 0; data/spaln-2.4.0+dfsg/src/gsinfo.c:422:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/gsinfo.c:430:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, " %7.3f", d); data/spaln-2.4.0+dfsg/src/gsinfo.c:1014:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp, head->lst, to * sizeof(int)); data/spaln-2.4.0+dfsg/src/gsinfo.h:91:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). wfq->pos = atoi(ps); data/spaln-2.4.0+dfsg/src/gsinfo.h:93:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). wfq->num = atoi(ps); data/spaln-2.4.0+dfsg/src/gsinfo.h:116:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int m = atoi(ps) - 1; data/spaln-2.4.0+dfsg/src/iolib.c:114:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char const* sg[5]; data/spaln-2.4.0+dfsg/src/iolib.c:115:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char const* sd[5]; data/spaln-2.4.0+dfsg/src/iolib.c:116:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LINE_MAX]; data/spaln-2.4.0+dfsg/src/iolib.c:182:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LINE_MAX]; data/spaln-2.4.0+dfsg/src/iolib.c:205:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = fopen(str, opt))) return (fd); data/spaln-2.4.0+dfsg/src/iolib.c:216:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[LINE_MAX]; data/spaln-2.4.0+dfsg/src/iolib.c:217:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pname[LINE_MAX]; data/spaln-2.4.0+dfsg/src/iolib.c:225:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). } while (!(fd = fopen(fname, mode))) ; data/spaln-2.4.0+dfsg/src/iolib.c:282:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* Ftable::fopen(const char* fname, const char* mode) data/spaln-2.4.0+dfsg/src/iolib.c:284:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/iolib.c:311:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/iolib.c:329:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* Ftable::fopen(const char* fname, const char* envpath, const char* defpath) data/spaln-2.4.0+dfsg/src/iolib.c:331:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = this->fopen(fname, "r"); data/spaln-2.4.0+dfsg/src/iolib.c:334:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/iolib.c:353:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/iolib.c:377:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = this->fopen(convtab, "r"); data/spaln-2.4.0+dfsg/src/iolib.c:382:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/iolib.c:507:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/iolib.c:594:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/iolib.c:624:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/iolib.c:625:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char frmt[MAXL]; data/spaln-2.4.0+dfsg/src/iolib.c:649:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAXL]; data/spaln-2.4.0+dfsg/src/iolib.c:650:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char frmt[MAXL]; data/spaln-2.4.0+dfsg/src/iolib.c:679:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). num = atoi(ns); data/spaln-2.4.0+dfsg/src/iolib.c:707:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[MAXL] = {'\0'}; data/spaln-2.4.0+dfsg/src/iolib.c:742:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = fopen(ps, "r"); data/spaln-2.4.0+dfsg/src/iolib.c:797:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = ftable.fopen(gnm2tab, "r"); data/spaln-2.4.0+dfsg/src/iolib.c:799:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/iolib.c:824:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char genspc[10]; data/spaln-2.4.0+dfsg/src/iolib.c:839:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[LINE_MAX]; data/spaln-2.4.0+dfsg/src/makdbs.c:35:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char dbname[LINE_MAX] = ""; data/spaln-2.4.0+dfsg/src/makdbs.c:52:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/makdbs.c:53:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prv[MAXL]; data/spaln-2.4.0+dfsg/src/makdbs.c:360:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'b': dbsch = atoi(getarg(argc, argv, true)); break; data/spaln-2.4.0+dfsg/src/makdbs.c:364:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'i': idfy = atoi(getarg(argc, argv, true)); break; data/spaln-2.4.0+dfsg/src/makdbs.c:375:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). monit = val? atoi(val): 1; data/spaln-2.4.0+dfsg/src/mfile.c:39:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, src.ptr, offset); data/spaln-2.4.0+dfsg/src/mfile.c:49:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp, ptr, recno * wwd); data/spaln-2.4.0+dfsg/src/mfile.c:63:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp, ptr, offset); data/spaln-2.4.0+dfsg/src/mfile.c:69:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cur, pi, wwd); data/spaln-2.4.0+dfsg/src/mfile.c:80:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, src.ptr, offset); data/spaln-2.4.0+dfsg/src/seq.c:70:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char seqdfn[MAXL] = ""; data/spaln-2.4.0+dfsg/src/seq.c:172:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fc = catalog? fopen(catalog, "r"): 0; data/spaln-2.4.0+dfsg/src/seq.c:200:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/seq.c:242:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (isdigit(*qs)) nfrom = atoi(qs) - 1; data/spaln-2.4.0+dfsg/src/seq.c:251:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (isdigit(*qs)) nto = atoi(qs); data/spaln-2.4.0+dfsg/src/seq.c:262:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). nfrom = atoi(qs); data/spaln-2.4.0+dfsg/src/seq.c:283:6: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(attr[which], " S"); data/spaln-2.4.0+dfsg/src/seq.c:408:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dest, this, sizeof(Seq)); data/spaln-2.4.0+dfsg/src/seq.c:482:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (keep) memcpy(ss, seq_, area_); data/spaln-2.4.0+dfsg/src/seq.c:502:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ss, seq_ -= many, area); data/spaln-2.4.0+dfsg/src/seq.c:585:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char qname[LINE_MAX]; data/spaln-2.4.0+dfsg/src/seq.c:586:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pname[LINE_MAX]; data/spaln-2.4.0+dfsg/src/seq.c:599:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = fopen(pname, "r"); data/spaln-2.4.0+dfsg/src/seq.c:647:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(temp, seq, many); data/spaln-2.4.0+dfsg/src/seq.c:648:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(seq, rsq, many); data/spaln-2.4.0+dfsg/src/seq.c:649:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(rsq, temp, many); data/spaln-2.4.0+dfsg/src/seq.c:706:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(soc, que[parity], many); data/spaln-2.4.0+dfsg/src/seq.c:742:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int n = atoi(pa - 1) - base_; data/spaln-2.4.0+dfsg/src/seq.c:767:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int n = atoi(pa - 1) - base_; data/spaln-2.4.0+dfsg/src/seq.c:1010:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dest->at(0), s, l * many); data/spaln-2.4.0+dfsg/src/seq.c:1029:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dest->seq_ - many, seq_ - many, many * (len + 2)); data/spaln-2.4.0+dfsg/src/seq.c:1068:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(head->at(head->len + cushion), s, (right - left) * many); data/spaln-2.4.0+dfsg/src/seq.c:1200:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (k) memcpy(dd, ss, k); data/spaln-2.4.0+dfsg/src/seq.c:1213:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, tmp, many); data/spaln-2.4.0+dfsg/src/seq.c:1214:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp, as, many); data/spaln-2.4.0+dfsg/src/seq.c:1215:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(as, buf, many); data/spaln-2.4.0+dfsg/src/seq.c:1227:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). wexon.left = atoi(ps) - 1; data/spaln-2.4.0+dfsg/src/seq.c:1232:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). wexon.right = atoi(ps); data/spaln-2.4.0+dfsg/src/seq.c:1284:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/seq.c:1296:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = fopen(fname, "r"); data/spaln-2.4.0+dfsg/src/seq.c:1365:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = ftable.fopen(fname, "r"); data/spaln-2.4.0+dfsg/src/seq.c:1376:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/seq.c:1383:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). rec.sens = atoi(ps); data/spaln-2.4.0+dfsg/src/seq.c:1385:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int ioc = atoi(ps); data/spaln-2.4.0+dfsg/src/seq.c:1428:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[16]; data/spaln-2.4.0+dfsg/src/seq.c:1438:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "m%d", i + 1); data/spaln-2.4.0+dfsg/src/seq.c:1503:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/seq.c:1527:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/seq.c:1558:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char input[MAXL]; data/spaln-2.4.0+dfsg/src/seq.c:1585:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(input, "std%d", sid); data/spaln-2.4.0+dfsg/src/seq.c:1938:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (k) memcpy(dd, ss, k); data/spaln-2.4.0+dfsg/src/seq.c:1953:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[MAXL]; data/spaln-2.4.0+dfsg/src/seq.c:1958:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(name, "RAND%d", sid); data/spaln-2.4.0+dfsg/src/seq.h:242:40: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). void setthr(const char* s) {thr = *s? atoi(s): 0;} data/spaln-2.4.0+dfsg/src/seq.h:459:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((num = atoi(str))) { data/spaln-2.4.0+dfsg/src/seq.h:461:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (ps && isdigit(*ps)) len = atoi(ps); // Phylip like data/spaln-2.4.0+dfsg/src/seq.h:476:3: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). atoi(stl[k - 4]): 0; data/spaln-2.4.0+dfsg/src/seq.h:481:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). num += atoi(++ps); data/spaln-2.4.0+dfsg/src/seq.h:483:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int tl = qs? len += atoi(ps = ++qs): 0; data/spaln-2.4.0+dfsg/src/seq.h:530:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/seq.h:670:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gaps.gln = atoi(ps = cdr(ps)); data/spaln-2.4.0+dfsg/src/seq.h:673:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gaps.gps = atoi(cdr(ps)); data/spaln-2.4.0+dfsg/src/seq.h:799:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). len = atoi(++qs); data/spaln-2.4.0+dfsg/src/seq.h:899:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAXL]; data/spaln-2.4.0+dfsg/src/seq.h:1234:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char Iends[4]; data/spaln-2.4.0+dfsg/src/seq.h:1346:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fmt[MAXL]; data/spaln-2.4.0+dfsg/src/sets.c:100:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fg = fopen(ps, "r"); data/spaln-2.4.0+dfsg/src/simmtx.c:167:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = ftable.fopen(fname, BLASTMAT, DEF_MAT_PATH); data/spaln-2.4.0+dfsg/src/simmtx.c:179:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/simmtx.c:290:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = ftable.fopen(mdm_tab, "rb"); data/spaln-2.4.0+dfsg/src/simmtx.c:332:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = ftable.fopen(fname, BLASTMAT, DEF_MAT_PATH); data/spaln-2.4.0+dfsg/src/simmtx.c:346:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/simmtx.c:523:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = ftable.fopen(mdm_cmp, "rb"); data/spaln-2.4.0+dfsg/src/simmtx.c:608:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int k = ps? atoi(ps + 1): 0; data/spaln-2.4.0+dfsg/src/simmtx.c:611:35: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'a': algmode.any = *vl? atoi(vl): 3; break; // boundary stringency data/spaln-2.4.0+dfsg/src/simmtx.c:613:32: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'c': alprm2.jneibr = atoi(vl); break; // data/spaln-2.4.0+dfsg/src/simmtx.c:618:47: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((ps = strchr(vl, ','))) alprm3.hpwing = atoi(ps + 1); data/spaln-2.4.0+dfsg/src/simmtx.c:623:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'k': alprm.k1 = atoi(vl); break; // flex point data/spaln-2.4.0+dfsg/src/simmtx.c:624:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'l': setlsegs(atoi(vl)); break; // # linear pieces data/spaln-2.4.0+dfsg/src/simmtx.c:630:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'p': defPprm[k].p = atoi(vl); break; // 1st pam data/spaln-2.4.0+dfsg/src/simmtx.c:631:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'q': defPprm[1].p = atoi(vl); break; // 2nd pam data/spaln-2.4.0+dfsg/src/simmtx.c:633:49: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((ps = strchr(vl, ','))) alprm3.no_angle = atoi(ps + 1); data/spaln-2.4.0+dfsg/src/simmtx.c:640:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'w': alprm.sh = atoi(vl); break; // band width data/spaln-2.4.0+dfsg/src/simmtx.c:646:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'D': bpprm.maxb3d = atoi(vl); break; // max distance bp to 3'ss data/spaln-2.4.0+dfsg/src/simmtx.c:647:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'E': IntronPrm.elmt = atoi(vl); break; // min exon len data/spaln-2.4.0+dfsg/src/simmtx.c:665:32: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'K': alprm2.termk1 = atoi(vl); break; // max terminal gap length without penalty data/spaln-2.4.0+dfsg/src/simmtx.c:666:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'L': IntronPrm.llmt = atoi(vl); break; // lower limit of intron data/spaln-2.4.0+dfsg/src/simmtx.c:672:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'T': IntronPrm.tlmt = atoi(vl); break; // data/spaln-2.4.0+dfsg/src/simmtx.c:674:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'X': algmode.crs = vl? atoi(vl): 1; break; // set cross-species switch data/spaln-2.4.0+dfsg/src/sortgrcd.c:307:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/sortgrcd.c:312:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "Dbs%d %d %d", gwrk->Cid, l, r); data/spaln-2.4.0+dfsg/src/sortgrcd.c:369:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/sortgrcd.c:374:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "Dbs%d %d %d", gwrk->Cid, l, r); data/spaln-2.4.0+dfsg/src/sortgrcd.c:725:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mname[MAXL]; data/spaln-2.4.0+dfsg/src/sortgrcd.c:809:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/sortgrcd.c:816:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fe = fopen(fname(str, *av++, erext, nth), "r"); data/spaln-2.4.0+dfsg/src/sortgrcd.c:860:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/sortgrcd.c:867:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fe = fopen(fname(str, av[fn], erext, nth), "r"); data/spaln-2.4.0+dfsg/src/sortgrcd.c:976:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/sortgrcd.c:981:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = fopen(fname(str, bdy, ext, nth), "r"); data/spaln-2.4.0+dfsg/src/sortgrcd.c:994:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[rcdsize]; data/spaln-2.4.0+dfsg/src/sortgrcd.c:1009:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/sortgrcd.c:1018:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = fopen(fname(str, *av, qrext, nth), "r"); data/spaln-2.4.0+dfsg/src/sortgrcd.c:1055:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/sortgrcd.c:1062:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = fopen(fname(str, *av, grext, nth), "r"); data/spaln-2.4.0+dfsg/src/sortgrcd.c:1131:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/sortgrcd.c:1141:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). {flevel = atoi(val);} data/spaln-2.4.0+dfsg/src/sortgrcd.c:1152:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). {algmode.mlt = atoi(val);} data/spaln-2.4.0+dfsg/src/sortgrcd.c:1156:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). {initcodon(atoi(val));} data/spaln-2.4.0+dfsg/src/sortgrcd.c:1165:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). {setorf(atoi(val));} data/spaln-2.4.0+dfsg/src/sortgrcd.c:1169:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). {filter.Bmmc = atoi(val);} data/spaln-2.4.0+dfsg/src/sortgrcd.c:1173:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). {filter.ng = atoi(val);} data/spaln-2.4.0+dfsg/src/sortgrcd.c:1177:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). {OutMode = atoi(val);} data/spaln-2.4.0+dfsg/src/sortgrcd.c:1197:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). {filter.Bunp = atoi(val);} // near junction break; data/spaln-2.4.0+dfsg/src/sortgrcd.c:1201:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). MaxeRcd = atoi(val); // size used for core sort data/spaln-2.4.0+dfsg/src/sortgrcd.c:1215:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). {HashSize = atoi(val);} data/spaln-2.4.0+dfsg/src/sortgrcd.c:1219:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). {setlpw(atoi(val));} // near each junction data/spaln-2.4.0+dfsg/src/sortgrcd.c:1223:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). {filter.bmmc = atoi(val);} // near each junction data/spaln-2.4.0+dfsg/src/sortgrcd.c:1227:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). {filter.ncan = atoi(val);} // non-canonical ends data/spaln-2.4.0+dfsg/src/sortgrcd.c:1233:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). {thread_num = atoi(val);} data/spaln-2.4.0+dfsg/src/sortgrcd.c:1239:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). {filter.bunp = atoi(val);} // near each junction data/spaln-2.4.0+dfsg/src/sortgrcd.c:1247:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = fopen(grpfn, "r"); data/spaln-2.4.0+dfsg/src/sortgrcd.c:1251:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). HashSize = atoi(cdr(str)); // read from the last line data/spaln-2.4.0+dfsg/src/sortgrcd.h:112:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char intends[8]; data/spaln-2.4.0+dfsg/src/spaln.c:266:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). initcodon(atoi(val)); data/spaln-2.4.0+dfsg/src/spaln.c:270:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). algmode.alg = atoi(val); data/spaln-2.4.0+dfsg/src/spaln.c:309:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). setorf(SILENT, atoi(val)); data/spaln-2.4.0+dfsg/src/spaln.c:313:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). setorf(atoi(val), SILENT); data/spaln-2.4.0+dfsg/src/spaln.c:340:40: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (isdigit(*val)) algmode.lcl = atoi(val); data/spaln-2.4.0+dfsg/src/spaln.c:359:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). setlpw(atoi(val)); data/spaln-2.4.0+dfsg/src/spaln.c:364:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). OutPrm.MaxOut = atoi(val); data/spaln-2.4.0+dfsg/src/spaln.c:367:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). OutPrm.MaxOut2 = atoi(++val); data/spaln-2.4.0+dfsg/src/spaln.c:376:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). k = atoi(opt + 1) - 1; data/spaln-2.4.0+dfsg/src/spaln.c:383:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). MinQueryLen = atoi(val); data/spaln-2.4.0+dfsg/src/spaln.c:414:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int q = atoi(val); data/spaln-2.4.0+dfsg/src/spaln.c:422:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). max_queue_num = atoi(val); data/spaln-2.4.0+dfsg/src/spaln.c:443:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (isdigit(*val)) q_mns = atoi(val); else data/spaln-2.4.0+dfsg/src/spaln.c:445:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). {q_mns = atoi(*++argv); --argc;} data/spaln-2.4.0+dfsg/src/spaln.c:451:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). thread_num = atoi(val); data/spaln-2.4.0+dfsg/src/spaln.c:492:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = ftable.fopen(AlnParam, "r"); data/spaln-2.4.0+dfsg/src/spaln.c:494:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char argstr[MAX_ARGTEXT]; data/spaln-2.4.0+dfsg/src/spaln.c:498:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/spaln.c:926:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/spaln.c:1238:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/sqpr.c:103:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(out_fd = fopen(OutPrm.out_file, "w"))) data/spaln-2.4.0+dfsg/src/sqpr.c:333:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/sqpr.c:399:22: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. if (mode == 2) sprintf(str + c, "%d..%d", l, r); data/spaln-2.4.0+dfsg/src/sqpr.c:409:22: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. if (mode == 2) sprintf(str + c, "%d..%d", l, r); data/spaln-2.4.0+dfsg/src/sqpr.c:415:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str + c, "%d..%d", l, r); data/spaln-2.4.0+dfsg/src/sqpr.c:478:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mname[MAXL]; data/spaln-2.4.0+dfsg/src/sqpr.c:556:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mname[MAXL]; data/spaln-2.4.0+dfsg/src/sqpr.c:818:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/sqpr.c:831:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char intends[8]; data/spaln-2.4.0+dfsg/src/sqpr.c:846:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(fg = fopen(str, "wb"))) fatal(efmt, str, 0); data/spaln-2.4.0+dfsg/src/sqpr.c:854:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(fe = fopen(str, "wb"))) fatal(efmt, str, 0); data/spaln-2.4.0+dfsg/src/sqpr.c:864:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(fq = fopen(str, "wb"))) fatal(efmt, str, 0); data/spaln-2.4.0+dfsg/src/sqpr.c:997:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char intends[10]; data/spaln-2.4.0+dfsg/src/sqpr.c:1308:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). algmode.nsa = atoi(sl[i]) & 15; data/spaln-2.4.0+dfsg/src/sqpr.c:1340:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/sqpr.c:1349:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(fn, ".O%d", algmode.nsa); data/spaln-2.4.0+dfsg/src/sqpr.c:1351:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fds[0] = fopen(str, "w"); data/spaln-2.4.0+dfsg/src/sqpr.c:1362:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(fn, ".O%d", i); data/spaln-2.4.0+dfsg/src/sqpr.c:1363:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fds[n] = fopen(str, "w"); data/spaln-2.4.0+dfsg/src/sqpr.c:1671:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/sqpr.c:1873:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(fmt, "%s:%s"); data/spaln-2.4.0+dfsg/src/sqpr.c:1876:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(fmt, "%%-%ds", sname->longest()); data/spaln-2.4.0+dfsg/src/sqpr.c:1878:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(fmt, "%s"); data/spaln-2.4.0+dfsg/src/sqpr.c:1915:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/sqpr.c:1918:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(str, " + "); data/spaln-2.4.0+dfsg/src/sqpr.c:2299:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/sqpr.c:2305:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str + c, " %d %d,", pfq->pos, pfq->num); data/spaln-2.4.0+dfsg/src/sqpr.c:2319:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str + c, " %d", *lst + 1); data/spaln-2.4.0+dfsg/src/supprime.c:404:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). n = atoi(*++argv); data/spaln-2.4.0+dfsg/src/utilseq.c:485:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fi = fopen(spath, "r"); data/spaln-2.4.0+dfsg/src/utilseq.c:670:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/utilseq.c:676:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = fopen(fname, "r"); data/spaln-2.4.0+dfsg/src/utilseq.c:677:23: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!fd) fd = ftable.fopen(fname, "r"); data/spaln-2.4.0+dfsg/src/utilseq.c:683:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = fopen(str, "r"); data/spaln-2.4.0+dfsg/src/utilseq.c:689:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = fopen(str, "r"); data/spaln-2.4.0+dfsg/src/utilseq.c:719:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/utilseq.c:722:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "human%d.cdi", gc); data/spaln-2.4.0+dfsg/src/utilseq.c:728:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gc = atoi(str); data/spaln-2.4.0+dfsg/src/utilseq.c:730:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "human%d.cdi", gc); data/spaln-2.4.0+dfsg/src/utilseq.c:739:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL]; data/spaln-2.4.0+dfsg/src/utilseq.c:831:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/utilseq.c:840:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = ftable.fopen(str, "r"); data/spaln-2.4.0+dfsg/src/utilseq.c:1023:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL+1]; data/spaln-2.4.0+dfsg/src/utilseq.c:1027:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = ftable.fopen(CODEPOT, "r"); data/spaln-2.4.0+dfsg/src/utilseq.c:1237:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fd = ftable.fopen(fname, "r"); data/spaln-2.4.0+dfsg/src/utilseq.c:1242:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[MAXL+1]; data/spaln-2.4.0+dfsg/src/wln.c:217:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'D': hspprm.DirRep = atoi(vl); break; data/spaln-2.4.0+dfsg/src/wln.c:218:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'G': wlp0->gain = atoi(vl); break; data/spaln-2.4.0+dfsg/src/wln.c:219:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'H': wlp0->thr = atoi(vl); break; data/spaln-2.4.0+dfsg/src/wln.c:220:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'K': wlp0->tpl = atoi(vl); break; data/spaln-2.4.0+dfsg/src/wln.c:222:41: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (isdigit(*vl)) resetwlprm(wlp0, atoi(vl)); data/spaln-2.4.0+dfsg/src/wln.c:225:32: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'X': wlp0->xdrp = *vl? atoi(vl): 0; break; data/spaln-2.4.0+dfsg/src/wln.c:228:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'g': wlp2->gain = atoi(vl); break; data/spaln-2.4.0+dfsg/src/wln.c:229:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'h': wlp2->thr = atoi(vl); break; data/spaln-2.4.0+dfsg/src/wln.c:230:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'j': max_no_jxts = atoi(vl); break; data/spaln-2.4.0+dfsg/src/wln.c:231:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'k': wlp2->tpl = atoi(vl); break; data/spaln-2.4.0+dfsg/src/wln.c:233:41: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (isdigit(*vl)) resetwlprm(wlp2, atoi(vl)); data/spaln-2.4.0+dfsg/src/wln.c:236:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 's': lutwdshft = atoi(vl); break; data/spaln-2.4.0+dfsg/src/wln.c:237:32: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'x': wlp2->xdrp = *vl? atoi(vl): 0; break; data/spaln-2.4.0+dfsg/src/wln.c:1042:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(seqs[k]->jxt, wlu->jxt, (wlu->num + 1) * sizeof(JUXT)); data/spaln-2.4.0+dfsg/src/wln.c:1063:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/wln.c:1069:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). flut = open(str, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); data/spaln-2.4.0+dfsg/src/wln.c:1075:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). flux = open(str, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); data/spaln-2.4.0+dfsg/src/wln.c:1148:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). flut = open(fname, O_RDONLY); data/spaln-2.4.0+dfsg/src/wln.c:1167:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_MAX]; data/spaln-2.4.0+dfsg/src/wln.c:1172:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). flux = open(str, O_RDONLY); data/spaln-2.4.0+dfsg/src/wln.c:1194:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). flut = open(src.fname, O_RDONLY); data/spaln-2.4.0+dfsg/src/adddef.h:111:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline int fgetc(gzFile gzfd) { data/spaln-2.4.0+dfsg/src/bitpat.c:104:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). width = strlen(spat); data/spaln-2.4.0+dfsg/src/blksrc.c:259:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fd)) != EOF && !isspace(c)) { data/spaln-2.4.0+dfsg/src/blksrc.c:689:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else dot = str + strlen(str); data/spaln-2.4.0+dfsg/src/blksrc.c:929:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fd)) != EOF) { data/spaln-2.4.0+dfsg/src/blksrc.c:943:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fd)) != EOF && c != '\n'); data/spaln-2.4.0+dfsg/src/blksrc.c:946:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((c = fgetc(fd)) == '/') data/spaln-2.4.0+dfsg/src/blksrc.c:947:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fd)) != EOF && c != '>'); data/spaln-2.4.0+dfsg/src/blksrc.c:1031:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fd)) != EOF) { data/spaln-2.4.0+dfsg/src/blksrc.c:1087:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fd)) != EOF && c != '\n'); data/spaln-2.4.0+dfsg/src/blksrc.c:1090:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((c = fgetc(fd)) == '/') data/spaln-2.4.0+dfsg/src/blksrc.c:1091:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fd)) != EOF && c != '>'); data/spaln-2.4.0+dfsg/src/blksrc.c:1211:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). entlen += strlen((*sd->sname)[0]); data/spaln-2.4.0+dfsg/src/blksrc.c:1483:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fd)) != EOF) { data/spaln-2.4.0+dfsg/src/blksrc.c:1524:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fd)) != EOF && c != '\n'); data/spaln-2.4.0+dfsg/src/blksrc.c:1527:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((c = fgetc(fd)) == '/') data/spaln-2.4.0+dfsg/src/blksrc.c:1528:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fd)) != EOF && c != '>'); data/spaln-2.4.0+dfsg/src/clib.c:69:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dst = new char[strlen(src) + 1]; data/spaln-2.4.0+dfsg/src/clib.c:113:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int slen = strlen(from); data/spaln-2.4.0+dfsg/src/clib.c:191:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ps += strlen(ps) - 1; data/spaln-2.4.0+dfsg/src/clib.c:356:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). totallen = lastlen = maxlen = strlen(str) + 1; data/spaln-2.4.0+dfsg/src/clib.c:370:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). totallen = sunitsize = strlen(str) + 1; data/spaln-2.4.0+dfsg/src/clib.c:403:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lastlen = strlen(ps) + 1; data/spaln-2.4.0+dfsg/src/clib.c:413:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lastlen = strlen(ps) + 1; data/spaln-2.4.0+dfsg/src/clib.c:482:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). totallen = lastlen = maxlen = strlen(str) + 1; data/spaln-2.4.0+dfsg/src/clib.c:505:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lastlen = strlen(str) + 1; data/spaln-2.4.0+dfsg/src/clib.c:530:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int tl = strlen(argv[0]); data/spaln-2.4.0+dfsg/src/clib.c:533:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (argv[i][0] == OPTCHAR) tl += strlen(argv[i]); data/spaln-2.4.0+dfsg/src/clib.c:537:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tl += strlen(argv[i]) + 4; data/spaln-2.4.0+dfsg/src/clib.c:542:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else tl += strlen(argv[i]); data/spaln-2.4.0+dfsg/src/clib.c:550:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ps += strlen(ps) + 1; data/spaln-2.4.0+dfsg/src/clib.c:559:20: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). arg_ext[i] = strncpy(ps, argv[i], dot - argv[i]); data/spaln-2.4.0+dfsg/src/dbs.c:309:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (db->FormID == EMBL && !strcmp(ps + strlen(ps) - 4, "AA.\n")) data/spaln-2.4.0+dfsg/src/dbs.c:412:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(entry + entidx, rec20->entry, ENTLEN); data/spaln-2.4.0+dfsg/src/dbs.c:413:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). entidx += strlen(entry + entidx) + 1; data/spaln-2.4.0+dfsg/src/dbs.c:476:29: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = dbsseq? *ps++: getc(fseq); data/spaln-2.4.0+dfsg/src/dbs.c:568:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(form) <= 1) { data/spaln-2.4.0+dfsg/src/dbs.c:664:22: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (n-- && (c = getc(fd)) != EOF) { data/spaln-2.4.0+dfsg/src/dbs.c:675:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fd); data/spaln-2.4.0+dfsg/src/dbs.c:681:22: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (n-- && (c = getc(fd)) != EOF) { data/spaln-2.4.0+dfsg/src/gsinfo.c:451:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (int i = strlen("Perdeci"); i < preblank; ++i) fputc(' ', fd); data/spaln-2.4.0+dfsg/src/gsinfo.c:463:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (int i = strlen("Kingdoms"); i < preblank; ++i) fputc(' ', fd); data/spaln-2.4.0+dfsg/src/gsinfo.c:482:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (int i = strlen("Phyla"); i < preblank; ++i) fputc(' ', fd); data/spaln-2.4.0+dfsg/src/iolib.c:73:28: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (--maxl > 0 && (c = getc(fd)) != -1) data/spaln-2.4.0+dfsg/src/iolib.c:105:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). trm = res + strlen(res) - 1; data/spaln-2.4.0+dfsg/src/iolib.c:125:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(result, sg[i], l); data/spaln-2.4.0+dfsg/src/iolib.c:127:3: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(result, sd[i], sd[i+1] - sd[i]); data/spaln-2.4.0+dfsg/src/iolib.c:200:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). partfnam(str + strlen(str), name, "b"); data/spaln-2.4.0+dfsg/src/iolib.c:201:34: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. if (*extent && *extent != '.') strcat(str, "."); data/spaln-2.4.0+dfsg/src/iolib.c:290:7: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(str, "/"); data/spaln-2.4.0+dfsg/src/iolib.c:313:7: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(str, "/"); data/spaln-2.4.0+dfsg/src/iolib.c:355:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(str, "/"); data/spaln-2.4.0+dfsg/src/iolib.c:618:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). str[strlen(str) - 1] = '\0'; data/spaln-2.4.0+dfsg/src/iolib.c:857:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). partfnam(str + strlen(str), name, "b"); data/spaln-2.4.0+dfsg/src/iolib.c:858:34: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. if (*extent && *extent != '.') strcat(str, "."); data/spaln-2.4.0+dfsg/src/makdbs.c:120:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). halfway = ps && (strlen(ps) + 1) == MAXL; data/spaln-2.4.0+dfsg/src/makdbs.c:128:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fsrc)) != EOF && c != '\n') ; data/spaln-2.4.0+dfsg/src/makdbs.c:233:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int sl = strlen(ps); data/spaln-2.4.0+dfsg/src/seq.c:276:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int attrsize = strlen(cdr(fn)) + 8; data/spaln-2.4.0+dfsg/src/seq.c:1513:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen(str) - 1; data/spaln-2.4.0+dfsg/src/seq.c:1544:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen(str) - 1; data/spaln-2.4.0+dfsg/src/seq.h:537:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((strlen(str) + 1) == MAXL) flush_line(fd); data/spaln-2.4.0+dfsg/src/seq.h:629:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(ps); data/spaln-2.4.0+dfsg/src/seq.h:1108:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pending = (strlen(str) + 1) == (INT) MAXL; data/spaln-2.4.0+dfsg/src/seq.h:1470:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return ((strlen(str) + 1) == maxl? fgets(str, maxl, fd): 0); data/spaln-2.4.0+dfsg/src/sortgrcd.c:796:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char* pdot = str + strlen(str); data/spaln-2.4.0+dfsg/src/sortgrcd.c:1202:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). switch (val[strlen(val) - 1]) { data/spaln-2.4.0+dfsg/src/sqpr.c:354:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (out_form->ContSpc < strlen(blank)) data/spaln-2.4.0+dfsg/src/sqpr.c:382:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). c = strlen(str); data/spaln-2.4.0+dfsg/src/sqpr.c:383:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lb = strlen(head); data/spaln-2.4.0+dfsg/src/sqpr.c:417:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(str, ","); data/spaln-2.4.0+dfsg/src/sqpr.c:418:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((c = strlen(str)) > 56) { data/spaln-2.4.0+dfsg/src/sqpr.c:838:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char* bdy = str + strlen(str); data/spaln-2.4.0+dfsg/src/sqpr.c:1324:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int slen = strlen(sl); data/spaln-2.4.0+dfsg/src/sqpr.c:1327:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen += strlen(OutPrm.out_file); data/spaln-2.4.0+dfsg/src/sqpr.c:1330:35: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. if (prefix[slen - 1] != '/') strcat(prefix, "/"); data/spaln-2.4.0+dfsg/src/sqpr.c:1342:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char* fn = str + strlen(str); data/spaln-2.4.0+dfsg/src/sqpr.c:2306:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((c = strlen(str)) > lwd) { data/spaln-2.4.0+dfsg/src/sqpr.c:2320:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((c = strlen(str)) > lwd) { data/spaln-2.4.0+dfsg/src/utilseq.c:489:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fi)) != EOF) { data/spaln-2.4.0+dfsg/src/utilseq.c:493:7: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fi); data/spaln-2.4.0+dfsg/src/utilseq.c:564:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). i = width - strlen(form->SeqHead); data/spaln-2.4.0+dfsg/src/utilseq.c:756:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((rc = fgetc(fd)) != EOF && rc != '\n') ; data/spaln-2.4.0+dfsg/src/utilseq.c:772:17: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((skip = getc(fd)) != EOF && skip != '\n'); data/spaln-2.4.0+dfsg/src/wln.c:1067:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else dot = str + strlen(str); data/spaln-2.4.0+dfsg/src/wln.c:1175:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(flux, lutidx, s_idx) != s_idx) data/spaln-2.4.0+dfsg/src/wln.c:1214:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(flut, buf, len) != len) data/spaln-2.4.0+dfsg/src/wln.h:137:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(flut, &info, sizeof(LookupTabInfo)) != sizeof(LookupTabInfo)) ANALYSIS SUMMARY: Hits = 596 Lines analyzed = 34646 in approximately 1.15 seconds (30241 lines/second) Physical Source Lines of Code (SLOC) = 30921 Hits@level = [0] 281 [1] 88 [2] 311 [3] 18 [4] 179 [5] 0 Hits@level+ = [0+] 877 [1+] 596 [2+] 508 [3+] 197 [4+] 179 [5+] 0 Hits/KSLOC@level+ = [0+] 28.3626 [1+] 19.2749 [2+] 16.429 [3+] 6.37107 [4+] 5.78895 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.