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/myspell-3.0+pre3.1/affixmgr.cxx Examining data/myspell-3.0+pre3.1/affentry.cxx Examining data/myspell-3.0+pre3.1/myspell.cxx Examining data/myspell-3.0+pre3.1/example.cxx Examining data/myspell-3.0+pre3.1/hashmgr.cxx Examining data/myspell-3.0+pre3.1/munch.c Examining data/myspell-3.0+pre3.1/munch.h Examining data/myspell-3.0+pre3.1/suggestmgr.cxx Examining data/myspell-3.0+pre3.1/unmunch.c Examining data/myspell-3.0+pre3.1/unmunch.h Examining data/myspell-3.0+pre3.1/csutil.cxx Examining data/myspell-3.0+pre3.1/dictmgr.cxx FINAL RESULTS: data/myspell-3.0+pre3.1/affentry.cxx:68: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). strcpy(tword,appnd); data/myspell-3.0+pre3.1/affentry.cxx:72: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). strcpy(pp, (word + stripl)); data/myspell-3.0+pre3.1/affentry.cxx:104:18: [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 (stripl) strcpy (tmpword, strip); data/myspell-3.0+pre3.1/affentry.cxx:105: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 ((tmpword + stripl), (word + appndl)); data/myspell-3.0+pre3.1/affentry.cxx:190: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). strcpy(tword,word); data/myspell-3.0+pre3.1/affentry.cxx:197: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). strcpy(pp,appnd); data/myspell-3.0+pre3.1/affentry.cxx:238: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 (tmpword, word); data/myspell-3.0+pre3.1/affentry.cxx:241: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 ((char *)cp, strip); data/myspell-3.0+pre3.1/affentry.cxx:346:64: [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 we set up a conds array of 256 bytes indexed (0 to 255) and access it data/myspell-3.0+pre3.1/munch.c:128: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(ap,(roots[j].hashent)->affstr); data/myspell-3.0+pre3.1/munch.c:418:24: [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 (aent->stripl) strcpy (tword, aent->strip); data/myspell-3.0+pre3.1/munch.c:419: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((tword + aent->stripl), (word + aent->appndl)); data/myspell-3.0+pre3.1/munch.c:466: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 (tword, word); data/myspell-3.0+pre3.1/munch.c:469: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). strcpy ((char *)cp, aent->strip); data/myspell-3.0+pre3.1/munch.c:672: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). strcpy(tword,aent->appnd); data/myspell-3.0+pre3.1/munch.c:676: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). strcpy(pp, (word + aent->stripl)); data/myspell-3.0+pre3.1/munch.c:714: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). strcpy(tword,word); data/myspell-3.0+pre3.1/munch.c:721: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). strcpy (pp, aent->appnd); data/myspell-3.0+pre3.1/suggestmgr.cxx:160:4: [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(candidate, word); data/myspell-3.0+pre3.1/suggestmgr.cxx:162:4: [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(candidate+(r-word),reptable[i].replacement); data/myspell-3.0+pre3.1/suggestmgr.cxx:163:4: [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(candidate+(r-word)+lenr, r+lenp); data/myspell-3.0+pre3.1/suggestmgr.cxx:189: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 (candidate, word); data/myspell-3.0+pre3.1/suggestmgr.cxx:227:4: [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 (candidate, word + 1); data/myspell-3.0+pre3.1/suggestmgr.cxx:256:4: [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(candidate + 1, word); data/myspell-3.0+pre3.1/suggestmgr.cxx:300:5: [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(candidate + 1, word); data/myspell-3.0+pre3.1/suggestmgr.cxx:333:4: [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(candidate, word); data/myspell-3.0+pre3.1/unmunch.c:345: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). strcpy(tword,aent->appnd); data/myspell-3.0+pre3.1/unmunch.c:349: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). strcpy(pp, (word + aent->stripl)); data/myspell-3.0+pre3.1/unmunch.c:387: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). strcpy(tword,word); data/myspell-3.0+pre3.1/unmunch.c:394: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). strcpy (pp, aent->appnd); data/myspell-3.0+pre3.1/affentry.cxx:55: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 tword[MAXWORDLEN+1]; data/myspell-3.0+pre3.1/affentry.cxx:89: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 tmpword[MAXWORDLEN+1]; data/myspell-3.0+pre3.1/affentry.cxx:179: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 tword[MAXWORDLEN+1]; data/myspell-3.0+pre3.1/affentry.cxx:215: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 tmpword[MAXWORDLEN+1]; data/myspell-3.0+pre3.1/affentry.cxx:296:4: [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 conds[SETSIZE]; // array which encodes the conditions to be met data/myspell-3.0+pre3.1/affixmgr.cxx:117: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 line[MAXLNLEN+1]; data/myspell-3.0+pre3.1/affixmgr.cxx:124: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). afflst = fopen(affpath,"r"); data/myspell-3.0+pre3.1/affixmgr.cxx:520: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 mbr[MAXLNLEN]; data/myspell-3.0+pre3.1/affixmgr.cxx:992: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 1: { cpdmin = atoi(piece); np++; break; } data/myspell-3.0+pre3.1/affixmgr.cxx:1024: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). numrep = atoi(piece); data/myspell-3.0+pre3.1/affixmgr.cxx:1099: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). nummap = atoi(piece); data/myspell-3.0+pre3.1/affixmgr.cxx:1191: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). numents = atoi(piece); data/myspell-3.0+pre3.1/csutil.cxx:25: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. memcpy(rv,mp,nc); data/myspell-3.0+pre3.1/csutil.cxx:30:8: [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(rv, mp, n); data/myspell-3.0+pre3.1/csutil.cxx:47:13: [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 (d) memcpy(d,s,((sl+1)*sizeof(char))); data/myspell-3.0+pre3.1/csutil.cxx:143: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(d,p,(strlen(p)+1)); data/myspell-3.0+pre3.1/dictmgr.cxx:67: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 line[MAXDICTENTRYLEN+1]; data/myspell-3.0+pre3.1/dictmgr.cxx:72: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). dictlst = fopen(dictpath,"r"); data/myspell-3.0+pre3.1/example.cxx:49: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). wtclst = fopen(wtc,"r"); data/myspell-3.0+pre3.1/example.cxx:60: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[101]; data/myspell-3.0+pre3.1/hashmgr.cxx:150: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 * rawdict = fopen(tpath, "r"); data/myspell-3.0+pre3.1/hashmgr.cxx:154: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 ts[MAXDELEN]; data/myspell-3.0+pre3.1/hashmgr.cxx:157: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). tablesize = atoi(ts); data/myspell-3.0+pre3.1/munch.c:30: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 as[(MAX_PREFIXES + MAX_SUFFIXES)]; data/myspell-3.0+pre3.1/munch.c:57: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). afflst = fopen(af,"r"); data/myspell-3.0+pre3.1/munch.c:77: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). wrdlst = fopen(wf,"r"); data/myspell-3.0+pre3.1/munch.c:232: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). case 3: { numents = atoi(piece); data/myspell-3.0+pre3.1/munch.c:322: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 mbr[MAX_WD_LEN]; data/myspell-3.0+pre3.1/munch.c:408: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 tword[MAX_WD_LEN]; data/myspell-3.0+pre3.1/munch.c:454: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 tword[MAX_WD_LEN]; data/myspell-3.0+pre3.1/munch.c:576: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 ts[MAX_LN_LEN]; data/myspell-3.0+pre3.1/munch.c:581: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). tablesize = atoi(ts); data/myspell-3.0+pre3.1/munch.c:636: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(tmp,ep->affstr,(al+1)); data/myspell-3.0+pre3.1/munch.c:654: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 tword[MAX_WD_LEN]; data/myspell-3.0+pre3.1/munch.c:698: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 tword[MAX_WD_LEN]; data/myspell-3.0+pre3.1/munch.c:793: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(rv,mp,nc); data/myspell-3.0+pre3.1/munch.c:798: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(rv, mp, n); data/myspell-3.0+pre3.1/munch.c:814:12: [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 (d) memcpy(d,s,((sl+1)*sizeof(char))); data/myspell-3.0+pre3.1/munch.h:30: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 conds[SET_SIZE]; data/myspell-3.0+pre3.1/myspell.cxx:120: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 cw[MAXWORDLEN+1]; data/myspell-3.0+pre3.1/myspell.cxx:121: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 wspace[MAXWORDLEN+1]; data/myspell-3.0+pre3.1/myspell.cxx:135:12: [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(wspace,cw,wl); data/myspell-3.0+pre3.1/myspell.cxx:144:22: [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(wspace,cw,(wl+1)); data/myspell-3.0+pre3.1/myspell.cxx:153:12: [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(wspace,cw,wl); data/myspell-3.0+pre3.1/myspell.cxx:161:22: [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(wspace,cw,(wl+1)); data/myspell-3.0+pre3.1/myspell.cxx:166:12: [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(wspace,cw,wl); data/myspell-3.0+pre3.1/myspell.cxx:204: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 cw[MAXWORDLEN+1]; data/myspell-3.0+pre3.1/myspell.cxx:205: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 wspace[MAXWORDLEN+1]; data/myspell-3.0+pre3.1/myspell.cxx:226:22: [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(wspace,cw,(wl+1)); data/myspell-3.0+pre3.1/myspell.cxx:240: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. memcpy(wspace,cw,(wl+1)); data/myspell-3.0+pre3.1/myspell.cxx:248:22: [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(wspace,cw,(wl+1)); data/myspell-3.0+pre3.1/suggestmgr.cxx:142: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 candidate[MAXSWL]; data/myspell-3.0+pre3.1/suggestmgr.cxx:185: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 candidate[MAXSWL]; data/myspell-3.0+pre3.1/suggestmgr.cxx:218:4: [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 candidate[MAXSWL]; data/myspell-3.0+pre3.1/suggestmgr.cxx:248:4: [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 candidate[MAXSWL]; data/myspell-3.0+pre3.1/suggestmgr.cxx:295: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 candidate[MAXSWL]; data/myspell-3.0+pre3.1/suggestmgr.cxx:325:4: [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 candidate[MAXSWL]; data/myspell-3.0+pre3.1/suggestmgr.cxx:413: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 * guess[MAX_GUESS]; data/myspell-3.0+pre3.1/unmunch.c:33: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 ts[MAX_LN_LEN]; data/myspell-3.0+pre3.1/unmunch.c:54: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). afflst = fopen(af,"r"); data/myspell-3.0+pre3.1/unmunch.c:74: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). wrdlst = fopen(wf,"r"); data/myspell-3.0+pre3.1/unmunch.c:151: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). case 3: { numents = atoi(piece); data/myspell-3.0+pre3.1/unmunch.c:241: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 mbr[MAX_WD_LEN]; data/myspell-3.0+pre3.1/unmunch.c:327: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 tword[MAX_WD_LEN]; data/myspell-3.0+pre3.1/unmunch.c:371: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 tword[MAX_WD_LEN]; data/myspell-3.0+pre3.1/unmunch.c:465: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(rv,mp,nc); data/myspell-3.0+pre3.1/unmunch.c:470: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(rv, mp, n); data/myspell-3.0+pre3.1/unmunch.c:486:12: [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 (d) memcpy(d,s,((sl+1)*sizeof(char))); data/myspell-3.0+pre3.1/unmunch.h:29: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 conds[SET_SIZE]; data/myspell-3.0+pre3.1/affentry.cxx:368:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (read that only 8 character positions) can be examined at one data/myspell-3.0+pre3.1/affixmgr.cxx:254: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). if (strlen(key) == 0) { data/myspell-3.0+pre3.1/affixmgr.cxx:322: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). if (strlen(key) == 0) { data/myspell-3.0+pre3.1/affixmgr.cxx:526: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). int nc = strlen(cs); data/myspell-3.0+pre3.1/affixmgr.cxx:672: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). rv = affix_check((word+i),strlen(word+i)); data/myspell-3.0+pre3.1/affixmgr.cxx:677: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). rv = compound_check((word+i),strlen(word+i),compound_flag); data/myspell-3.0+pre3.1/affixmgr.cxx:786:23: [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 l1 = strlen(wlst[j].word); data/myspell-3.0+pre3.1/affixmgr.cxx:1141:33: [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). maptable[j].len = strlen(maptable[j].set); data/myspell-3.0+pre3.1/affixmgr.cxx:1251:42: [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). nptr->stripl = strlen(nptr->strip); data/myspell-3.0+pre3.1/affixmgr.cxx:1264:42: [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). nptr->appndl = strlen(nptr->appnd); data/myspell-3.0+pre3.1/csutil.cxx:18: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 n = strlen(mp); data/myspell-3.0+pre3.1/csutil.cxx:45: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 sl = strlen(s); data/myspell-3.0+pre3.1/csutil.cxx:56: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 k = strlen(s); data/myspell-3.0+pre3.1/csutil.cxx:67: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). int sl = strlen(s); data/myspell-3.0+pre3.1/csutil.cxx:83: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). int l1 = strlen(s1); data/myspell-3.0+pre3.1/csutil.cxx:84: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). int l2 = strlen(s2); data/myspell-3.0+pre3.1/csutil.cxx:143: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). memcpy(d,p,(strlen(p)+1)); data/myspell-3.0+pre3.1/example.cxx:63: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). k = strlen(buf); data/myspell-3.0+pre3.1/hashmgr.cxx:176: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). al = strlen(ap); data/myspell-3.0+pre3.1/hashmgr.cxx:182: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). wl = strlen(ts); data/myspell-3.0+pre3.1/munch.c:94:24: [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). aff_chk(ep->word,strlen(ep->word)); data/myspell-3.0+pre3.1/munch.c:121: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). nwl = strlen(nword); data/myspell-3.0+pre3.1/munch.c:132: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). al =strlen(as); data/myspell-3.0+pre3.1/munch.c:263:49: [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). nptr->stripl = strlen(nptr->strip); data/myspell-3.0+pre3.1/munch.c:272:49: [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). nptr->appndl = strlen(nptr->appnd); data/myspell-3.0+pre3.1/munch.c:328: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). nc = strlen(cs); data/myspell-3.0+pre3.1/munch.c:513: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). nwl = strlen(nword); data/myspell-3.0+pre3.1/munch.c:632: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). al = strlen(ep->affstr); data/myspell-3.0+pre3.1/munch.c:758:26: [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). nwl = strlen(wlist[j].word); data/myspell-3.0+pre3.1/munch.c:785: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 n = strlen(mp); data/myspell-3.0+pre3.1/munch.c:812: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 sl = strlen(s); data/myspell-3.0+pre3.1/munch.c:822: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 k = strlen(s); data/myspell-3.0+pre3.1/myspell.cxx:75: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 nl = strlen((const char *)q); data/myspell-3.0+pre3.1/myspell.cxx:123: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). int wl = strlen(word); data/myspell-3.0+pre3.1/myspell.cxx:187:36: [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). he = pAMgr->affix_check(word, strlen(word)); data/myspell-3.0+pre3.1/myspell.cxx:191:44: [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). he = pAMgr->compound_check(word, strlen(word), (pAMgr->get_compound())[0]); data/myspell-3.0+pre3.1/myspell.cxx:207: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). int wl = strlen(word); data/myspell-3.0+pre3.1/suggestmgr.cxx:27: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). ctryl = strlen(ctry); data/myspell-3.0+pre3.1/suggestmgr.cxx:90: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). int wl = strlen(word); data/myspell-3.0+pre3.1/suggestmgr.cxx:108: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 ((cwrd) && check(word,strlen(word))) { data/myspell-3.0+pre3.1/suggestmgr.cxx:147: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). int wl = strlen(word); data/myspell-3.0+pre3.1/suggestmgr.cxx:156: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). lenr = strlen(reptable[i].replacement); data/myspell-3.0+pre3.1/suggestmgr.cxx:157: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). lenp = strlen(reptable[i].pattern); data/myspell-3.0+pre3.1/suggestmgr.cxx:161:24: [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 (r-word + lenr + strlen(r+lenp) >= MAXSWL) break; data/myspell-3.0+pre3.1/suggestmgr.cxx:167: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 ((cwrd) && check(candidate,strlen(candidate))) { data/myspell-3.0+pre3.1/suggestmgr.cxx:187: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). int wl = strlen(word); data/myspell-3.0+pre3.1/suggestmgr.cxx:223: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 wl = strlen(word); data/myspell-3.0+pre3.1/suggestmgr.cxx:253: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 wl = strlen(word); data/myspell-3.0+pre3.1/suggestmgr.cxx:298: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). int wl=strlen(word); data/myspell-3.0+pre3.1/suggestmgr.cxx:307:28: [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 (check(candidate,strlen(candidate))) { data/myspell-3.0+pre3.1/suggestmgr.cxx:308: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 (check((p+1),strlen(p+1))) { data/myspell-3.0+pre3.1/suggestmgr.cxx:330: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 wl = strlen(word); data/myspell-3.0+pre3.1/suggestmgr.cxx:377: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 n = strlen(word); data/myspell-3.0+pre3.1/suggestmgr.cxx:497: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). int l1 = strlen(s1); data/myspell-3.0+pre3.1/suggestmgr.cxx:498: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). int l2 = strlen(s2); data/myspell-3.0+pre3.1/unmunch.c:91: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). al = strlen(ap); data/myspell-3.0+pre3.1/unmunch.c:97: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). wl = strlen(ts); data/myspell-3.0+pre3.1/unmunch.c:182:49: [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). nptr->stripl = strlen(nptr->strip); data/myspell-3.0+pre3.1/unmunch.c:191:49: [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). nptr->appndl = strlen(nptr->appnd); data/myspell-3.0+pre3.1/unmunch.c:247: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). nc = strlen(cs); data/myspell-3.0+pre3.1/unmunch.c:431:26: [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). nwl = strlen(wlist[j].word); data/myspell-3.0+pre3.1/unmunch.c:457: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 n = strlen(mp); data/myspell-3.0+pre3.1/unmunch.c:484: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 sl = strlen(s); data/myspell-3.0+pre3.1/unmunch.c:494: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 k = strlen(s); ANALYSIS SUMMARY: Hits = 163 Lines analyzed = 8361 in approximately 0.25 seconds (33695 lines/second) Physical Source Lines of Code (SLOC) = 7161 Hits@level = [0] 67 [1] 64 [2] 69 [3] 0 [4] 30 [5] 0 Hits@level+ = [0+] 230 [1+] 163 [2+] 99 [3+] 30 [4+] 30 [5+] 0 Hits/KSLOC@level+ = [0+] 32.1184 [1+] 22.7622 [2+] 13.8249 [3+] 4.18936 [4+] 4.18936 [5+] 0 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.