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/sblim-wbemcli-1.6.3/CimXml.h Examining data/sblim-wbemcli-1.6.3/CimWinHttp.cpp Examining data/sblim-wbemcli-1.6.3/SunSMC.cpp Examining data/sblim-wbemcli-1.6.3/Cimghttp.h Examining data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp Examining data/sblim-wbemcli-1.6.3/CimWinHttp.h Examining data/sblim-wbemcli-1.6.3/Cimghttp.cpp Examining data/sblim-wbemcli-1.6.3/Cimwww.cpp Examining data/sblim-wbemcli-1.6.3/CimCurl.h Examining data/sblim-wbemcli-1.6.3/CimXml.cpp Examining data/sblim-wbemcli-1.6.3/Cimwww.h Examining data/sblim-wbemcli-1.6.3/main.cpp Examining data/sblim-wbemcli-1.6.3/CimCurl.cpp FINAL RESULTS: data/sblim-wbemcli-1.6.3/CimCurl.cpp:211:23: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. url.password = getpass ("Enter password:"); data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:176:2: [4] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). wcscat(pszSingle, wpCimOp); data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:213:2: [4] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). wcscat(pszSingle, wpNS); data/sblim-wbemcli-1.6.3/CimXml.cpp:162:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(eTag,t); data/sblim-wbemcli-1.6.3/CimXml.cpp:279:7: [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(ptr,msg1); data/sblim-wbemcli-1.6.3/CimXml.cpp:280:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(ptr,tag); data/sblim-wbemcli-1.6.3/CimXml.cpp:282:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(ptr,word); data/sblim-wbemcli-1.6.3/CimXml.cpp:301: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(ptr,msg2); data/sblim-wbemcli-1.6.3/CimXml.cpp:302:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(ptr,tag); data/sblim-wbemcli-1.6.3/CimXml.cpp:304:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(ptr,word); data/sblim-wbemcli-1.6.3/CimXml.cpp:3169:15: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. while (2 == fscanf(fp, scnfmt.c_str(), &dev_num, dev_name)) { data/sblim-wbemcli-1.6.3/CimXml.cpp:3224: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(rb,buffer); data/sblim-wbemcli-1.6.3/CimXml.cpp:3228:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(rb,u); data/sblim-wbemcli-1.6.3/CimXml.cpp:4441: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 (q,(chrs)); \ data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:389: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(gv->name,name); data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:516:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(temp,"Type error. Expected %s", ty->name); data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:549:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(temp,"Type error. Expected %s", ty->name); data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:575: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(r,type->name); data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:605: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(r,type->name); data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:1708:13: [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 *) arg1->cur,arg2); data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:16832:13: [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 *) arg1->attrl,arg2); data/sblim-wbemcli-1.6.3/Cimwww.cpp:132: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(clearbuf,url.user.c_str()); data/sblim-wbemcli-1.6.3/Cimwww.cpp:134:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(clearbuf,url.password.c_str()); data/sblim-wbemcli-1.6.3/Cimwww.cpp:137:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(authbuf,secretbuf); data/sblim-wbemcli-1.6.3/CimCurl.cpp:181:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char * curlSslVer = getenv("WBEMCLI_CURL_SSLVERSION"); data/sblim-wbemcli-1.6.3/CimCurl.cpp:265:24: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char * curldebug = getenv("CURLDEBUG"); data/sblim-wbemcli-1.6.3/CimXml.cpp:3212:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *fn=getenv("WBEMCLI_IND"); data/sblim-wbemcli-1.6.3/CimCurl.cpp:136:27: [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). ed->mStatusCode=atoi(cln+2); data/sblim-wbemcli-1.6.3/CimCurl.cpp:138:22: [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). ed->mError=atoi(cln+2); data/sblim-wbemcli-1.6.3/CimCurl.cpp:365: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). if ((fp = fopen(cacert, "r"))) { data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:94: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(m_lpPayload, lpPayload, dwSize); data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:144:12: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). dwMBLen = MultiByteToWideChar(CP_UTF8, 0, url.host, dwLen, wpHost, dwLen); data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:172:12: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). dwMBLen = MultiByteToWideChar(CP_UTF8, 0, op, dwLen, wpCimOp, dwLen); data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:175:2: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(pszSingle, L"CIMMethod: "); data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:177:2: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(pszSingle, L"\r\n"); data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:209:12: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). dwMBLen = MultiByteToWideChar(CP_UTF8, 0, sb.c_str(), dwLen, wpNS, dwLen); data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:212:2: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(pszSingle, L"CIMObject: "); data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:214:2: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(pszSingle, L"\r\n"); data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:226:12: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). dwMBLen = MultiByteToWideChar(CP_UTF8, 0, url.password, dwLen, wpPswd, dwLen); data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:234:12: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). dwMBLen = MultiByteToWideChar(CP_UTF8, 0, url.user, dwLen, wpUser, dwLen); data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:448:9: [2] (buffer) CopyMemory: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. ::CopyMemory(pszTmpBuffer, pszOutBuffer, dwTotal); data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:449:9: [2] (buffer) CopyMemory: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. ::CopyMemory(pszTmpBuffer + dwTotal, pszNewBuffer, dwSize); data/sblim-wbemcli-1.6.3/CimXml.cpp:161: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 eTag[256]="</"; data/sblim-wbemcli-1.6.3/CimXml.cpp:246: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 *ptr, wa[32]; data/sblim-wbemcli-1.6.3/CimXml.cpp:249: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 word[11]; data/sblim-wbemcli-1.6.3/CimXml.cpp:281:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ptr," ("); data/sblim-wbemcli-1.6.3/CimXml.cpp:303:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(ptr,": "); data/sblim-wbemcli-1.6.3/CimXml.cpp:1343: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 msg[256]={"Expecting INSTANCEPATH and INSTANCE element instead of: "}; data/sblim-wbemcli-1.6.3/CimXml.cpp:2906:17: [2] (integer) atol: 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). long codenum=atol(code.c_str()); data/sblim-wbemcli-1.6.3/CimXml.cpp:2925: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 cde[64]; data/sblim-wbemcli-1.6.3/CimXml.cpp:2926: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(cde,"%d",c); data/sblim-wbemcli-1.6.3/CimXml.cpp:3053:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((zone_id = atoi(z)) <= 0) zone_id = URL::getNetDeviceNum(string(z)); data/sblim-wbemcli-1.6.3/CimXml.cpp:3159: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 dev_name[32]; // sufficient? data/sblim-wbemcli-1.6.3/CimXml.cpp:3162:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(filename.c_str(), "r")) == 0) { data/sblim-wbemcli-1.6.3/CimXml.cpp:3214: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). FILE *indf=fopen(fn,"r"); data/sblim-wbemcli-1.6.3/CimXml.h:226: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 type[256]; data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:399:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char hex[17] = "0123456789abcdef"; data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:571: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 result[1024]; data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:600: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 result[1024]; data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:623:34: [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. obj = PyString_FromString((char *) constants[i].pvalue); data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:1707:26: [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. arg1->cur = (char *) (new char[strlen(arg2)+1]); data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:16831:28: [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. arg1->attrl = (char *) (new char[strlen(arg2)+1]); data/sblim-wbemcli-1.6.3/Cimwww.cpp:96: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 clearbuf[90]; data/sblim-wbemcli-1.6.3/Cimwww.cpp:97: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 secretbuf[120]; data/sblim-wbemcli-1.6.3/Cimwww.cpp:98: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 authbuf[130]; data/sblim-wbemcli-1.6.3/Cimwww.cpp:136:6: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(authbuf,"Basic "); data/sblim-wbemcli-1.6.3/main.cpp:102:10: [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 c[2]=" "; data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:84: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). addPayload(pl, strlen(pl)); data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:138: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). dwLen = strlen(url.host) + 1; data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:166: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). dwLen = strlen(op) + 1; data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:203: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). dwLen = strlen(sb.c_str()) + 1; data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:220: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). dwLen = strlen(url.password) + 1; data/sblim-wbemcli-1.6.3/CimWinHttp.cpp:228: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). dwLen = strlen(url.user) + 1; data/sblim-wbemcli-1.6.3/CimXml.cpp:72: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). last=cur+strlen(cur); data/sblim-wbemcli-1.6.3/CimXml.cpp:94: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). int l=strlen(s); data/sblim-wbemcli-1.6.3/CimXml.cpp:97:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(x,cur,80); data/sblim-wbemcli-1.6.3/CimXml.cpp:130: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). int l=strlen(t); data/sblim-wbemcli-1.6.3/CimXml.cpp:163:4: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(eTag,">"); data/sblim-wbemcli-1.6.3/CimXml.cpp:166: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). cur=e+strlen(eTag); data/sblim-wbemcli-1.6.3/CimXml.cpp:174: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). int l=strlen(val),rv=0; data/sblim-wbemcli-1.6.3/CimXml.cpp:179: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). cur=a+strlen(w); data/sblim-wbemcli-1.6.3/CimXml.cpp:196: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). int l=strlen(w); data/sblim-wbemcli-1.6.3/CimXml.cpp:276:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(word,cur,10); data/sblim-wbemcli-1.6.3/CimXml.cpp:278:25: [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). ptr=(char*)alloca(strlen(tag)+strlen(msg1)+8+20); data/sblim-wbemcli-1.6.3/CimXml.cpp:278:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ptr=(char*)alloca(strlen(tag)+strlen(msg1)+8+20); data/sblim-wbemcli-1.6.3/CimXml.cpp:283:7: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(ptr,")"); data/sblim-wbemcli-1.6.3/CimXml.cpp:300: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). ptr=(char*)alloca(strlen(tag)+strlen(msg2)+8); data/sblim-wbemcli-1.6.3/CimXml.cpp:300:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ptr=(char*)alloca(strlen(tag)+strlen(msg2)+8); data/sblim-wbemcli-1.6.3/CimXml.cpp:425: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). strlen(u)-strlen(t))==0) { data/sblim-wbemcli-1.6.3/CimXml.cpp:425: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). strlen(u)-strlen(t))==0) { data/sblim-wbemcli-1.6.3/CimXml.cpp:521: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). strlen(u)-strlen(t))==0) { data/sblim-wbemcli-1.6.3/CimXml.cpp:521: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). strlen(u)-strlen(t))==0) { data/sblim-wbemcli-1.6.3/CimXml.cpp:1344:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(msg,tag,32); data/sblim-wbemcli-1.6.3/CimXml.cpp:2792:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (*s=='"') val=string(s+1,(int)strlen(s)-2); data/sblim-wbemcli-1.6.3/CimXml.cpp:2946:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(p,f,n); data/sblim-wbemcli-1.6.3/CimXml.cpp:2979: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). last=u+strlen(u); data/sblim-wbemcli-1.6.3/CimXml.cpp:3051:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (*z == 0 || strlen(z) != strlen(strtok(z, "!$%&*=?@^~"))) data/sblim-wbemcli-1.6.3/CimXml.cpp:3051:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (*z == 0 || strlen(z) != strlen(strtok(z, "!$%&*=?@^~"))) data/sblim-wbemcli-1.6.3/CimXml.cpp:3067:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!phelp || strlen(phelp+1) == 0) { data/sblim-wbemcli-1.6.3/CimXml.cpp:3073: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 (!q) q=u+strlen(u); data/sblim-wbemcli-1.6.3/CimXml.cpp:3081: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). if (p && strlen(p)) ns.push_back(string(u,p-u)); data/sblim-wbemcli-1.6.3/CimXml.cpp:3221:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(buffer,ind,strlen(ind))==0 && buffer[strlen(ind)]==':') { data/sblim-wbemcli-1.6.3/CimXml.cpp:3221:56: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(buffer,ind,strlen(ind))==0 && buffer[strlen(ind)]==':') { data/sblim-wbemcli-1.6.3/CimXml.cpp:3222: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). char *rb=(char*)malloc(strlen(buffer)+strlen(u)+16); data/sblim-wbemcli-1.6.3/CimXml.cpp:3222:48: [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). char *rb=(char*)malloc(strlen(buffer)+strlen(u)+16); data/sblim-wbemcli-1.6.3/CimXml.cpp:3223: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). for (buffer+=strlen(ind)+1; isspace(*buffer); buffer++); data/sblim-wbemcli-1.6.3/CimXml.cpp:3225: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). char *erb=rb+strlen(rb)-1; data/sblim-wbemcli-1.6.3/CimXml.cpp:3227:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(rb,"/"); data/sblim-wbemcli-1.6.3/CimXml.cpp:4440: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). #define REPL(str,chrs) if(strncasecmp(p,str,strlen(str))==0) \ data/sblim-wbemcli-1.6.3/CimXml.cpp:4442: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). q+=strlen(chrs); \ data/sblim-wbemcli-1.6.3/CimXml.cpp:4443: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). p+=strlen(str); } data/sblim-wbemcli-1.6.3/CimXml.cpp:4456:25: [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). buf = (char *) alloca(strlen(m) + (i * (nq ? 1 : 0)) + 1); data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:388:30: [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). gv->name = (char *) malloc(strlen(name)+1); data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:515: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). char *temp = (char *) malloc(64+strlen(ty->name)); data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:548: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). char *temp = (char *) malloc(64+strlen(ty->name)); data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:602: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 ((2*sz + 1 + strlen(type->name)) > 1000) return 0; data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:1707: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). arg1->cur = (char *) (new char[strlen(arg2)+1]); data/sblim-wbemcli-1.6.3/CimXml_wrap.cpp:16831:46: [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). arg1->attrl = (char *) (new char[strlen(arg2)+1]); data/sblim-wbemcli-1.6.3/Cimwww.cpp:133:6: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(clearbuf,":"); data/sblim-wbemcli-1.6.3/Cimwww.cpp:135: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). HTUU_encode((unsigned char *)clearbuf,strlen(clearbuf),secretbuf); data/sblim-wbemcli-1.6.3/Cimwww.cpp:160: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). if (rv == NULL || strlen(rv) == 0 && errorbuf.size()>0) { data/sblim-wbemcli-1.6.3/Cimwww.cpp:177: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). HTAnchor_setLength(parent, strlen(pl.c_str())); data/sblim-wbemcli-1.6.3/main.cpp:150: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). cmdln=strlen(cmd); ANALYSIS SUMMARY: Hits = 123 Lines analyzed = 32650 in approximately 0.83 seconds (39296 lines/second) Physical Source Lines of Code (SLOC) = 28424 Hits@level = [0] 8 [1] 56 [2] 40 [3] 3 [4] 24 [5] 0 Hits@level+ = [0+] 131 [1+] 123 [2+] 67 [3+] 27 [4+] 24 [5+] 0 Hits/KSLOC@level+ = [0+] 4.60878 [1+] 4.32733 [2+] 2.35716 [3+] 0.949901 [4+] 0.844357 [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.