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/hashrat-1.13/cgi.c Examining data/hashrat-1.13/cgi.h Examining data/hashrat-1.13/check-hash.c Examining data/hashrat-1.13/check-hash.h Examining data/hashrat-1.13/command-line-args.h Examining data/hashrat-1.13/common.c Examining data/hashrat-1.13/common.h Examining data/hashrat-1.13/files.c Examining data/hashrat-1.13/files.h Examining data/hashrat-1.13/filesigning.c Examining data/hashrat-1.13/filesigning.h Examining data/hashrat-1.13/find.c Examining data/hashrat-1.13/find.h Examining data/hashrat-1.13/fingerprint.c Examining data/hashrat-1.13/fingerprint.h Examining data/hashrat-1.13/http.c Examining data/hashrat-1.13/http.h Examining data/hashrat-1.13/include-exclude.c Examining data/hashrat-1.13/include-exclude.h Examining data/hashrat-1.13/libUseful-4/Array.c Examining data/hashrat-1.13/libUseful-4/Array.h Examining data/hashrat-1.13/libUseful-4/CommandLineParser.c Examining data/hashrat-1.13/libUseful-4/CommandLineParser.h Examining data/hashrat-1.13/libUseful-4/Compression.c Examining data/hashrat-1.13/libUseful-4/Compression.h Examining data/hashrat-1.13/libUseful-4/ConnectionChain.c Examining data/hashrat-1.13/libUseful-4/ConnectionChain.h Examining data/hashrat-1.13/libUseful-4/DataParser.c Examining data/hashrat-1.13/libUseful-4/DataParser.h Examining data/hashrat-1.13/libUseful-4/DataProcessing.c Examining data/hashrat-1.13/libUseful-4/DataProcessing.h Examining data/hashrat-1.13/libUseful-4/Encodings.c Examining data/hashrat-1.13/libUseful-4/Encodings.h Examining data/hashrat-1.13/libUseful-4/Errors.c Examining data/hashrat-1.13/libUseful-4/Errors.h Examining data/hashrat-1.13/libUseful-4/Expect.c Examining data/hashrat-1.13/libUseful-4/Expect.h Examining data/hashrat-1.13/libUseful-4/FileSystem.c Examining data/hashrat-1.13/libUseful-4/FileSystem.h Examining data/hashrat-1.13/libUseful-4/GeneralFunctions.c Examining data/hashrat-1.13/libUseful-4/GeneralFunctions.h Examining data/hashrat-1.13/libUseful-4/Hash.c Examining data/hashrat-1.13/libUseful-4/Hash.h Examining data/hashrat-1.13/libUseful-4/Http.c Examining data/hashrat-1.13/libUseful-4/Http.h Examining data/hashrat-1.13/libUseful-4/KeyCodes.h Examining data/hashrat-1.13/libUseful-4/LibSettings.c Examining data/hashrat-1.13/libUseful-4/LibSettings.h Examining data/hashrat-1.13/libUseful-4/List.c Examining data/hashrat-1.13/libUseful-4/List.h Examining data/hashrat-1.13/libUseful-4/Log.c Examining data/hashrat-1.13/libUseful-4/Log.h Examining data/hashrat-1.13/libUseful-4/Markup.c Examining data/hashrat-1.13/libUseful-4/Markup.h Examining data/hashrat-1.13/libUseful-4/OAuth.c Examining data/hashrat-1.13/libUseful-4/OAuth.h Examining data/hashrat-1.13/libUseful-4/OpenSSL.c Examining data/hashrat-1.13/libUseful-4/OpenSSL.h Examining data/hashrat-1.13/libUseful-4/PatternMatch.c Examining data/hashrat-1.13/libUseful-4/PatternMatch.h Examining data/hashrat-1.13/libUseful-4/Process.c Examining data/hashrat-1.13/libUseful-4/Process.h Examining data/hashrat-1.13/libUseful-4/Pty.c Examining data/hashrat-1.13/libUseful-4/Pty.h Examining data/hashrat-1.13/libUseful-4/RawData.c Examining data/hashrat-1.13/libUseful-4/RawData.h Examining data/hashrat-1.13/libUseful-4/SecureMem.c Examining data/hashrat-1.13/libUseful-4/SecureMem.h Examining data/hashrat-1.13/libUseful-4/Smtp.c Examining data/hashrat-1.13/libUseful-4/Smtp.h Examining data/hashrat-1.13/libUseful-4/Socket.c Examining data/hashrat-1.13/libUseful-4/Socket.h Examining data/hashrat-1.13/libUseful-4/SpawnPrograms.c Examining data/hashrat-1.13/libUseful-4/SpawnPrograms.h Examining data/hashrat-1.13/libUseful-4/Ssh.c Examining data/hashrat-1.13/libUseful-4/Ssh.h Examining data/hashrat-1.13/libUseful-4/Stream.c Examining data/hashrat-1.13/libUseful-4/Stream.h Examining data/hashrat-1.13/libUseful-4/String.c Examining data/hashrat-1.13/libUseful-4/String.h Examining data/hashrat-1.13/libUseful-4/SysInfo.c Examining data/hashrat-1.13/libUseful-4/SysInfo.h Examining data/hashrat-1.13/libUseful-4/Terminal.c Examining data/hashrat-1.13/libUseful-4/Terminal.h Examining data/hashrat-1.13/libUseful-4/Time.c Examining data/hashrat-1.13/libUseful-4/Time.h Examining data/hashrat-1.13/libUseful-4/Tokenizer.c Examining data/hashrat-1.13/libUseful-4/Tokenizer.h Examining data/hashrat-1.13/libUseful-4/URL.c Examining data/hashrat-1.13/libUseful-4/URL.h Examining data/hashrat-1.13/libUseful-4/Unicode.c Examining data/hashrat-1.13/libUseful-4/Unicode.h Examining data/hashrat-1.13/libUseful-4/UnixSocket.c Examining data/hashrat-1.13/libUseful-4/UnixSocket.h Examining data/hashrat-1.13/libUseful-4/Vars.c Examining data/hashrat-1.13/libUseful-4/Vars.h Examining data/hashrat-1.13/libUseful-4/base64.c Examining data/hashrat-1.13/libUseful-4/base64.h Examining data/hashrat-1.13/libUseful-4/crc32.c Examining data/hashrat-1.13/libUseful-4/crc32.h Examining data/hashrat-1.13/libUseful-4/defines.h Examining data/hashrat-1.13/libUseful-4/examples/Errors.c Examining data/hashrat-1.13/libUseful-4/examples/FileCopy.c Examining data/hashrat-1.13/libUseful-4/examples/Maps.c Examining data/hashrat-1.13/libUseful-4/examples/ParseRSS.c Examining data/hashrat-1.13/libUseful-4/examples/SSLClient.c Examining data/hashrat-1.13/libUseful-4/examples/Smtp.c Examining data/hashrat-1.13/libUseful-4/examples/SpawnContainer.c Examining data/hashrat-1.13/libUseful-4/examples/TTYTest.c Examining data/hashrat-1.13/libUseful-4/examples/TermBar.c Examining data/hashrat-1.13/libUseful-4/examples/Terminal.c Examining data/hashrat-1.13/libUseful-4/examples/Tokenize.c Examining data/hashrat-1.13/libUseful-4/examples/Vars.c Examining data/hashrat-1.13/libUseful-4/examples/pattest.c Examining data/hashrat-1.13/libUseful-4/includes.h Examining data/hashrat-1.13/libUseful-4/inet.c Examining data/hashrat-1.13/libUseful-4/inet.h Examining data/hashrat-1.13/libUseful-4/jh_ref.c Examining data/hashrat-1.13/libUseful-4/jh_ref.h Examining data/hashrat-1.13/libUseful-4/libUseful.h Examining data/hashrat-1.13/libUseful-4/md5-global.h Examining data/hashrat-1.13/libUseful-4/md5.h Examining data/hashrat-1.13/libUseful-4/md5c.c Examining data/hashrat-1.13/libUseful-4/sha1.c Examining data/hashrat-1.13/libUseful-4/sha1.h Examining data/hashrat-1.13/libUseful-4/sha2.c Examining data/hashrat-1.13/libUseful-4/sha2.h Examining data/hashrat-1.13/libUseful-4/whirlpool.c Examining data/hashrat-1.13/libUseful-4/whirlpool.h Examining data/hashrat-1.13/main.c Examining data/hashrat-1.13/memcached.c Examining data/hashrat-1.13/memcached.h Examining data/hashrat-1.13/ssh.c Examining data/hashrat-1.13/ssh.h Examining data/hashrat-1.13/xattr.c Examining data/hashrat-1.13/xattr.h Examining data/hashrat-1.13/command-line-args.c FINAL RESULTS: data/hashrat-1.13/files.c:384:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. val=readlink(Path, Tempstr,PATH_MAX); data/hashrat-1.13/libUseful-4/FileSystem.c:236:16: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. result=chown(FileName, uid, -1); data/hashrat-1.13/libUseful-4/FileSystem.c:252:16: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. result=chown(FileName, -1, gid); data/hashrat-1.13/libUseful-4/FileSystem.c:576:3: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. readlink(ptr, Tempstr, PATH_MAX); data/hashrat-1.13/libUseful-4/Process.c:522:6: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(tptr, Stat.st_mode); data/hashrat-1.13/check-hash.c:92:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(Path,F_OK)!=0) data/hashrat-1.13/find.c:181:8: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(Item->Path, F_OK) !=0) HandleCheckFail(Item->Path, "Missing"); data/hashrat-1.13/libUseful-4/DataProcessing.c:391:22: [4] (crypto) EVP_des_cbc: DES only supports a 56-bit keysize, which is too small given today's computers (CWE-327). Use a different patent-free encryption algorithm with a larger keysize, such as 3DES or AES. Data->Cipher=EVP_des_cbc(); data/hashrat-1.13/libUseful-4/DataProcessing.c:397:22: [4] (crypto) EVP_desx_cbc: DES only supports a 56-bit keysize, which is too small given today's computers (CWE-327). Use a different patent-free encryption algorithm with a larger keysize, such as 3DES or AES. Data->Cipher=EVP_desx_cbc(); data/hashrat-1.13/libUseful-4/FileSystem.c:202:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(Tempstr,F_OK)==0) data/hashrat-1.13/libUseful-4/Process.c:171:5: [4] (format) vsnprintf: 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. vsnprintf(TitleBuffer,TitleLen,FmtStr,args); data/hashrat-1.13/libUseful-4/Process.c:682:31: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (StrValid(SetupScript)) system(SetupScript); data/hashrat-1.13/libUseful-4/SpawnPrograms.c:69:9: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execv(ExecPath, argv); data/hashrat-1.13/libUseful-4/SpawnPrograms.c:71:17: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. else result=execl("/bin/sh","/bin/sh","-c",(char *) Command,NULL); data/hashrat-1.13/libUseful-4/String.c:480:16: [4] (format) vsnprintf: 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. result=vsnprintf(Tempstr,result,FmtStr,argscopy); data/hashrat-1.13/libUseful-4/String.c:492:20: [4] (format) vsnprintf: 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. result=vsnprintf(Tempstr,result+10,FmtStr,argscopy); data/hashrat-1.13/libUseful-4/examples/Maps.c:77:5: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access("majestic_million.csv",F_OK) !=0) DownloadTestFile(); data/hashrat-1.13/cgi.c:228:1: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. chroot("."); data/hashrat-1.13/cgi.c:237:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. Flags=CGIParseArgs(getenv("QUERY_STRING"),"&","=",&HashType, &Encoding, &LineEnding, &Text, &OutputLength, &SegmentLength, &SegmentChar, &OptionsFile); data/hashrat-1.13/libUseful-4/DataProcessing.c:126:37: [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. Value=FindFileInPath(Value,Name,getenv("PATH")); data/hashrat-1.13/libUseful-4/Errors.c:49:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (StrValid(getenv("LIBUSEFUL_DEBUG"))) result=TRUE; data/hashrat-1.13/libUseful-4/GeneralFunctions.c:313:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/hashrat-1.13/libUseful-4/Process.c:363:9: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. if (chroot(".") == -1) RaiseError(ERRFLAG_ERRNO, "chroot", "failed to chroot to curr directory"); data/hashrat-1.13/libUseful-4/Process.c:706:10: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. if (chroot(".") == -1) data/hashrat-1.13/libUseful-4/Process.c:858:14: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. else if (chroot(".") == -1) data/hashrat-1.13/libUseful-4/Process.c:909:13: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. if (chroot(".") == -1) data/hashrat-1.13/libUseful-4/SpawnPrograms.c:53:48: [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. ExecPath=FindFileInPath(ExecPath,Token,getenv("PATH")); data/hashrat-1.13/libUseful-4/SysInfo.c:79: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. ptr=getenv("TMPDIR"); data/hashrat-1.13/libUseful-4/SysInfo.c:80: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. if (! ptr) ptr=getenv("TEMP"); data/hashrat-1.13/libUseful-4/Time.c:47:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("TZ")) Tempstr=CopyStr(Tempstr,getenv("TZ")); data/hashrat-1.13/libUseful-4/Time.c:47:51: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("TZ")) Tempstr=CopyStr(Tempstr,getenv("TZ")); data/hashrat-1.13/libUseful-4/Time.c:99:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("TZ")) Tempstr=CopyStr(Tempstr,getenv("TZ")); data/hashrat-1.13/libUseful-4/Time.c:99:51: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("TZ")) Tempstr=CopyStr(Tempstr,getenv("TZ")); data/hashrat-1.13/libUseful-4/Time.c:126:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("TZ")) Tempstr=CopyStr(Tempstr,getenv("TZ")); data/hashrat-1.13/libUseful-4/Time.c:126:51: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("TZ")) Tempstr=CopyStr(Tempstr,getenv("TZ")); data/hashrat-1.13/cgi.c:112:56: [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 (strcasecmp(Name,"OutputLength")==0) *OutputLength=atoi(Value); data/hashrat-1.13/cgi.c:113:58: [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 (strcasecmp(Name,"SegmentLength")==0) *SegmentLength=atoi(Value); data/hashrat-1.13/command-line-args.c:63:63: [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 (strcmp(VarName, "Output:Length")==0) Ctx->OutputLength=atoi(next); data/hashrat-1.13/command-line-args.c:64:65: [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 (strcmp(VarName, "Segment:Length")==0) Ctx->SegmentLength=atoi(next); data/hashrat-1.13/files.c:321:14: [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 (Node) memcpy(FStat, Node->Item, sizeof(struct stat)); data/hashrat-1.13/http.c:201:35: [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 (StrValid(ptr)) FStat->st_size=atoi(ptr); data/hashrat-1.13/include-exclude.c:175:15: [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). When=Now - atol(mptr+1) * mult; data/hashrat-1.13/include-exclude.c:181:15: [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). When=Now - atol(mptr+1) * mult; data/hashrat-1.13/include-exclude.c:187:15: [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). When=Now - atol(mptr) * mult; data/hashrat-1.13/libUseful-4/Compression.c:175:75: [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). else if (strcasecmp(Name,"CompressionLevel")==0) CompressionLevel=atoi(Value); data/hashrat-1.13/libUseful-4/Compression.c:176:64: [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). else if (strcasecmp(Name,"Level")==0) CompressionLevel=atoi(Value); data/hashrat-1.13/libUseful-4/ConnectionChain.c:47:10: [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). Port=atoi(Token); data/hashrat-1.13/libUseful-4/ConnectionChain.c:160: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(ptr, User, len); data/hashrat-1.13/libUseful-4/ConnectionChain.c:167: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(ptr, Pass, len); data/hashrat-1.13/libUseful-4/ConnectionChain.c:208:13: [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). val=atoi(Token); data/hashrat-1.13/libUseful-4/ConnectionChain.c:274: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(ptr, Token, val); data/hashrat-1.13/libUseful-4/ConnectionChain.c:284:32: [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). *((uint16_t *) ptr) =htons(atoi(tptr)); data/hashrat-1.13/libUseful-4/ConnectionChain.c:296: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(ptr,User,val); data/hashrat-1.13/libUseful-4/ConnectionChain.c:307: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(ptr, User, val); data/hashrat-1.13/libUseful-4/ConnectionChain.c:312: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(ptr, Token, val); data/hashrat-1.13/libUseful-4/ConnectionChain.c:394:31: [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 (StrValid(Token)) Port=atoi(Token); data/hashrat-1.13/libUseful-4/ConnectionChain.c:424: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). DPort=atoi(Token2); data/hashrat-1.13/libUseful-4/DataProcessing.c:95: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((*Buffer) + (*Used) ,Data,DataLen); data/hashrat-1.13/libUseful-4/DataProcessing.c:249: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(Tempstr,Salt,slen); data/hashrat-1.13/libUseful-4/DataProcessing.c:250: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(Tempstr+slen,TmpKey,klen); data/hashrat-1.13/libUseful-4/DataProcessing.c:780: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(Tempstr, S->InputBuff + S->InStart,len); data/hashrat-1.13/libUseful-4/Encodings.c:33: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 Buff[6]; data/hashrat-1.13/libUseful-4/Encodings.c:162: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(RetStr,Bytes,len); data/hashrat-1.13/libUseful-4/GeneralFunctions.c:99:7: [2] (misc) open: 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). newfd=open(Path, Flags); data/hashrat-1.13/libUseful-4/GeneralFunctions.c:264:8: [2] (misc) open: 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). fd=open("/dev/urandom",O_RDONLY); data/hashrat-1.13/libUseful-4/GeneralFunctions.c:317:8: [2] (misc) open: 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). fd=open("/dev/urandom",O_RDONLY); data/hashrat-1.13/libUseful-4/Hash.c:119: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(HMAC->Key2+HMAC_BLOCKSIZE,HMAC->Key1,len); data/hashrat-1.13/libUseful-4/Hash.c:142: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(Key,Tempstr,HMAC->Key1Len); data/hashrat-1.13/libUseful-4/Hash.c:146: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(Key,HMAC->Key1,HMAC->Key1Len); data/hashrat-1.13/libUseful-4/Hash.c:185: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(HMAC->Key1,Key,Len); data/hashrat-1.13/libUseful-4/Hash.c:206: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(NewHash->Ctx, Hash->Ctx, sizeof(unsigned long)); data/hashrat-1.13/libUseful-4/Hash.c:222: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(*HashStr,&crc,len); data/hashrat-1.13/libUseful-4/Hash.c:253: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(NewHash->Ctx, Hash->Ctx, sizeof(MD5_CTX)); data/hashrat-1.13/libUseful-4/Hash.c:272: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(*HashStr,DigestBuff,len); data/hashrat-1.13/libUseful-4/Hash.c:305: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(NewHash->Ctx, Hash->Ctx, sizeof(struct sha1_ctx)); data/hashrat-1.13/libUseful-4/Hash.c:321: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(*HashStr,DigestBuff,len); data/hashrat-1.13/libUseful-4/Hash.c:342: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(*HashStr,DigestBuff,len); data/hashrat-1.13/libUseful-4/Hash.c:357: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(NewHash->Ctx, Hash->Ctx, sizeof(SHA2_SHA256_CTX)); data/hashrat-1.13/libUseful-4/Hash.c:379: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(*HashStr,DigestBuff,len); data/hashrat-1.13/libUseful-4/Hash.c:400: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(NewHash->Ctx, Hash->Ctx, sizeof(SHA2_SHA512_CTX)); data/hashrat-1.13/libUseful-4/Hash.c:454: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(*HashStr,DigestBuff,len); data/hashrat-1.13/libUseful-4/Hash.c:475: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(NewHash->Ctx, Hash->Ctx, sizeof(WHIRLPOOLstruct *)); data/hashrat-1.13/libUseful-4/Hash.c:503: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(*HashStr,DigestBuff,len); data/hashrat-1.13/libUseful-4/Hash.c:525: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(NewHash->Ctx, Hash->Ctx, sizeof(hashState *)); data/hashrat-1.13/libUseful-4/Hash.c:641: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(Bytes,Hashed,len); data/hashrat-1.13/libUseful-4/Hash.c:652: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(*Return, Bytes, len); data/hashrat-1.13/libUseful-4/Hash.c:691: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(Tempstr, Bytes, Len); data/hashrat-1.13/libUseful-4/Hash.c:692: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(Tempstr+Len, Salt, SaltLen); data/hashrat-1.13/libUseful-4/Hash.c:693: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(Tempstr+Len+SaltLen, &RoundsBE, sizeof(uint32_t)); data/hashrat-1.13/libUseful-4/Hash.c:700: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(Tempstr, Bytes, Len); data/hashrat-1.13/libUseful-4/Hash.c:701: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(Tempstr+Len, Hash, hlen); data/hashrat-1.13/libUseful-4/Http.c:100: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(ptr,InBuff,InLen); data/hashrat-1.13/libUseful-4/Http.c:164: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(*OutBuff,Chunk->Buffer,bytes_out); data/hashrat-1.13/libUseful-4/Http.c:377: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(Info->PostData, ContentData, ContentLength); data/hashrat-1.13/libUseful-4/Http.c:410:37: [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 (StrValid(Token)) Info->Port=atoi(Token); data/hashrat-1.13/libUseful-4/Http.c:428:82: [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). else if (strcasecmp(Token, "content-length")==0) Info->PostContentLength=atoi(Value); data/hashrat-1.13/libUseful-4/Http.c:634:37: [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). Info->ContentLength=atoi(ptr); data/hashrat-1.13/libUseful-4/Http.c:987:23: [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 (ptr) S->Size=(atoi(ptr)); data/hashrat-1.13/libUseful-4/Http.c:1003: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). RCode=atoi(HTTPInfo->ResponseCode); data/hashrat-1.13/libUseful-4/Http.c:1035:32: [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). HTTPInfo->Port=atoi(Tempstr); data/hashrat-1.13/libUseful-4/Http.c:1098:14: [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). Port=atoi(Tempstr); data/hashrat-1.13/libUseful-4/LibSettings.c:70: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). if (StrValid(ptr)) return(atoi(ptr)); data/hashrat-1.13/libUseful-4/OpenSSL.c:554:21: [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). paramfile = fopen(Tempstr, "r"); data/hashrat-1.13/libUseful-4/PatternMatch.c:14: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 ValStr[4]; data/hashrat-1.13/libUseful-4/Process.c:182:8: [2] (misc) open: 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). fd=open(FilePath, O_CREAT | O_RDWR, 0600); data/hashrat-1.13/libUseful-4/Process.c:210:8: [2] (misc) open: 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). fd=open(Tempstr,O_CREAT | O_WRONLY,0600); data/hashrat-1.13/libUseful-4/Process.c:411:16: [2] (misc) open: 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). fd=open(Glob.gl_pathv[i],O_RDONLY); data/hashrat-1.13/libUseful-4/Process.c:423:12: [2] (misc) open: 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). fd=open(Namespace,O_RDONLY); data/hashrat-1.13/libUseful-4/Process.c:754:70: [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 (strcasecmp(Name,"nice")==0) setpriority(PRIO_PROCESS, 0, atoi(Value)); data/hashrat-1.13/libUseful-4/Process.c:755:75: [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). else if (strcasecmp(Name,"prio")==0) setpriority(PRIO_PROCESS, 0, atoi(Value)); data/hashrat-1.13/libUseful-4/Process.c:756:79: [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). else if (strcasecmp(Name,"priority")==0) setpriority(PRIO_PROCESS, 0, atoi(Value)); data/hashrat-1.13/libUseful-4/Process.c:874:45: [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). else if (strcasecmp(Name,"UID")==0) uid=atoi(Value); data/hashrat-1.13/libUseful-4/Process.c:875:49: [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). else if (strcasecmp(Name,"GID")==0) gid=atoi(Value); data/hashrat-1.13/libUseful-4/Pty.c:265:9: [2] (misc) open: 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). tty=open(devname, flags); data/hashrat-1.13/libUseful-4/Pty.c:302:48: [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). else if (isnum(Token) && Speed) *Speed=atoi(Token); data/hashrat-1.13/libUseful-4/Pty.c:329:13: [2] (misc) open: 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). *master=open("/dev/ptmx",O_RDWR); data/hashrat-1.13/libUseful-4/Pty.c:344:26: [2] (misc) open: 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 ( (*slave=open(Tempstr,O_RDWR)) >-1) data/hashrat-1.13/libUseful-4/Pty.c:378:27: [2] (misc) open: 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 ( (*master=open(Tempstr,O_RDWR)) >-1) data/hashrat-1.13/libUseful-4/RawData.c:23: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(RD->Buffer, Data, MaxBuffLen); data/hashrat-1.13/libUseful-4/SecureMem.c:94: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(NewMem,*OldMem, OldSize); data/hashrat-1.13/libUseful-4/SecureMem.c:117:8: [2] (misc) open: 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). fd=open(Path, O_RDONLY); data/hashrat-1.13/libUseful-4/SecureMem.c:155:8: [2] (misc) open: 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). fd=open(Path, O_RDONLY); data/hashrat-1.13/libUseful-4/SecureMem.c:266: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(ptr,Field,len); data/hashrat-1.13/libUseful-4/Smtp.c:148: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(ptr, User, len); data/hashrat-1.13/libUseful-4/Smtp.c:154: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(ptr, Pass, len); data/hashrat-1.13/libUseful-4/Socket.c:350: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). F=fopen("/proc/net/arp","r"); data/hashrat-1.13/libUseful-4/Socket.c:411: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). *Port=atoi(Tempstr); data/hashrat-1.13/libUseful-4/Socket.c:523:28: [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 ((len > 0) && Data) memcpy(Tempstr + sizeof(struct icmphdr), Data, len); data/hashrat-1.13/libUseful-4/Socket.c:569: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). *Port=atoi(Tempstr); data/hashrat-1.13/libUseful-4/Socket.c:712:31: [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 (StrValid(Token)) Port=atoi(Token); data/hashrat-1.13/libUseful-4/Socket.c:819: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). if (ReturnPort) *ReturnPort=atoi(PortStr); data/hashrat-1.13/libUseful-4/Socket.c:1102:49: [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 (strcasecmp(Curr->Tag,"TTL")==0) TTL=atoi(Curr->Item); data/hashrat-1.13/libUseful-4/Socket.c:1103:49: [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 (strcasecmp(Curr->Tag,"ToS")==0) ToS=atoi(Curr->Item); data/hashrat-1.13/libUseful-4/Socket.c:1146:18: [2] (misc) open: 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). S->in_fd=open(Host, O_RDWR); data/hashrat-1.13/libUseful-4/SpawnPrograms.c:207:39: [2] (misc) open: 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). else if (DevNull==-1) DevNull=open("/dev/null",O_RDWR); data/hashrat-1.13/libUseful-4/SpawnPrograms.c:210:39: [2] (misc) open: 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). else if (DevNull==-1) DevNull=open("/dev/null",O_RDWR); data/hashrat-1.13/libUseful-4/SpawnPrograms.c:213:39: [2] (misc) open: 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). else if (DevNull==-1) DevNull=open("/dev/null",O_RDWR); data/hashrat-1.13/libUseful-4/Stream.c:313: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. S->InputBuff=memcpy(S->InputBuff,ibuf+S->InStart,S->InEnd-S->InStart); data/hashrat-1.13/libUseful-4/Stream.c:317:23: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. S->OutputBuff=memcpy(S->OutputBuff,obuf,S->OutEnd); data/hashrat-1.13/libUseful-4/Stream.c:625: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(InBuff,OutputBuff,len); data/hashrat-1.13/libUseful-4/Stream.c:646: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(S->InputBuff + S->InEnd, p_Input, len); data/hashrat-1.13/libUseful-4/Stream.c:768:12: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). fd=mkstemp(NewPath); data/hashrat-1.13/libUseful-4/Stream.c:777:10: [2] (misc) open: 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). fd=open(NewPath, Mode, 0600); data/hashrat-1.13/libUseful-4/Stream.c:782:12: [2] (misc) open: 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). fd=open(Path, Mode, 0600); data/hashrat-1.13/libUseful-4/Stream.c:850:49: [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 (StrValid(ptr)) STREAMSetTimeout(Stream, atoi(ptr)); data/hashrat-1.13/libUseful-4/Stream.c:1056:48: [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 (StrValid(ptr)) STREAMSetTimeout(S, atoi(ptr)); data/hashrat-1.13/libUseful-4/Stream.c:1183:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). val=atoi(Curr->Item); data/hashrat-1.13/libUseful-4/Stream.c:1389: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(Dest,S->InputBuff+S->InStart,bytes); data/hashrat-1.13/libUseful-4/Stream.c:1546: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(TempBuff,*OutData,*OutLen); data/hashrat-1.13/libUseful-4/Stream.c:1578: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(S->OutputBuff+S->OutEnd,ptr,avail); data/hashrat-1.13/libUseful-4/Stream.c:1738:18: [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 (len > 0) memcpy(Buffer,S->InputBuff + S->InStart,len); data/hashrat-1.13/libUseful-4/Stream.c:1751: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(S->InputBuff + S->InStart, Bytes, len); data/hashrat-1.13/libUseful-4/Stream.c:1762: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(S->InputBuff,Bytes,len); data/hashrat-1.13/libUseful-4/String.c:38:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return(atoi(str)); data/hashrat-1.13/libUseful-4/String.c:299: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(ptr+len, sptr, ilen); data/hashrat-1.13/libUseful-4/String.c:464: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(ptr,"%x",2); data/hashrat-1.13/libUseful-4/String.c:544: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 temp[2]; data/hashrat-1.13/libUseful-4/String.c:575: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(actb_ptr+DestLen,Bytes,NoOfBytes); data/hashrat-1.13/libUseful-4/String.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 hex[10]; data/hashrat-1.13/libUseful-4/Terminal.c:128: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 KeyStr[2]; data/hashrat-1.13/libUseful-4/Terminal.c:1368:9: [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). val=atoi(Tempstr); data/hashrat-1.13/libUseful-4/Terminal.c:1939:20: [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 (ptr) top = atoi(ptr); data/hashrat-1.13/libUseful-4/Terminal.c:1942:23: [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 (ptr) bottom = atoi(ptr); data/hashrat-1.13/libUseful-4/base64.c: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 base64vals[255]; data/hashrat-1.13/libUseful-4/jh_ref.c:5:23: [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 const unsigned char roundconstant_zero[64] = {0x6,0xa,0x0,0x9,0xe,0x6,0x6,0x7,0xf,0x3,0xb,0xc,0xc,0x9,0x0,0x8,0xb,0x2,0xf,0xb,0x1,0x3,0x6,0x6,0xe,0xa,0x9,0x5,0x7,0xd,0x3,0xe,0x3,0xa,0xd,0xe,0xc,0x1,0x7,0x5,0x1,0x2,0x7,0x7,0x5,0x0,0x9,0x9,0xd,0xa,0x2,0xf,0x5,0x9,0x0,0xb,0x0,0x6,0x6,0x7,0x3,0x2,0x2,0xa}; data/hashrat-1.13/libUseful-4/jh_ref.c:8: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. static unsigned char S[2][16] = {{9,0,4,11,13,12,3,15,1,10,2,6,7,5,8,14},{3,12,6,13,5,7,1,9,15,2,0,4,11,10,14,8}}; data/hashrat-1.13/libUseful-4/jh_ref.c:27: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. unsigned char tem[256],t; data/hashrat-1.13/libUseful-4/jh_ref.c:28: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. unsigned char roundconstant_expanded[256]; /*the round constant expanded into 256 1-bit element;*/ data/hashrat-1.13/libUseful-4/jh_ref.c:79: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. unsigned char tem[64],t; data/hashrat-1.13/libUseful-4/jh_ref.c:121: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. unsigned char tem[256]; data/hashrat-1.13/libUseful-4/jh_ref.c:150: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. unsigned char tem[256]; data/hashrat-1.13/libUseful-4/jh_ref.c:252: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(state->buffer + (state->datasize_in_buffer >> 3), data, 64-(state->datasize_in_buffer >> 3)) ; data/hashrat-1.13/libUseful-4/jh_ref.c:254:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. else memcpy(state->buffer + (state->datasize_in_buffer >> 3), data, 64-(state->datasize_in_buffer >> 3)+1) ; data/hashrat-1.13/libUseful-4/jh_ref.c:262: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( state->buffer + (state->datasize_in_buffer >> 3), data, 64-(state->datasize_in_buffer >> 3) ) ; data/hashrat-1.13/libUseful-4/jh_ref.c:272: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(state->buffer, data+index, 64); data/hashrat-1.13/libUseful-4/jh_ref.c:280: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(state->buffer, data+index, (databitlen & 0x1ff) >> 3); data/hashrat-1.13/libUseful-4/jh_ref.c:282: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(state->buffer, data+index, ((databitlen & 0x1ff) >> 3)+1); data/hashrat-1.13/libUseful-4/jh_ref.c:338: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(hashval,state->H+100,len); data/hashrat-1.13/libUseful-4/jh_ref.c:342: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(hashval,state->H+96, len); data/hashrat-1.13/libUseful-4/jh_ref.c:346: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(hashval,state->H+80, len); data/hashrat-1.13/libUseful-4/jh_ref.c:350: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(hashval,state->H+64, len); data/hashrat-1.13/libUseful-4/jh_ref.h:29: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. unsigned char H[128]; /*the hash value H; 128 bytes;*/ data/hashrat-1.13/libUseful-4/jh_ref.h:30: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. unsigned char A[256]; /*the temporary round value; 256 4-bit elements*/ data/hashrat-1.13/libUseful-4/jh_ref.h:31: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. unsigned char roundconstant[64]; /*round constant for one round; 64 4-bit elements*/ data/hashrat-1.13/libUseful-4/jh_ref.h:32: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. unsigned char buffer[64]; /*the message block to be hashed; 64 bytes*/ data/hashrat-1.13/libUseful-4/md5.h:14: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. unsigned char in[64]; data/hashrat-1.13/libUseful-4/md5.h:20:24: [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. void MD5Final(unsigned char digest[16], struct MD5Context *context); data/hashrat-1.13/libUseful-4/md5c.c:112:24: [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. void MD5Final(unsigned char digest[16], struct MD5Context *ctx) data/hashrat-1.13/libUseful-4/sha1.c:47:23: [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 const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; data/hashrat-1.13/libUseful-4/sha1.c:72: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 (cp, &v, sizeof v); data/hashrat-1.13/libUseful-4/sha1.c:108: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 (&((char *) ctx->buffer)[bytes], fillbuf, (size - 2) * 4 - bytes); data/hashrat-1.13/libUseful-4/sha1.c:126: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 (&((char *) ctx->buffer)[left_over], buffer, add); data/hashrat-1.13/libUseful-4/sha1.c:135: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 (ctx->buffer, data/hashrat-1.13/libUseful-4/sha1.c:153:37: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. sha1_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx); data/hashrat-1.13/libUseful-4/sha1.c:171: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 (&((char *) ctx->buffer)[left_over], buffer, len); data/hashrat-1.13/libUseful-4/sha1.c:177: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 (ctx->buffer, &ctx->buffer[16], left_over); data/hashrat-1.13/libUseful-4/sha2.c:176:29: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define MEMCPY_BCOPY(d,s,l) memcpy((d), (s), (l)) data/hashrat-1.13/libUseful-4/sha2.c:180:29: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define MEMCPY_BCOPY(d,s,l) bcopy((s), (d), (l)) data/hashrat-1.13/libUseful-4/sha2.c:693: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. char* SHA2_SHA256_Data(const sha2_byte* data, size_t len, char digest[SHA2_SHA256_DIGEST_STRING_LENGTH]) data/hashrat-1.13/libUseful-4/sha2.c:1059: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. char* SHA2_SHA512_Data(const sha2_byte* data, size_t len, char digest[SHA2_SHA512_DIGEST_STRING_LENGTH]) data/hashrat-1.13/libUseful-4/sha2.c:1146: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. char* SHA2_SHA384_Data(const sha2_byte* data, size_t len, char digest[SHA2_SHA384_DIGEST_STRING_LENGTH]) data/hashrat-1.13/libUseful-4/whirlpool.c:1688: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(&buffer[WBLOCKBYTES - LENGTHBYTES], bitLength, LENGTHBYTES); data/hashrat-1.13/libUseful-4/whirlpool.h:22: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. unsigned char bitLength[LENGTHBYTES]; /* global number of hashed bits (256-bit counter) */ data/hashrat-1.13/libUseful-4/whirlpool.h:23: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. unsigned char buffer[WBLOCKBYTES]; /* buffer of data to hash */ data/hashrat-1.13/ssh.c:108:16: [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). Stat->st_ino=atol(Token); data/hashrat-1.13/ssh.c:151:16: [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). Stat->st_uid=atol(Token); data/hashrat-1.13/ssh.c:155:16: [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). Stat->st_gid=atol(Token); data/hashrat-1.13/ssh.c:159: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). Stat->st_size=atol(Token); data/hashrat-1.13/libUseful-4/ConnectionChain.c:144: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). passlen=strlen(Pass); data/hashrat-1.13/libUseful-4/ConnectionChain.c:417:17: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(200000); data/hashrat-1.13/libUseful-4/ConnectionChain.c:429:13: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(200000); data/hashrat-1.13/libUseful-4/Encodings.c:59:21: [1] (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 character. if (val==0) strcpy(Buff,"z"); data/hashrat-1.13/libUseful-4/Expect.c:85:16: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/hashrat-1.13/libUseful-4/GeneralFunctions.c:268:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len=read(fd,RandomBytes,ReqLen); data/hashrat-1.13/libUseful-4/GeneralFunctions.c:320:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fd > -1) read(fd,&val,1); data/hashrat-1.13/libUseful-4/Http.c:474: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 (endptr==NULL) endptr=startptr+strlen(Str); data/hashrat-1.13/libUseful-4/Http.c:791: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). len=strlen(Tempstr); data/hashrat-1.13/libUseful-4/OpenSSL.c:504:17: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(300); data/hashrat-1.13/libUseful-4/OpenSSL.c:634:25: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(300); data/hashrat-1.13/libUseful-4/PatternMatch.c:19:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ValStr,P_Ptr,2); data/hashrat-1.13/libUseful-4/PatternMatch.c:25:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ValStr,P_Ptr,3); data/hashrat-1.13/libUseful-4/Process.c:953:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0); data/hashrat-1.13/libUseful-4/Socket.c:435:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, Interface, IFNAMSIZ-1); data/hashrat-1.13/libUseful-4/Socket.c:471:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, Interface, IFNAMSIZ-1); data/hashrat-1.13/libUseful-4/Stream.c:1340:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes_read=read(S->in_fd, tmpBuff, val); data/hashrat-1.13/libUseful-4/Stream.c:1655:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). result=STREAMWriteBytes(S,Buffer,strlen(Buffer)); data/hashrat-1.13/libUseful-4/Stream.c:1664:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). result=STREAMWriteBytes(S,Buffer,strlen(Buffer)); data/hashrat-1.13/libUseful-4/String.c:187: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). return(strlen(Str)); data/hashrat-1.13/libUseful-4/String.c:815:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(hex, in, 4); data/hashrat-1.13/libUseful-4/String.h:50: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). #define StrLen(str) ( (str) ? strlen(str) : 0 ) data/hashrat-1.13/libUseful-4/UnixSocket.c:34:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sa->sun_path,Path,len); data/hashrat-1.13/libUseful-4/sha2.c:88:32: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. #error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN ANALYSIS SUMMARY: Hits = 232 Lines analyzed = 34826 in approximately 0.90 seconds (38904 lines/second) Physical Source Lines of Code (SLOC) = 24053 Hits@level = [0] 252 [1] 24 [2] 173 [3] 18 [4] 12 [5] 5 Hits@level+ = [0+] 484 [1+] 232 [2+] 208 [3+] 35 [4+] 17 [5+] 5 Hits/KSLOC@level+ = [0+] 20.1222 [1+] 9.64537 [2+] 8.64757 [3+] 1.45512 [4+] 0.706773 [5+] 0.207874 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.