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/libf2c2-20140711/abort_.c Examining data/libf2c2-20140711/backspac.c Examining data/libf2c2-20140711/c_abs.c Examining data/libf2c2-20140711/c_cos.c Examining data/libf2c2-20140711/c_div.c Examining data/libf2c2-20140711/c_exp.c Examining data/libf2c2-20140711/c_log.c Examining data/libf2c2-20140711/c_sin.c Examining data/libf2c2-20140711/c_sqrt.c Examining data/libf2c2-20140711/cabs.c Examining data/libf2c2-20140711/close.c Examining data/libf2c2-20140711/ctype.c Examining data/libf2c2-20140711/ctype.h Examining data/libf2c2-20140711/d_abs.c Examining data/libf2c2-20140711/d_acos.c Examining data/libf2c2-20140711/d_asin.c Examining data/libf2c2-20140711/d_atan.c Examining data/libf2c2-20140711/d_atn2.c Examining data/libf2c2-20140711/d_cnjg.c Examining data/libf2c2-20140711/d_cos.c Examining data/libf2c2-20140711/d_cosh.c Examining data/libf2c2-20140711/d_dim.c Examining data/libf2c2-20140711/d_exp.c Examining data/libf2c2-20140711/d_imag.c Examining data/libf2c2-20140711/d_int.c Examining data/libf2c2-20140711/d_lg10.c Examining data/libf2c2-20140711/d_log.c Examining data/libf2c2-20140711/d_mod.c Examining data/libf2c2-20140711/d_nint.c Examining data/libf2c2-20140711/d_prod.c Examining data/libf2c2-20140711/d_sign.c Examining data/libf2c2-20140711/d_sin.c Examining data/libf2c2-20140711/d_sinh.c Examining data/libf2c2-20140711/d_sqrt.c Examining data/libf2c2-20140711/d_tan.c Examining data/libf2c2-20140711/d_tanh.c Examining data/libf2c2-20140711/derf_.c Examining data/libf2c2-20140711/derfc_.c Examining data/libf2c2-20140711/dfe.c Examining data/libf2c2-20140711/dolio.c Examining data/libf2c2-20140711/dtime_.c Examining data/libf2c2-20140711/due.c Examining data/libf2c2-20140711/ef1asc_.c Examining data/libf2c2-20140711/ef1cmc_.c Examining data/libf2c2-20140711/endfile.c Examining data/libf2c2-20140711/erf_.c Examining data/libf2c2-20140711/erfc_.c Examining data/libf2c2-20140711/err.c Examining data/libf2c2-20140711/etime_.c Examining data/libf2c2-20140711/exit_.c Examining data/libf2c2-20140711/f77vers.c Examining data/libf2c2-20140711/fio.h Examining data/libf2c2-20140711/fmt.c Examining data/libf2c2-20140711/fmt.h Examining data/libf2c2-20140711/fmtlib.c Examining data/libf2c2-20140711/fp.h Examining data/libf2c2-20140711/ftell64_.c Examining data/libf2c2-20140711/ftell_.c Examining data/libf2c2-20140711/getarg_.c Examining data/libf2c2-20140711/h_abs.c Examining data/libf2c2-20140711/h_dim.c Examining data/libf2c2-20140711/h_dnnt.c Examining data/libf2c2-20140711/h_indx.c Examining data/libf2c2-20140711/h_len.c Examining data/libf2c2-20140711/h_mod.c Examining data/libf2c2-20140711/h_nint.c Examining data/libf2c2-20140711/h_sign.c Examining data/libf2c2-20140711/hl_ge.c Examining data/libf2c2-20140711/hl_gt.c Examining data/libf2c2-20140711/hl_le.c Examining data/libf2c2-20140711/hl_lt.c Examining data/libf2c2-20140711/i77vers.c Examining data/libf2c2-20140711/i_abs.c Examining data/libf2c2-20140711/i_dim.c Examining data/libf2c2-20140711/i_dnnt.c Examining data/libf2c2-20140711/i_indx.c Examining data/libf2c2-20140711/i_len.c Examining data/libf2c2-20140711/i_mod.c Examining data/libf2c2-20140711/i_nint.c Examining data/libf2c2-20140711/i_sign.c Examining data/libf2c2-20140711/iargc_.c Examining data/libf2c2-20140711/iio.c Examining data/libf2c2-20140711/ilnw.c Examining data/libf2c2-20140711/inquire.c Examining data/libf2c2-20140711/l_ge.c Examining data/libf2c2-20140711/l_gt.c Examining data/libf2c2-20140711/l_le.c Examining data/libf2c2-20140711/l_lt.c Examining data/libf2c2-20140711/lbitbits.c Examining data/libf2c2-20140711/lbitshft.c Examining data/libf2c2-20140711/lio.h Examining data/libf2c2-20140711/lread.c Examining data/libf2c2-20140711/lwrite.c Examining data/libf2c2-20140711/pow_ci.c Examining data/libf2c2-20140711/pow_dd.c Examining data/libf2c2-20140711/pow_di.c Examining data/libf2c2-20140711/pow_hh.c Examining data/libf2c2-20140711/pow_ii.c Examining data/libf2c2-20140711/pow_qq.c Examining data/libf2c2-20140711/pow_ri.c Examining data/libf2c2-20140711/pow_zi.c Examining data/libf2c2-20140711/pow_zz.c Examining data/libf2c2-20140711/qbitbits.c Examining data/libf2c2-20140711/qbitshft.c Examining data/libf2c2-20140711/r_abs.c Examining data/libf2c2-20140711/r_acos.c Examining data/libf2c2-20140711/r_asin.c Examining data/libf2c2-20140711/r_atan.c Examining data/libf2c2-20140711/r_atn2.c Examining data/libf2c2-20140711/r_cnjg.c Examining data/libf2c2-20140711/r_cos.c Examining data/libf2c2-20140711/r_cosh.c Examining data/libf2c2-20140711/r_dim.c Examining data/libf2c2-20140711/r_exp.c Examining data/libf2c2-20140711/r_imag.c Examining data/libf2c2-20140711/r_int.c Examining data/libf2c2-20140711/r_lg10.c Examining data/libf2c2-20140711/r_log.c Examining data/libf2c2-20140711/r_mod.c Examining data/libf2c2-20140711/r_nint.c Examining data/libf2c2-20140711/r_sign.c Examining data/libf2c2-20140711/r_sin.c Examining data/libf2c2-20140711/r_sinh.c Examining data/libf2c2-20140711/r_sqrt.c Examining data/libf2c2-20140711/r_tan.c Examining data/libf2c2-20140711/r_tanh.c Examining data/libf2c2-20140711/rawio.h Examining data/libf2c2-20140711/rdfmt.c Examining data/libf2c2-20140711/rewind.c Examining data/libf2c2-20140711/rsfe.c Examining data/libf2c2-20140711/rsli.c Examining data/libf2c2-20140711/rsne.c Examining data/libf2c2-20140711/s_cat.c Examining data/libf2c2-20140711/s_cmp.c Examining data/libf2c2-20140711/s_copy.c Examining data/libf2c2-20140711/s_paus.c Examining data/libf2c2-20140711/s_rnge.c Examining data/libf2c2-20140711/s_stop.c Examining data/libf2c2-20140711/sfe.c Examining data/libf2c2-20140711/sig_die.c Examining data/libf2c2-20140711/signal_.c Examining data/libf2c2-20140711/signbit.c Examining data/libf2c2-20140711/sue.c Examining data/libf2c2-20140711/system_.c Examining data/libf2c2-20140711/typesize.c Examining data/libf2c2-20140711/uio.c Examining data/libf2c2-20140711/util.c Examining data/libf2c2-20140711/wref.c Examining data/libf2c2-20140711/wrtfmt.c Examining data/libf2c2-20140711/wsfe.c Examining data/libf2c2-20140711/wsle.c Examining data/libf2c2-20140711/wsne.c Examining data/libf2c2-20140711/xwsne.c Examining data/libf2c2-20140711/z_abs.c Examining data/libf2c2-20140711/z_cos.c Examining data/libf2c2-20140711/z_div.c Examining data/libf2c2-20140711/z_exp.c Examining data/libf2c2-20140711/z_log.c Examining data/libf2c2-20140711/z_sin.c Examining data/libf2c2-20140711/z_sqrt.c Examining data/libf2c2-20140711/uninit.c Examining data/libf2c2-20140711/i_ceiling.c Examining data/libf2c2-20140711/i_len_trim.c Examining data/libf2c2-20140711/arithchk.c Examining data/libf2c2-20140711/main.c Examining data/libf2c2-20140711/open.c Examining data/libf2c2-20140711/f77_aloc.c Examining data/libf2c2-20140711/getenv_.c FINAL RESULTS: data/libf2c2-20140711/endfile.c:17: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). extern char *strcpy(); data/libf2c2-20140711/err.c:143:36: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. Help! How does fstat work on this system? data/libf2c2-20140711/err.c:167: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(stderr, f__curunit->ufnm ? "named %s\n" : "(unnamed)\n", data/libf2c2-20140711/inquire.c:35:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. x = access(buf,0) ? -1 : 0; data/libf2c2-20140711/lwrite.c:110:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf, fmt, n); data/libf2c2-20140711/lwrite.c:113:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. return sprintf(buf, fmt, n); data/libf2c2-20140711/lwrite.c:137:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(b, LGFMT, n); data/libf2c2-20140711/open.c:15:14: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). extern char *mktemp(); data/libf2c2-20140711/open.c:207:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(buf,0)) data/libf2c2-20140711/open.c:216:10: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). (void) mktemp(buf); data/libf2c2-20140711/open.c:237:8: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (!access(buf,0)) data/libf2c2-20140711/open.c:252: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). (void) strcpy(b->ufnm,buf); data/libf2c2-20140711/rawio.h:29:14: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). extern char *mktemp(char*); data/libf2c2-20140711/system_.c:35:7: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. rv = system(buff); data/libf2c2-20140711/getenv_.c:4:27: [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. extern char *F77_aloc(), *getenv(); data/libf2c2-20140711/getenv_.c:42:9: [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. ep = getenv(buf); data/libf2c2-20140711/getenv_.c:50:7: [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. ep = getenv(fp); data/libf2c2-20140711/arithchk.c:197:6: [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). f = fopen("arith.h", "w"); data/libf2c2-20140711/ctype.h:9:1: [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 My_ctype[264] = { data/libf2c2-20140711/endfile.c:18:14: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). extern FILE *tmpfile(); data/libf2c2-20140711/endfile.c:44: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 nbuf[10]; data/libf2c2-20140711/endfile.c:45: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(nbuf,"fort.%ld",(long)a->aunit); data/libf2c2-20140711/endfile.c:63: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[BUFSIZ]; data/libf2c2-20140711/endfile.c:111:13: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). || !(tf = tmpfile())) { data/libf2c2-20140711/fio.h:18: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). #define FOPEN fopen data/libf2c2-20140711/fmtlib.c:22:9: [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[MAXINTLENGTH+1]; data/libf2c2-20140711/getenv_.c:34: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[256], *ep, *fp; data/libf2c2-20140711/inquire.c:29: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[256]; data/libf2c2-20140711/lread.c:54:1: [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 f__ltab[128+1] = { /* offset one for EOF */ data/libf2c2-20140711/lread.c:120: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 s[FMAX+EXPMAXDIGS+4]; data/libf2c2-20140711/lread.c:162: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). f__lcount = atoi(s); data/libf2c2-20140711/lread.c:220:4: [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(sp+1, "e%ld", exp); data/libf2c2-20140711/lread.c:344:9: [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 nmLbuf[256], *nmL_next; data/libf2c2-20140711/lwrite.c:201: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[LEFBL]; data/libf2c2-20140711/lwrite.c:214: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 *ba, *bb, bufa[LEFBL], bufb[LEFBL]; data/libf2c2-20140711/open.c:33: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. Const char *f__r_mode[2] = {"r", "r"}; data/libf2c2-20140711/open.c:34: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. Const char *f__w_mode[4] = {"w", "w", "r+w", "r+w"}; data/libf2c2-20140711/open.c:36: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. Const char *f__r_mode[2] = {"rb", "r"}; data/libf2c2-20140711/open.c:37: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. Const char *f__w_mode[4] = {"wb", "w", "r+b", "r+"}; data/libf2c2-20140711/open.c:40:9: [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 f__buf0[400], *f__buf = f__buf0; data/libf2c2-20140711/open.c:137: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[256], *s; data/libf2c2-20140711/open.c:192: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(buf, "fort.%ld", (long)a->ounit); data/libf2c2-20140711/open.c:215:10: [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. (void) strcpy(buf,"tmp.FXXXXXX"); data/libf2c2-20140711/open.c:219:18: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (!(b->ufd = tmpfile())) data/libf2c2-20140711/open.c:285: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 nbuf[17]; data/libf2c2-20140711/open.c:287:9: [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. (void) sprintf(nbuf,"fort.%ld",(long)n); data/libf2c2-20140711/rawio.h:7: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). #define open _open data/libf2c2-20140711/rawio.h:17:36: [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). extern int creat(const char*,int), open(const char*,int); data/libf2c2-20140711/rdfmt.c:33:9: [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 hex[256]; data/libf2c2-20140711/rdfmt.c:236: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 s[FMAX+EXPMAXDIGS+4]; data/libf2c2-20140711/rdfmt.c:382:4: [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(sp+1, "e%ld", exp); data/libf2c2-20140711/rsne.c:150: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 Alpha[256], Alphanum[256]; data/libf2c2-20140711/rsne.c:308: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[64]; data/libf2c2-20140711/s_cat.c:79: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(lp0, lp1, L); data/libf2c2-20140711/s_paus.c:70:9: [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). fin = fopen("con", "r"); data/libf2c2-20140711/system_.c:24: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 buff0[256], *buff; data/libf2c2-20140711/wref.c:28: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[FMAX+EXPMAXDIGS+4], *s, *se; data/libf2c2-20140711/wref.c:90: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(buf,"%#.*E", d, dd); data/libf2c2-20140711/wref.c:114: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(se, "%+.2d", atoi(se) + 1 - f__scale); data/libf2c2-20140711/wref.c:114: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). sprintf(se, "%+.2d", atoi(se) + 1 - f__scale); data/libf2c2-20140711/wref.c:117: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(se, "%+.2d", atoi(se) + 1 - f__scale); data/libf2c2-20140711/wref.c:117: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). sprintf(se, "%+.2d", atoi(se) + 1 - f__scale); data/libf2c2-20140711/wref.c:119: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(se, "+00"); data/libf2c2-20140711/wref.c:212: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 *b, buf[MAXINTDIGS+MAXFRACDIGS+4], *s; data/libf2c2-20140711/wref.c:243: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(b = buf, "%#.*f", d, x); data/libf2c2-20140711/wref.c:246: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. n = sprintf(b = buf, "%#.*f", d, x) + d1; data/libf2c2-20140711/backspac.c:58:8: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (getc(f) != '\n') data/libf2c2-20140711/dfe.c:14:3: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getc(f__cf); data/libf2c2-20140711/dfe.c:24:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if((ch=getc(f__cf))!=EOF) data/libf2c2-20140711/getenv_.c:48:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fp = F77_aloc(i+1, "getenv_"), fname, (int)i); data/libf2c2-20140711/lread.c:87:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if((ch=getc(f__cf))!=EOF) return(ch); data/libf2c2-20140711/lwrite.c:111:9: [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(buf); data/libf2c2-20140711/open.c:92: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). s += strlen(s); data/libf2c2-20140711/open.c:159:7: [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). && strlen(b->ufnm) == a->ofnmlen data/libf2c2-20140711/open.c:250: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). b->ufnm=(char *) malloc((unsigned int)(strlen(buf)+1)); data/libf2c2-20140711/open.c:291: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). a.ofnmlen=strlen(nbuf); data/libf2c2-20140711/rawio.h:8:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define read _read data/libf2c2-20140711/rawio.h:20:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). extern int read(int,void*,size_t), write(int,void*,size_t); data/libf2c2-20140711/rsfe.c:13:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((ch=getc(f__cf))!='\n') data/libf2c2-20140711/rsfe.c:26:7: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = getc(f__cf); data/libf2c2-20140711/s_paus.c:45:6: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if( getc(fin)!='g' || getc(fin)!='o' || getc(fin)!='\n' ) { data/libf2c2-20140711/s_paus.c:45:24: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if( getc(fin)!='g' || getc(fin)!='o' || getc(fin)!='\n' ) { data/libf2c2-20140711/s_paus.c:45:42: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if( getc(fin)!='g' || getc(fin)!='o' || getc(fin)!='\n' ) { data/libf2c2-20140711/wref.c:99: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). delta = w - strlen(buf) - signspace; data/libf2c2-20140711/wref.c:244: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). n = strlen(b) + d1; data/libf2c2-20140711/xwsne.c:47: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). if (f__recpos+strlen(s)+2 >= L_len) ANALYSIS SUMMARY: Hits = 86 Lines analyzed = 11127 in approximately 0.30 seconds (36640 lines/second) Physical Source Lines of Code (SLOC) = 9831 Hits@level = [0] 61 [1] 20 [2] 49 [3] 3 [4] 14 [5] 0 Hits@level+ = [0+] 147 [1+] 86 [2+] 66 [3+] 17 [4+] 14 [5+] 0 Hits/KSLOC@level+ = [0+] 14.9527 [1+] 8.74784 [2+] 6.71346 [3+] 1.72922 [4+] 1.42407 [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.