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/itcl4-4.2.0/generic/itclMigrate2TclCore.c Examining data/itcl4-4.2.0/generic/itclUtil.c Examining data/itcl4-4.2.0/generic/itclInfo.c Examining data/itcl4-4.2.0/generic/itclCmd.c Examining data/itcl4-4.2.0/generic/itclDecls.h Examining data/itcl4-4.2.0/generic/itclBuiltin.c Examining data/itcl4-4.2.0/generic/itclResolve.c Examining data/itcl4-4.2.0/generic/itcl2TclOO.h Examining data/itcl4-4.2.0/generic/itclTestRegisterC.c Examining data/itcl4-4.2.0/generic/itclObject.c Examining data/itcl4-4.2.0/generic/itclLinkage.c Examining data/itcl4-4.2.0/generic/itclMethod.c Examining data/itcl4-4.2.0/generic/itcl.h Examining data/itcl4-4.2.0/generic/itclTclIntStubsFcn.c Examining data/itcl4-4.2.0/generic/itclStubs.c Examining data/itcl4-4.2.0/generic/itclStubLib.c Examining data/itcl4-4.2.0/generic/itclBase.c Examining data/itcl4-4.2.0/generic/itclEnsemble.c Examining data/itcl4-4.2.0/generic/itclTclIntStubsFcn.h Examining data/itcl4-4.2.0/generic/itclInt.h Examining data/itcl4-4.2.0/generic/itclParse.c Examining data/itcl4-4.2.0/generic/itclStubInit.c Examining data/itcl4-4.2.0/generic/itclClass.c Examining data/itcl4-4.2.0/generic/itclMigrate2TclCore.h Examining data/itcl4-4.2.0/generic/itclIntDecls.h Examining data/itcl4-4.2.0/generic/itcl2TclOO.c Examining data/itcl4-4.2.0/generic/itclHelpers.c Examining data/itcl4-4.2.0/win/nmakehlp.c Examining data/itcl4-4.2.0/win/dllEntryPoint.c FINAL RESULTS: data/itcl4-4.2.0/generic/itclBuiltin.c:1141: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(cmd1, Tcl_GetString(cObjv[idx])); data/itcl4-4.2.0/generic/itclEnsemble.c:943: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(ensPart->usage, usageInfo); data/itcl4-4.2.0/generic/itclEnsemble.c:1205: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(ensPart->name, partName); data/itcl4-4.2.0/generic/itclUtil.c:1061: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(cmdName, name); data/itcl4-4.2.0/generic/itclUtil.c:1088:25: [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(cmdName, listv[3]); data/itcl4-4.2.0/win/nmakehlp.c:38:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/itcl4-4.2.0/win/nmakehlp.c:38:20: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/itcl4-4.2.0/win/nmakehlp.c:255:5: [4] (buffer) lstrcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). lstrcat(cmdline, option); data/itcl4-4.2.0/win/nmakehlp.c:393:2: [4] (buffer) lstrcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). lstrcat(cmdline, options[i]); data/itcl4-4.2.0/win/nmakehlp.c:682:6: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(szBuffer); data/itcl4-4.2.0/generic/itclBase.c:280:18: [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. res_option = getenv("ITCL_USE_OLD_RESOLVERS"); data/itcl4-4.2.0/win/nmakehlp.c:263:10: [3] (shell) CreateProcess: This causes a new process to execute and is difficult to use safely (CWE-78). Specify the application path in the first argument, NOT as part of the second, or embedded spaces could allow an attacker to force a different program to run. ok = CreateProcess( data/itcl4-4.2.0/win/nmakehlp.c:263:10: [3] (shell) CreateProcess: This causes a new process to execute and is difficult to use safely (CWE-78). Specify the application path in the first argument, NOT as part of the second, or embedded spaces could allow an attacker to force a different program to run. ok = CreateProcess( data/itcl4-4.2.0/win/nmakehlp.c:397:10: [3] (shell) CreateProcess: This causes a new process to execute and is difficult to use safely (CWE-78). Specify the application path in the first argument, NOT as part of the second, or embedded spaces could allow an attacker to force a different program to run. ok = CreateProcess( data/itcl4-4.2.0/win/nmakehlp.c:397:10: [3] (shell) CreateProcess: This causes a new process to execute and is difficult to use safely (CWE-78). Specify the application path in the first argument, NOT as part of the second, or embedded spaces could allow an attacker to force a different program to run. ok = CreateProcess( data/itcl4-4.2.0/generic/itclBase.c:284:8: [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). opt = atoi(res_option); data/itcl4-4.2.0/generic/itclBuiltin.c:639:15: [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 *) objv[1]); data/itcl4-4.2.0/generic/itclBuiltin.c:1140:13: [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. cmd1 = (char *)ckalloc(strlen(Tcl_GetString(cObjv[idx]))+1); data/itcl4-4.2.0/generic/itclBuiltin.c:1264:58: [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. hPtr = Tcl_FindHashEntry(&iclsPtr->resolveCmds, (char *)objv[1]); data/itcl4-4.2.0/generic/itclBuiltin.c:1286:5: [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(newObjv+3, objv+offset, (objc-offset) * sizeof(Tcl_Obj *)); data/itcl4-4.2.0/generic/itclBuiltin.c:1372:58: [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. hPtr = Tcl_FindHashEntry(&iclsPtr->resolveCmds, (char *)objv[1]); data/itcl4-4.2.0/generic/itclBuiltin.c:1389: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(newObjv+1, objv+1, sizeof(Tcl_Obj *) * (objc-1)); data/itcl4-4.2.0/generic/itclBuiltin.c:1425:58: [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. hPtr = Tcl_FindHashEntry(&iclsPtr->delegatedFunctions, (char *)objv[1]); data/itcl4-4.2.0/generic/itclBuiltin.c:1439:58: [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. hPtr2 = Tcl_FindHashEntry(&starIdmPtr->exceptions, (char *)objv[1]); data/itcl4-4.2.0/generic/itclBuiltin.c:1528:17: [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(newObjv+useComponent+lObjc, objv+offset, data/itcl4-4.2.0/generic/itclBuiltin.c:1537: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. (char *)newObjv[1]) == NULL) { data/itcl4-4.2.0/generic/itclBuiltin.c:1549:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (char *)newObjv[1], &isNew); data/itcl4-4.2.0/generic/itclBuiltin.c:1656: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(newObjv+1, objv+1, sizeof(Tcl_Obj *) * (objc-1)); data/itcl4-4.2.0/generic/itclBuiltin.c:1688:61: [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. hPtr = Tcl_FindHashEntry(&iclsPtr->delegatedFunctions, (char *)objv[1]); data/itcl4-4.2.0/generic/itclBuiltin.c:1705:57: [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. hPtr2 = Tcl_FindHashEntry(&idmPtr->exceptions, (char *)objv[1]); data/itcl4-4.2.0/generic/itclBuiltin.c:1761:56: [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. hPtr = Tcl_FindHashEntry(&idmPtr->exceptions, (char *)objv[1]); data/itcl4-4.2.0/generic/itclBuiltin.c:1825: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(newObjv+useComponent+lObjc, objv+offset, data/itcl4-4.2.0/generic/itclBuiltin.c:1834:11: [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 *)newObjv[1]) == NULL) { data/itcl4-4.2.0/generic/itclBuiltin.c:1845:42: [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. &iclsPtr->delegatedFunctions, (char *)newObjv[1], data/itcl4-4.2.0/generic/itclBuiltin.c:2138:17: [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 *)lObjv2[0]); data/itcl4-4.2.0/generic/itclBuiltin.c:2186:35: [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 *)lObjv3[0], &isNew); data/itcl4-4.2.0/generic/itclBuiltin.c:2210:70: [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. hPtr = Tcl_FindHashEntry(&contextIoPtr->objectDelegatedOptions, (char *) data/itcl4-4.2.0/generic/itclBuiltin.c:2223:54: [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. hPtr2 = Tcl_FindHashEntry(&idoPtr->exceptions, (char *)objv[1]); data/itcl4-4.2.0/generic/itclBuiltin.c:2234:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (char *)objv[1]); data/itcl4-4.2.0/generic/itclBuiltin.c:2240:58: [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. hPtr3 = Tcl_FindHashEntry(&icPtr->keptOptions, (char *)objv[1]); data/itcl4-4.2.0/generic/itclBuiltin.c:2251:13: [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 *)objv[1]) != NULL) { data/itcl4-4.2.0/generic/itclBuiltin.c:2330:15: [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 *) objv[1]); data/itcl4-4.2.0/generic/itclBuiltin.c:2333:19: [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 *) objv[1]); data/itcl4-4.2.0/generic/itclBuiltin.c:2375:11: [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 *) objv[i]); data/itcl4-4.2.0/generic/itclBuiltin.c:2395:15: [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 *) objv[i]); data/itcl4-4.2.0/generic/itclBuiltin.c:2695:70: [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. hPtr = Tcl_FindHashEntry(&contextIoPtr->objectDelegatedOptions, (char *) data/itcl4-4.2.0/generic/itclBuiltin.c:2697:62: [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. hPtr3 = Tcl_FindHashEntry(&contextIoPtr->objectOptions, (char *) data/itcl4-4.2.0/generic/itclBuiltin.c:2706:66: [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. hPtr2 = Tcl_FindHashEntry(&contextIoPtr->objectOptions, (char *) data/itcl4-4.2.0/generic/itclBuiltin.c:2713:56: [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. hPtr = Tcl_FindHashEntry(&idoPtr->exceptions, (char *) data/itcl4-4.2.0/generic/itclBuiltin.c:2886:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (char *) objv[1]); data/itcl4-4.2.0/generic/itclBuiltin.c:3006:60: [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. hPtr = Tcl_FindHashEntry(&contextIclsPtr->components, (char *)objv[1]); data/itcl4-4.2.0/generic/itclBuiltin.c:3040: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(newObjv, objv + 3, sizeof(Tcl_Obj *) * ((objc - 3))); data/itcl4-4.2.0/generic/itclBuiltin.c:3061: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(newObjv, objv + 1, sizeof(Tcl_Obj *) * ((objc - 1))); data/itcl4-4.2.0/generic/itclBuiltin.c:3121: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(newObjv + 3, objv + 1, sizeof(Tcl_Obj *) * (objc - 1)); data/itcl4-4.2.0/generic/itclBuiltin.c:3207:5: [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(newObjv + 1, objv + 2, sizeof(Tcl_Obj *) * (objc - 2)); data/itcl4-4.2.0/generic/itclBuiltin.c:3274:5: [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(newObjv + 1, objv + 2, sizeof(Tcl_Obj *) * (objc - 2)); data/itcl4-4.2.0/generic/itclBuiltin.c:3776:61: [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. hPtr = Tcl_FindHashEntry(&ioPtr->objectComponents, (char *)objv[1]); data/itcl4-4.2.0/generic/itclBuiltin.c:3786:55: [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. hPtr = Tcl_CreateHashEntry(&icPtr->keptOptions, (char *)objv[idx], data/itcl4-4.2.0/generic/itclBuiltin.c:3792:15: [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 *)objv[idx], &isNew); data/itcl4-4.2.0/generic/itclClass.c:146:31: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *path = (const char *)data[1]; data/itcl4-4.2.0/generic/itclClass.c:1476: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 unique[256]; /* buffer used for unique part of object names */ data/itcl4-4.2.0/generic/itclClass.c:1498:54: [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. hPtr = Tcl_FindHashEntry(&infoPtr->nameClasses, (char *)objv[2]); data/itcl4-4.2.0/generic/itclClass.c:1553:21: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(unique,"%.200s%d", Tcl_GetString(iclsPtr->namePtr), data/itcl4-4.2.0/generic/itclCmd.c:105:54: [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. hPtr = Tcl_FindHashEntry(&iclsPtr->resolveCmds, (char *)objv[1]); data/itcl4-4.2.0/generic/itclCmd.c:115:25: [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(newObjv+1, objv+2, sizeof(Tcl_Obj *) * data/itcl4-4.2.0/generic/itclCmd.c:136:21: [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(newObjv+2, objv+1, sizeof(Tcl_Obj *) * (objc -1)); data/itcl4-4.2.0/generic/itclCmd.c:1200:5: [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(newObjv+3, objv+2, sizeof(Tcl_Obj *)*(objc-2)); data/itcl4-4.2.0/generic/itclCmd.c:1265:58: [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. hPtr = Tcl_FindHashEntry(&infoPtr->nameClasses, (char *)objv[1]); data/itcl4-4.2.0/generic/itclCmd.c:1337:5: [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(newObjv+3, objv+2, sizeof(Tcl_Obj *)*(objc-2)); data/itcl4-4.2.0/generic/itclCmd.c:1438:54: [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. hPtr = Tcl_FindHashEntry(&infoPtr->nameClasses, (char *)objv[1]); data/itcl4-4.2.0/generic/itclCmd.c:1758:66: [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. hPtr = Tcl_CreateHashEntry(&contextIoPtr->objectComponents, (char *)objv[2], data/itcl4-4.2.0/generic/itclCmd.c:1780:59: [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. hPtr = Tcl_FindHashEntry(&contextIclsPtr->variables, (char *)objv[2]); data/itcl4-4.2.0/generic/itclCmd.c:1919:64: [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. hPtr = Tcl_FindHashEntry(&contextIclsPtr->components, (char *)objv[2]); data/itcl4-4.2.0/generic/itclEnsemble.c:767: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[20]; data/itcl4-4.2.0/generic/itclEnsemble.c:789:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", ensData->ensembleId); data/itcl4-4.2.0/generic/itclEnsemble.c:843:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", parentEnsData->ensembleId); data/itcl4-4.2.0/generic/itclEnsemble.c:1190: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(partList, ensData->parts, (size_t)size); data/itcl4-4.2.0/generic/itclHelpers.c:131:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_INTEGER_SPACE]; data/itcl4-4.2.0/generic/itclHelpers.c:132:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", i); data/itcl4-4.2.0/generic/itclHelpers.c:343: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(newObjv+1, objv+1, sizeof(Tcl_Obj *) * (objc-1)); data/itcl4-4.2.0/generic/itclHelpers.c:364: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[2]; data/itcl4-4.2.0/generic/itclHelpers.c:366:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%c", toupper(UCHAR(*str))); data/itcl4-4.2.0/generic/itclInfo.c:1653: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(newObjv+1, objv+1, sizeof(Tcl_Obj *)*(objc-1)); data/itcl4-4.2.0/generic/itclInfo.c:1881:61: [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. hPtr = Tcl_FindHashEntry(&contextIclsPtr->resolveCmds, (char *)objv[1]); data/itcl4-4.2.0/generic/itclInfo.c:1901:15: [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 *)objv[1]); data/itcl4-4.2.0/generic/itclInfo.c:1983:61: [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. hPtr = Tcl_FindHashEntry(&contextIclsPtr->resolveCmds, (char *)objv[1]); data/itcl4-4.2.0/generic/itclInfo.c:2004: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 *)objv[1]); data/itcl4-4.2.0/generic/itclMethod.c:2028: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(newObjv + 2, objv, (objc * sizeof(Tcl_Obj *))); data/itcl4-4.2.0/generic/itclMethod.c:2597: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 num[20]; data/itcl4-4.2.0/generic/itclMethod.c:2702:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(num, "%d", lineNo); data/itcl4-4.2.0/generic/itclObject.c:220: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 unique[256]; /* buffer used for unique part of object names */ data/itcl4-4.2.0/generic/itclObject.c:381: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(newObjv + 5, objv, (objc * sizeof(Tcl_Obj *))); data/itcl4-4.2.0/generic/itclObject.c:407:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(unique,"%.200s_%d", name, iclsPtr->unique++); data/itcl4-4.2.0/generic/itclObject.c:2889: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(newObjv+incr+1, objv+1, (sizeof(Tcl_Obj*)*(objc-1))); data/itcl4-4.2.0/generic/itclObject.c:3021:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[20]; data/itcl4-4.2.0/generic/itclObject.c:3022:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "%p", iclsPtr); data/itcl4-4.2.0/generic/itclObject.c:3029:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[20]; data/itcl4-4.2.0/generic/itclObject.c:3030:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "%p", ioPtr->iclsPtr); data/itcl4-4.2.0/generic/itclObject.c:3318: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 buf[2]; data/itcl4-4.2.0/generic/itclObject.c:3320:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%c", *(ep+1)); data/itcl4-4.2.0/generic/itclParse.c:566:53: [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. hPtr = Tcl_FindHashEntry(&infoPtr->classTypes, (char *)objv[1]); data/itcl4-4.2.0/generic/itclParse.c:1668:49: [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. if (Tcl_FindHashEntry(&iclsPtr->functions, (char *)objv[0])) { data/itcl4-4.2.0/generic/itclParse.c:1790:61: [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. hPtr = Tcl_FindHashEntry(&iclsPtr->delegatedFunctions, (char *)objv[1]); data/itcl4-4.2.0/generic/itclParse.c:2455:5: [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(newObjv+3, objv+1, sizeof(Tcl_Obj *)*(objc-1)); data/itcl4-4.2.0/generic/itclParse.c:2638:63: [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. hPtr = Tcl_FindHashEntry(&iclsPtr->delegatedOptions, (char *)objv[1]); data/itcl4-4.2.0/generic/itclParse.c:2649:11: [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 *)objv[1]); data/itcl4-4.2.0/generic/itclResolve.c:427: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 storage[64]; data/itcl4-4.2.0/generic/itclResolve.c:445:5: [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((void*)buffer, (void*)name, (size_t)length); data/itcl4-4.2.0/generic/itclUtil.c:142: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. memcpy((char*)newStack, (char*)stack->values, data/itcl4-4.2.0/generic/itclUtil.c:1087:36: [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. cmdName = (char *)ckalloc(strlen(listv[3])+1); data/itcl4-4.2.0/win/nmakehlp.c:59: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 buffer[STATICBUFFERSIZE]; data/itcl4-4.2.0/win/nmakehlp.c:74: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 msg[300]; data/itcl4-4.2.0/win/nmakehlp.c:206: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 msg[300]; data/itcl4-4.2.0/win/nmakehlp.c:209: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 cmdline[100]; data/itcl4-4.2.0/win/nmakehlp.c:249:5: [2] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. lstrcpy(cmdline, "cl.exe -nologo -c -TC -Zs -X -Fp.\\_junk.pch "); data/itcl4-4.2.0/win/nmakehlp.c:261:5: [2] (buffer) lstrcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. lstrcat(cmdline, " .\\nul"); data/itcl4-4.2.0/win/nmakehlp.c:341: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 msg[300]; data/itcl4-4.2.0/win/nmakehlp.c:345: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 cmdline[255]; data/itcl4-4.2.0/win/nmakehlp.c:385:5: [2] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. lstrcpy(cmdline, "link.exe -nologo "); data/itcl4-4.2.0/win/nmakehlp.c:392:2: [2] (buffer) lstrcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. lstrcat(cmdline, " \""); data/itcl4-4.2.0/win/nmakehlp.c:512: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. static char szBuffer[100]; data/itcl4-4.2.0/win/nmakehlp.c:514: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, "rt"); data/itcl4-4.2.0/win/nmakehlp.c:545: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(szBuffer, p, q - p); data/itcl4-4.2.0/win/nmakehlp.c:620: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. static char szBuffer[1024], szCopy[1024]; data/itcl4-4.2.0/win/nmakehlp.c:625: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). fp = fopen(filename, "rt"); data/itcl4-4.2.0/win/nmakehlp.c:632:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). sp = fopen(substitutions, "rt"); data/itcl4-4.2.0/win/nmakehlp.c:679: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(szBuffer, szCopy, sizeof(szCopy)); data/itcl4-4.2.0/win/nmakehlp.c:703: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 szCwd[MAX_PATH + 1]; data/itcl4-4.2.0/win/nmakehlp.c:704: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 szTmp[MAX_PATH + 1]; data/itcl4-4.2.0/win/nmakehlp.c:726: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[MAX_PATH+1]; data/itcl4-4.2.0/generic/itclBase.c:515: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). assert( strlen(Tcl_GetString(objv[1])) == 0); data/itcl4-4.2.0/generic/itclBuiltin.c:1140: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). cmd1 = (char *)ckalloc(strlen(Tcl_GetString(cObjv[idx]))+1); data/itcl4-4.2.0/generic/itclBuiltin.c:1385: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 ((val != NULL) && (strlen(val) > 0)) { data/itcl4-4.2.0/generic/itclBuiltin.c:1449: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). if (strlen(sep) > 0) { data/itcl4-4.2.0/generic/itclBuiltin.c:1511: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 ((val == NULL) || (strlen(val) == 0)) { data/itcl4-4.2.0/generic/itclBuiltin.c:1570:31: [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). resStr += strlen(val); data/itcl4-4.2.0/generic/itclBuiltin.c:1651: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 ((val != NULL) && (strlen(val) > 0)) { data/itcl4-4.2.0/generic/itclBuiltin.c:1715:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(sep) > 0) { data/itcl4-4.2.0/generic/itclBuiltin.c:1771:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(sep) > 0) { data/itcl4-4.2.0/generic/itclBuiltin.c:1808: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 ((val == NULL) || (strlen(val) == 0)) { data/itcl4-4.2.0/generic/itclBuiltin.c:1868: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). resStr += strlen(val); data/itcl4-4.2.0/generic/itclBuiltin.c:2098: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 ((val != NULL) && (strlen(val) != 0)) { data/itcl4-4.2.0/generic/itclBuiltin.c:2277:31: [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 ((val != NULL) && (strlen(val) > 0)) { data/itcl4-4.2.0/generic/itclBuiltin.c:2403:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((val != NULL) && (strlen(val) > 0)) { data/itcl4-4.2.0/generic/itclBuiltin.c:2726:31: [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 ((val != NULL) && (strlen(val) > 0)) { data/itcl4-4.2.0/generic/itclClass.c:206: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). if (strlen(path) == 0) { data/itcl4-4.2.0/generic/itclCmd.c:1933:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((val != NULL) && (strlen(val) != 0)) { data/itcl4-4.2.0/generic/itclEnsemble.c:942: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). ensPart->usage = (char *)ckalloc(strlen(usageInfo)+1); data/itcl4-4.2.0/generic/itclEnsemble.c:1204: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). ensPart->name = (char*)ckalloc(strlen(partName)+1); data/itcl4-4.2.0/generic/itclEnsemble.c:1384: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). nlen = strlen(partName); data/itcl4-4.2.0/generic/itclEnsemble.c:1594: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). max = strlen(ensData->parts[pos]->name); data/itcl4-4.2.0/generic/itclInfo.c:582: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). if (strlen(InfoMethodList[i].usage) > 0) { data/itcl4-4.2.0/generic/itclInfo.c:636: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). if (strlen(infoCmdsDelegated2[i].usage) > 0) { data/itcl4-4.2.0/generic/itclInfo.c:810: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). if ((val != NULL) && (strlen(val) != 0)) { data/itcl4-4.2.0/generic/itclInfo.c:3475: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). if ((val != NULL) && (strlen(val) != 0)) { data/itcl4-4.2.0/generic/itclMethod.c:1612:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(arglist) > 0) { data/itcl4-4.2.0/generic/itclMigrate2TclCore.c:232: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 nameLen = strlen(name); data/itcl4-4.2.0/generic/itclObject.c:2266:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(objectName) == 0) { data/itcl4-4.2.0/generic/itclObject.c:2451: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 ((val == NULL) || (strlen(val) == 0)) { data/itcl4-4.2.0/generic/itclObject.c:2949:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lgth = strlen(className); data/itcl4-4.2.0/generic/itclObject.c:2954:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). chkLgth = strlen(chkPtr); data/itcl4-4.2.0/generic/itclObject.c:3057:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(head) > 0) { data/itcl4-4.2.0/generic/itclObject.c:3337:29: [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(Tcl_GetString(strPtr)) > 0) { data/itcl4-4.2.0/generic/itclParse.c:1220:45: [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 ((ioPtr != NULL) && ((val != NULL) && (strlen(val) == 0))) { data/itcl4-4.2.0/generic/itclParse.c:1226: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 ((val == NULL) || (strlen(val) == 0)) { data/itcl4-4.2.0/generic/itclUtil.c:1059: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). len = strlen(name); data/itcl4-4.2.0/generic/itclUtil.c:1060:31: [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). cmdName = (char *)ckalloc(strlen(name)+1); data/itcl4-4.2.0/generic/itclUtil.c:1087:51: [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). cmdName = (char *)ckalloc(strlen(listv[3])+1); data/itcl4-4.2.0/win/nmakehlp.c:394:2: [1] (buffer) lstrcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant character. lstrcat(cmdline, "\""); data/itcl4-4.2.0/win/nmakehlp.c:530: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). p += strlen(match); data/itcl4-4.2.0/win/nmakehlp.c:676: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). op += strlen(p->key); data/itcl4-4.2.0/win/nmakehlp.c:732: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). dirlen = strlen(dir); data/itcl4-4.2.0/win/nmakehlp.c:735:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(path, dir, dirlen); data/itcl4-4.2.0/win/nmakehlp.c:736:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(path+dirlen, "\\*", 3); /* Including terminating \0 */ data/itcl4-4.2.0/win/nmakehlp.c:737: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). keylen = strlen(keypath); data/itcl4-4.2.0/win/nmakehlp.c:762: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). sublen = strlen(finfo.cFileName); data/itcl4-4.2.0/win/nmakehlp.c:765:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(path+dirlen+1, finfo.cFileName, sublen); data/itcl4-4.2.0/win/nmakehlp.c:767:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(path+dirlen+1+sublen+1, keypath, keylen+1); ANALYSIS SUMMARY: Hits = 178 Lines analyzed = 35891 in approximately 0.94 seconds (38299 lines/second) Physical Source Lines of Code (SLOC) = 25433 Hits@level = [0] 22 [1] 48 [2] 115 [3] 5 [4] 10 [5] 0 Hits@level+ = [0+] 200 [1+] 178 [2+] 130 [3+] 15 [4+] 10 [5+] 0 Hits/KSLOC@level+ = [0+] 7.8638 [1+] 6.99878 [2+] 5.11147 [3+] 0.589785 [4+] 0.39319 [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.