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/latex-cjk-japanese-wadalab-0.20050817/wftodm.c FINAL RESULTS: data/latex-cjk-japanese-wadalab-0.20050817/wftodm.c:157:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fontname,"%s%s",FontBase,jsf_names[i]); data/latex-cjk-japanese-wadalab-0.20050817/wftodm.c:169:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename,"%s.afm",fontname); data/latex-cjk-japanese-wadalab-0.20050817/wftodm.c:237:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename,"%s.pfa",fontname); data/latex-cjk-japanese-wadalab-0.20050817/wftodm.c:307:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf,form,i0,i1,i2,i3,i4,i5,i6,i7,i8,i9); data/latex-cjk-japanese-wadalab-0.20050817/wftodm.c:6: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 *charstrs[34][256]; data/latex-cjk-japanese-wadalab-0.20050817/wftodm.c:14: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 fontname[256]; data/latex-cjk-japanese-wadalab-0.20050817/wftodm.c:103: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 buf[4096],*cptr; data/latex-cjk-japanese-wadalab-0.20050817/wftodm.c:107:10: [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(filename,"r"))==NULL){ data/latex-cjk-japanese-wadalab-0.20050817/wftodm.c:167: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 filename[256]; data/latex-cjk-japanese-wadalab-0.20050817/wftodm.c:170: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). if((ofp=fopen(filename,"w"))==NULL){ data/latex-cjk-japanese-wadalab-0.20050817/wftodm.c:235: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 filename[256]; data/latex-cjk-japanese-wadalab-0.20050817/wftodm.c:238: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). if((ofp=fopen(filename,"w"))==NULL){ data/latex-cjk-japanese-wadalab-0.20050817/wftodm.c:306:12: [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. unsigned char buf[4096]; data/latex-cjk-japanese-wadalab-0.20050817/wftodm.c:112: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(buf); data/latex-cjk-japanese-wadalab-0.20050817/wftodm.c:308: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). len=strlen(buf); ANALYSIS SUMMARY: Hits = 15 Lines analyzed = 335 in approximately 0.10 seconds (3203 lines/second) Physical Source Lines of Code (SLOC) = 321 Hits@level = [0] 57 [1] 2 [2] 9 [3] 0 [4] 4 [5] 0 Hits@level+ = [0+] 72 [1+] 15 [2+] 13 [3+] 4 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 224.299 [1+] 46.729 [2+] 40.4984 [3+] 12.4611 [4+] 12.4611 [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.