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/dvi2dvi-2.0alpha/xxstdio.h Examining data/dvi2dvi-2.0alpha/global.h Examining data/dvi2dvi-2.0alpha/commands.h Examining data/dvi2dvi-2.0alpha/set.h Examining data/dvi2dvi-2.0alpha/dconv.h Examining data/dvi2dvi-2.0alpha/virfont.h Examining data/dvi2dvi-2.0alpha/bifont.h Examining data/dvi2dvi-2.0alpha/funcfont.h Examining data/dvi2dvi-2.0alpha/jsub.h Examining data/dvi2dvi-2.0alpha/dvi.h Examining data/dvi2dvi-2.0alpha/dviconv.c Examining data/dvi2dvi-2.0alpha/dfdcom.c Examining data/dvi2dvi-2.0alpha/fontcom.c Examining data/dvi2dvi-2.0alpha/set.c Examining data/dvi2dvi-2.0alpha/rfset.c Examining data/dvi2dvi-2.0alpha/vfset.c Examining data/dvi2dvi-2.0alpha/dconv.c Examining data/dvi2dvi-2.0alpha/scanfont.c Examining data/dvi2dvi-2.0alpha/vfdcom.c Examining data/dvi2dvi-2.0alpha/compfont.c Examining data/dvi2dvi-2.0alpha/execfont.c Examining data/dvi2dvi-2.0alpha/kanji.c Examining data/dvi2dvi-2.0alpha/open.c Examining data/dvi2dvi-2.0alpha/io.c Examining data/dvi2dvi-2.0alpha/util.c Examining data/dvi2dvi-2.0alpha/xxstdio.c Examining data/dvi2dvi-2.0alpha/version.c Examining data/dvi2dvi-2.0alpha/dvi.c Examining data/dvi2dvi-2.0alpha/dvifont.c Examining data/dvi2dvi-2.0alpha/dvitfm.c Examining data/dvi2dvi-2.0alpha/virfont.c Examining data/dvi2dvi-2.0alpha/fontdesc.c Examining data/dvi2dvi-2.0alpha/decompfont.c Examining data/dvi2dvi-2.0alpha/bifont.c Examining data/dvi2dvi-2.0alpha/funcfont.c Examining data/dvi2dvi-2.0alpha/kpse.c Examining data/dvi2dvi-2.0alpha/dvi2.c Examining data/dvi2dvi-2.0alpha/defs.h Examining data/dvi2dvi-2.0alpha/run.c FINAL RESULTS: data/dvi2dvi-2.0alpha/xxstdio.c:18:8: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. #undef gets data/dvi2dvi-2.0alpha/xxstdio.c:197:9: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. s = gets(s); data/dvi2dvi-2.0alpha/xxstdio.h:28:9: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. #define gets xxgets data/dvi2dvi-2.0alpha/bifont.c:85: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(fe->name, filename); data/dvi2dvi-2.0alpha/bifont.c:88:10: [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. ok = access(fe->name, R_OK) == 0; data/dvi2dvi-2.0alpha/compfont.c:61:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void)sprintf(fe->name, "%s%s", ffcmp->cmp_name, se+1); data/dvi2dvi-2.0alpha/decompfont.c:96:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void)sprintf((char *)n, "%s%s%s", ffdcmp->dcmp_name, jsubfontname(i), ntail); data/dvi2dvi-2.0alpha/decompfont.c:194:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void)sprintf((char *)n, "%s%c%02x%c%s", data/dvi2dvi-2.0alpha/defs.h:52:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. char *sprintf(char *, const char *, ...); data/dvi2dvi-2.0alpha/defs.h:54:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. char *sprintf(); data/dvi2dvi-2.0alpha/defs.h:62:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. int sprintf(char *, const char *, ...); data/dvi2dvi-2.0alpha/defs.h:64:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. int sprintf(); data/dvi2dvi-2.0alpha/defs.h:67:7: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). char *mktemp(); data/dvi2dvi-2.0alpha/defs.h:90:24: [4] (shell) popen: 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. #define BINARYPOPEN(f) popen(f,"rb") data/dvi2dvi-2.0alpha/defs.h:99:24: [4] (shell) popen: 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. #define BINARYPOPEN(f) popen(f,"r") data/dvi2dvi-2.0alpha/fontcom.c:76: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). (void)strcpy(fe->n, n); data/dvi2dvi-2.0alpha/fontdesc.c:126: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). (void)strcpy(newlcd, lcd); data/dvi2dvi-2.0alpha/fontdesc.c:127: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). (void)strcat(newlcd, f); data/dvi2dvi-2.0alpha/fontdesc.c:128: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). (void)strcpy(newf, ld); data/dvi2dvi-2.0alpha/fontdesc.c:129: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). (void)strcat(newf, newlcd); data/dvi2dvi-2.0alpha/fontdesc.c:130:9: [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(newf, R_OK) != 0) { data/dvi2dvi-2.0alpha/fontdesc.c:132:12: [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). (void)strcat(newf, ext); data/dvi2dvi-2.0alpha/fontdesc.c:133:10: [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(newf, R_OK) != 0) data/dvi2dvi-2.0alpha/fontdesc.c:223:12: [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(nld->dir, libdir.dir); data/dvi2dvi-2.0alpha/fontdesc.c:645:12: [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(p, t); data/dvi2dvi-2.0alpha/fontdesc.c:1033:8: [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(pathk0, dvi2lib); data/dvi2dvi-2.0alpha/fontdesc.c:1035:8: [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). (void)strcat(pathk0, pathk+2); data/dvi2dvi-2.0alpha/fontdesc.c:1039: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). (void)strcpy(path, pthk); data/dvi2dvi-2.0alpha/fontdesc.c:1048: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(base, p); data/dvi2dvi-2.0alpha/funcfont.c:206: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(fe->name, filename); data/dvi2dvi-2.0alpha/funcfont.c:209:10: [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. ok = access(fe->name, R_OK) == 0; data/dvi2dvi-2.0alpha/run.c:170:12: [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(dvidirpath, argv[argind]); data/dvi2dvi-2.0alpha/run.c:175:8: [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(curname, tcp); data/dvi2dvi-2.0alpha/run.c:178:12: [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(rootname, curname); /* not used now */ data/dvi2dvi-2.0alpha/run.c:182:12: [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(rootname, curname); /* not used now */ data/dvi2dvi-2.0alpha/run.c:186:8: [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(dvifilename, dvidirpath); data/dvi2dvi-2.0alpha/run.c:187:8: [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). (void)strcat(dvifilename, curname); data/dvi2dvi-2.0alpha/run.c:192:8: [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(G_Logname, rootname); data/dvi2dvi-2.0alpha/run.c:200:8: [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(dvifilename, tmp); data/dvi2dvi-2.0alpha/run.c:201:8: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). (void)mktemp(strcat(dvifilename, DVITEMPLATE)); data/dvi2dvi-2.0alpha/run.c:201:15: [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). (void)mktemp(strcat(dvifilename, DVITEMPLATE)); data/dvi2dvi-2.0alpha/run.c:202:8: [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(rootname, dvifilename); /* not used now */ data/dvi2dvi-2.0alpha/run.c:334:8: [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. (void)fprintf(G_logfp, fmt, a, b, c); data/dvi2dvi-2.0alpha/run.c:340:11: [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. (void)fprintf(stderr, fmt, a, b, c); data/dvi2dvi-2.0alpha/run.c:369:8: [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. (void)fprintf(G_logfp, fmt, a, b, c); data/dvi2dvi-2.0alpha/virfont.c:42: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(fe->name, filename); data/dvi2dvi-2.0alpha/virfont.c:45:10: [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. ok = access(fe->name, R_OK) == 0; data/dvi2dvi-2.0alpha/defs.h:68: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. char *getenv(); data/dvi2dvi-2.0alpha/dvi2.c:119:21: [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. if ((dvi2path = getenv(DVI2PATHENV)) == NULL) data/dvi2dvi-2.0alpha/dvi2.c:124: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. if ((dvi2lib = getenv(DVI2LIBENV)) == NULL) data/dvi2dvi-2.0alpha/dvi2.c:129:25: [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. if ((fontdescfile = getenv(FONTDESCENV)) == NULL) data/dvi2dvi-2.0alpha/run.c:198:13: [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. if ((tmp = getenv("TMP")) == NULL) data/dvi2dvi-2.0alpha/defs.h:39:9: [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 bcopy(s, d, n) memcpy(d, s, n) data/dvi2dvi-2.0alpha/defs.h:39:24: [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 bcopy(s, d, n) memcpy(d, s, n) data/dvi2dvi-2.0alpha/defs.h:88: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). #define BINARYOPEN(f) fopen(f,"rb") /* byte-oriented host version */ data/dvi2dvi-2.0alpha/defs.h:89:24: [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 BINARYWOPEN(f) fopen(f,"w+b") data/dvi2dvi-2.0alpha/defs.h:97: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). #define BINARYOPEN(f) fopen(f,"r") /* byte-oriented host version */ data/dvi2dvi-2.0alpha/defs.h:98:24: [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 BINARYWOPEN(f) fopen(f,"w+") data/dvi2dvi-2.0alpha/defs.h:184:5: [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 n[STRSIZE]; /* FNT_DEF command parameters */ data/dvi2dvi-2.0alpha/defs.h:198:5: [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[PATHLEN]; /* full name of font file */ data/dvi2dvi-2.0alpha/dvi2.c:62: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 dvifilename[PATHLEN]; /* DVI file name */ data/dvi2dvi-2.0alpha/dvi2.c:63: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 dvidirpath[PATHLEN]; /* DVI file directory */ data/dvi2dvi-2.0alpha/dvi2.c:64: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 rootname[PATHLEN]; /* DVI filename without extension */ data/dvi2dvi-2.0alpha/dvi2.c:77: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 G_Logname[PATHLEN]; /* name of log file, if created */ data/dvi2dvi-2.0alpha/execfont.c:32:5: [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 execline[PATHLEN]; data/dvi2dvi-2.0alpha/fontcom.c:40:5: [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 rn[STRSIZE]; data/dvi2dvi-2.0alpha/fontdesc.c:65:5: [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 dir[PATHLEN], lcldir[PATHLEN]; data/dvi2dvi-2.0alpha/fontdesc.c:83:5: [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 fdfile[PATHLEN]; data/dvi2dvi-2.0alpha/fontdesc.c:85:5: [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 field[STRSIZE]; data/dvi2dvi-2.0alpha/fontdesc.c:96: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(fdfile, "r"); data/dvi2dvi-2.0alpha/fontdesc.c:410:5: [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 field_file[PATHLEN]; data/dvi2dvi-2.0alpha/fontdesc.c:411:5: [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 path[PATHLEN]; data/dvi2dvi-2.0alpha/fontdesc.c:423:5: [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 path[PATHLEN]; data/dvi2dvi-2.0alpha/fontdesc.c:456:5: [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 field_type[STRSIZE]; data/dvi2dvi-2.0alpha/fontdesc.c:457:5: [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 field_spec[STRSIZE]; data/dvi2dvi-2.0alpha/fontdesc.c:458:5: [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 field_sub[STRSIZE]; data/dvi2dvi-2.0alpha/fontdesc.c:459:5: [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 field_path[STRSIZE]; data/dvi2dvi-2.0alpha/fontdesc.c:481: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). fd->fd_sub = atoi(field_sub); data/dvi2dvi-2.0alpha/fontdesc.c:525:5: [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 path[PATHLEN]; data/dvi2dvi-2.0alpha/fontdesc.c:561:5: [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 path[PATHLEN]; data/dvi2dvi-2.0alpha/fontdesc.c:600:5: [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 field_name[STRSIZE]; data/dvi2dvi-2.0alpha/fontdesc.c:601:5: [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 field_body[STRSIZE]; data/dvi2dvi-2.0alpha/fontdesc.c:602:5: [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 path[PATHLEN]; data/dvi2dvi-2.0alpha/fontdesc.c:627:5: [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 dname[STRSIZE]; data/dvi2dvi-2.0alpha/fontdesc.c:692:5: [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 field_font[STRSIZE]; data/dvi2dvi-2.0alpha/fontdesc.c:693:5: [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 field_reqmag[STRSIZE]; data/dvi2dvi-2.0alpha/fontdesc.c:694:5: [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 field_submag[STRSIZE]; data/dvi2dvi-2.0alpha/fontdesc.c:707: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). fs->fs_reqmag = atoi(field_reqmag); data/dvi2dvi-2.0alpha/fontdesc.c:708: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). fs->fs_submag = atoi(field_submag); data/dvi2dvi-2.0alpha/fontdesc.c:734:5: [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 field_replfont[STRSIZE]; data/dvi2dvi-2.0alpha/fontdesc.c:735:5: [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 field_font[STRSIZE]; data/dvi2dvi-2.0alpha/fontdesc.c:736:5: [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 field_par[STRSIZE]; data/dvi2dvi-2.0alpha/fontdesc.c:753: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). fr->fr_ds = atoi(field_par)<<16; data/dvi2dvi-2.0alpha/fontdesc.c:762: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). fr->fr_fix = scale_exact(fr->fr_fix, atoi(f+1)); data/dvi2dvi-2.0alpha/fontdesc.c:764: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). fr->fr_fix = atoi(f+1); data/dvi2dvi-2.0alpha/fontdesc.c:789: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 ds_begin[STRSIZE+5]; data/dvi2dvi-2.0alpha/fontdesc.c:790: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 ds_end[STRSIZE+5]; data/dvi2dvi-2.0alpha/fontdesc.c:810:5: [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 field_mode[STRSIZE]; data/dvi2dvi-2.0alpha/fontdesc.c:953:5: [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[32]; data/dvi2dvi-2.0alpha/fontdesc.c:988: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(t = buf, "%d", acca->pv_mag); data/dvi2dvi-2.0alpha/fontdesc.c:991: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(t = buf, "%f", acca->actmagfact); data/dvi2dvi-2.0alpha/fontdesc.c:994: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(t = buf, "%d", resolution); data/dvi2dvi-2.0alpha/fontdesc.c:1000: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(t = buf, "%d", acca->pv_ds); data/dvi2dvi-2.0alpha/fontdesc.c:1022: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 pathk[PATHLEN], pathk0[PATHLEN], base[PATHLEN]; data/dvi2dvi-2.0alpha/kpse.c:94:5: [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 pathname[PATHLEN]; /* dummy */ data/dvi2dvi-2.0alpha/rfset.c:44:5: [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[STRLEN]; data/dvi2dvi-2.0alpha/run.c:28:5: [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 curname[STRSIZE]; /* current file name */ data/dvi2dvi-2.0alpha/run.c:179:12: [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. (void)strcat(curname, ".dvi"); data/dvi2dvi-2.0alpha/run.c:193:8: [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. (void)strcat(G_Logname, ".log"); data/dvi2dvi-2.0alpha/run.c:203:8: [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. (void)strcat(dvifilename, ".dvi"); data/dvi2dvi-2.0alpha/run.c:219:8: [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(G_Logname, "dvi2.log"); data/dvi2dvi-2.0alpha/run.c:231: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). resolution = atoi(argv[++argind]); data/dvi2dvi-2.0alpha/run.c:358: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). G_logfp = fopen(G_Logname, "w+"); data/dvi2dvi-2.0alpha/util.c:57:21: [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 unsigned char buf[sizeof(int)+1]; data/dvi2dvi-2.0alpha/util.c:76:21: [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 unsigned char buf[sizeof(int)+1]; data/dvi2dvi-2.0alpha/util.c:129:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(s, t, len); data/dvi2dvi-2.0alpha/vfset.c:36:5: [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[STRLEN]; data/dvi2dvi-2.0alpha/virfont.c:305: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(dvip, defce->vfd.dvi.where.dviptr, dvilen); data/dvi2dvi-2.0alpha/xxstdio.c:11: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). #undef fopen data/dvi2dvi-2.0alpha/xxstdio.c:113: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 *fp = fopen(filename, type); data/dvi2dvi-2.0alpha/xxstdio.h:21: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). #define fopen xxfopen data/dvi2dvi-2.0alpha/compfont.c:55: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 (strncmp(fe->n, ffcmp->cmp_name, strlen(ffcmp->cmp_name)) == 0) { data/dvi2dvi-2.0alpha/compfont.c:57:38: [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). subpre = (s = getjsubfont(fe->n+strlen(ffcmp->cmp_name), &se)) > 0; data/dvi2dvi-2.0alpha/compfont.c:59:35: [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). subpre = (s = getdcode(fe->n+strlen(ffcmp->cmp_name), &se)) > 0; data/dvi2dvi-2.0alpha/compfont.c:95:40: [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). readfontdef(0, 0, fe->s, fe->d, 0, strlen(fe->name), fe->name, &fontidx); data/dvi2dvi-2.0alpha/compfont.c:189:40: [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). readfontdef(0, 0, fe->s, fe->d, 0, strlen(fe->name), fe->name, &fontidx); data/dvi2dvi-2.0alpha/decompfont.c:52:43: [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 (strncmp(fe->n, ffdcmp->dcmp_name, strlen(ffdcmp->dcmp_name)) == 0) { data/dvi2dvi-2.0alpha/decompfont.c:53: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). if (numstr(fe->n+strlen(ffdcmp->dcmp_name)) ) { data/dvi2dvi-2.0alpha/decompfont.c:93: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). ntail = fe->n+strlen(ffdcmp->dcmp_name); data/dvi2dvi-2.0alpha/decompfont.c:97:37: [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). readfontdef(i, 0, fe->s, fe->d, 0, strlen((char *)n), (char *)n, &fontidx); data/dvi2dvi-2.0alpha/decompfont.c:191: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). ntail = fe->n+strlen(ffdcmp->dcmp_name); data/dvi2dvi-2.0alpha/decompfont.c:196:37: [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). readfontdef(i, 0, fe->s, fe->d, 0, strlen((char *)n), (char *)n, &fontidx); data/dvi2dvi-2.0alpha/execfont.c:48:18: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(f)) != EOF) data/dvi2dvi-2.0alpha/execfont.c:51:18: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(f)) != EOF) data/dvi2dvi-2.0alpha/fontcom.c:51: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). l = strlen(rn); data/dvi2dvi-2.0alpha/fontdesc.c:104:30: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (fdline = 1; (fdch = getc(fdf)) != EOF; fdline++) { data/dvi2dvi-2.0alpha/fontdesc.c:203:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(nld->dir, f, p+1-f); data/dvi2dvi-2.0alpha/fontdesc.c:211:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(nld->dir, f, p+1-f); data/dvi2dvi-2.0alpha/fontdesc.c:263:48: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (; fdch != '\n' && fdch != EOF; fdch = getc(fdf)) data/dvi2dvi-2.0alpha/fontdesc.c:272:64: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (; fdch == ' ' || fdch == '\t' || fdch == '\\'; fdch = getc(fdf)) data/dvi2dvi-2.0alpha/fontdesc.c:274:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((c = getc(fdf)) != '\n') { data/dvi2dvi-2.0alpha/fontdesc.c:297:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fdch = getc(fdf)) { data/dvi2dvi-2.0alpha/fontdesc.c:299:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((c = getc(fdf)) != '\n') { data/dvi2dvi-2.0alpha/fontdesc.c:322:26: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (*field++ = fdch = getc(fdf)) != FDQUO && fdch != EOF; ) { data/dvi2dvi-2.0alpha/fontdesc.c:324:16: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *(field-1) = getc(fdf); data/dvi2dvi-2.0alpha/fontdesc.c:332:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fdch = getc(fdf); data/dvi2dvi-2.0alpha/fontdesc.c:364:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fdch = getc(fdf)) { data/dvi2dvi-2.0alpha/fontdesc.c:366:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((c = getc(fdf)) != '\n') { data/dvi2dvi-2.0alpha/fontdesc.c:643: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 (p+strlen(t) >= pend) data/dvi2dvi-2.0alpha/fontdesc.c:646: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). p += strlen(t); data/dvi2dvi-2.0alpha/fontdesc.c:703: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). fs->fs_len = strlen(field_font); data/dvi2dvi-2.0alpha/fontdesc.c:795: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). len = strlen(ds_buf+off); \ data/dvi2dvi-2.0alpha/fontdesc.c:803:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ds_buf+off+1, (char *) k, n); \ data/dvi2dvi-2.0alpha/fontdesc.c:965: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). len = strlen(t = acca->pv_name); data/dvi2dvi-2.0alpha/fontdesc.c:970:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(buf, t, 4); data/dvi2dvi-2.0alpha/fontdesc.c:971:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(buf+4, l-4, 4); data/dvi2dvi-2.0alpha/fontdesc.c:973:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(buf, t, 8); data/dvi2dvi-2.0alpha/fontdesc.c:977:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(buf, t, l-t); data/dvi2dvi-2.0alpha/fontdesc.c:980:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(b, l, len-(l-t)+1); data/dvi2dvi-2.0alpha/fontdesc.c:1009: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). if (p + (len = strlen(t)) <= pend) { data/dvi2dvi-2.0alpha/fontdesc.c:1010:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(p, t, len); data/dvi2dvi-2.0alpha/fontdesc.c:1034:8: [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. (void)strcat(pathk0, "/"); data/dvi2dvi-2.0alpha/fontdesc.c:1041: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). for (p = pthk+strlen(pthk)-1; p >= pthk; --p) data/dvi2dvi-2.0alpha/funcfont.c:243:35: [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 !strncmp(fe->n, proto, strlen(proto)); data/dvi2dvi-2.0alpha/funcfont.c:256:34: [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 strncmp(fe->n, proto, strlen(proto)); data/dvi2dvi-2.0alpha/io.c:76:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (void)putc(getc(sfp), dfp); data/dvi2dvi-2.0alpha/kanji.c:56: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). if (!strncmp(n, jsf_names[f], strlen(jsf_names[f]))) { data/dvi2dvi-2.0alpha/kanji.c:57:20: [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). *subend = n + strlen(jsf_names[f])-1; data/dvi2dvi-2.0alpha/run.c:212:33: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (; !ferror(stdin) && (ch = getchar()) != EOF; ) data/dvi2dvi-2.0alpha/util.c:127:38: [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 ((t = malloc((unsigned)(len = strlen(s)+1))) == NULL) data/dvi2dvi-2.0alpha/vfdcom.c:66:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(cp, (char *)dc_bufbeg, n); data/dvi2dvi-2.0alpha/xxstdio.c:16:8: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #undef fgetc data/dvi2dvi-2.0alpha/xxstdio.c:173:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = fgetc(fp); data/dvi2dvi-2.0alpha/xxstdio.h:26:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define fgetc xxfgetc ANALYSIS SUMMARY: Hits = 174 Lines analyzed = 7661 in approximately 0.18 seconds (41593 lines/second) Physical Source Lines of Code (SLOC) = 6411 Hits@level = [0] 72 [1] 53 [2] 69 [3] 5 [4] 44 [5] 3 Hits@level+ = [0+] 246 [1+] 174 [2+] 121 [3+] 52 [4+] 47 [5+] 3 Hits/KSLOC@level+ = [0+] 38.3715 [1+] 27.1409 [2+] 18.8738 [3+] 8.11106 [4+] 7.33115 [5+] 0.467946 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.