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/tinysvm-0.09+dfsg/src/example.h Examining data/tinysvm-0.09+dfsg/src/qp_solver.cpp Examining data/tinysvm-0.09+dfsg/src/example.cpp Examining data/tinysvm-0.09+dfsg/src/qp_solver.h Examining data/tinysvm-0.09+dfsg/src/svm_solver.h Examining data/tinysvm-0.09+dfsg/src/svm_model.cpp Examining data/tinysvm-0.09+dfsg/src/model.cpp Examining data/tinysvm-0.09+dfsg/src/timer.h Examining data/tinysvm-0.09+dfsg/src/base_solver.h Examining data/tinysvm-0.09+dfsg/src/common.h Examining data/tinysvm-0.09+dfsg/src/model.h Examining data/tinysvm-0.09+dfsg/src/classifier.h Examining data/tinysvm-0.09+dfsg/src/getopt.c Examining data/tinysvm-0.09+dfsg/src/getopt.h Examining data/tinysvm-0.09+dfsg/src/svm_solver.cpp Examining data/tinysvm-0.09+dfsg/src/svr_solver.cpp Examining data/tinysvm-0.09+dfsg/src/getopt1.c Examining data/tinysvm-0.09+dfsg/src/misc.h Examining data/tinysvm-0.09+dfsg/src/svm_learn.cpp Examining data/tinysvm-0.09+dfsg/src/q_matrix.h Examining data/tinysvm-0.09+dfsg/src/tinysvm.h Examining data/tinysvm-0.09+dfsg/src/classifier.cpp Examining data/tinysvm-0.09+dfsg/src/svr_solver.h Examining data/tinysvm-0.09+dfsg/src/q_matrix.cpp Examining data/tinysvm-0.09+dfsg/src/param.h Examining data/tinysvm-0.09+dfsg/src/oneclass_solver.h Examining data/tinysvm-0.09+dfsg/src/oneclass_solver.cpp Examining data/tinysvm-0.09+dfsg/src/svm_classify.cpp Examining data/tinysvm-0.09+dfsg/src/cache.h Examining data/tinysvm-0.09+dfsg/src/kernel.h Examining data/tinysvm-0.09+dfsg/src/param.cpp Examining data/tinysvm-0.09+dfsg/src/base_example.h Examining data/tinysvm-0.09+dfsg/src/base_example.cpp Examining data/tinysvm-0.09+dfsg/acconfig.h FINAL RESULTS: data/tinysvm-0.09+dfsg/src/base_example.cpp:301: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(stre, tmp); data/tinysvm-0.09+dfsg/src/example.cpp:50: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 (tmp, p.model); data/tinysvm-0.09+dfsg/src/model.cpp:230:3: [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. fscanf (fp, "%s Version %s%*[^\n]\n", tmpbuf, version); data/tinysvm-0.09+dfsg/src/model.cpp:236:3: [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. fscanf (fp, "%s%*[^\n]\n", tmpbuf); data/tinysvm-0.09+dfsg/src/param.cpp:165: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 (model, optarg); data/tinysvm-0.09+dfsg/src/param.cpp:200:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stdout, TINYSVM_OPTION_INFO1, argv[0]); data/tinysvm-0.09+dfsg/src/param.cpp:201:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stdout, TINYSVM_OPTION_INFO2); data/tinysvm-0.09+dfsg/src/param.cpp:219: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 (buf, s); data/tinysvm-0.09+dfsg/src/svm_learn.cpp:81: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 (tmp, argv[argc-1]); data/tinysvm-0.09+dfsg/src/getopt.c:210:7: [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 *getenv (); data/tinysvm-0.09+dfsg/src/getopt.c:401:21: [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. posixly_correct = getenv ("POSIXLY_CORRECT"); data/tinysvm-0.09+dfsg/src/getopt.c:967:1: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt (argc, argv, optstring) data/tinysvm-0.09+dfsg/src/getopt.c:997:11: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt (argc, argv, "abc:d:0123456789"); data/tinysvm-0.09+dfsg/src/getopt.h:129:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (int argc, char *const *argv, const char *shortopts); data/tinysvm-0.09+dfsg/src/getopt.h:131:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (); data/tinysvm-0.09+dfsg/src/getopt.h:133:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long (int argc, char *const *argv, const char *shortopts, data/tinysvm-0.09+dfsg/src/getopt.h:146:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt(...); data/tinysvm-0.09+dfsg/src/getopt.h:148:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt(); data/tinysvm-0.09+dfsg/src/getopt.h:151:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long (...); data/tinysvm-0.09+dfsg/src/getopt.h:154:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long (); data/tinysvm-0.09+dfsg/src/getopt1.c:66:1: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt_long (argc, argv, options, long_options, opt_index) data/tinysvm-0.09+dfsg/src/getopt1.c:122:11: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long (argc, argv, "abc:d:0123456789", data/tinysvm-0.09+dfsg/src/param.cpp:141:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int opt = getopt_long (argc, argv, short_options, long_options, NULL); data/tinysvm-0.09+dfsg/src/svm_classify.cpp:57:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int opt = getopt_long (argc, argv, short_options, long_options, NULL); data/tinysvm-0.09+dfsg/src/svm_model.cpp:84:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int opt = getopt_long (argc, argv, short_options, long_options, NULL); data/tinysvm-0.09+dfsg/src/base_example.cpp:95: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). _x[j].index = atoi (s + i); data/tinysvm-0.09+dfsg/src/base_example.cpp:297:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (stre, "%.16g", y[i]); data/tinysvm-0.09+dfsg/src/base_example.cpp:298: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 tmp[32]; data/tinysvm-0.09+dfsg/src/base_example.cpp:300:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (tmp, " %d:%.16g", node->index, node->value); data/tinysvm-0.09+dfsg/src/base_example.cpp:420:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen (filename, mode); data/tinysvm-0.09+dfsg/src/base_example.cpp:438:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen (filename, mode); data/tinysvm-0.09+dfsg/src/common.h:98: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. #define memcpy(a,b,c) bcopy((b),(a),(c)) data/tinysvm-0.09+dfsg/src/common.h:98:23: [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(a,b,c) bcopy((b),(a),(c)) data/tinysvm-0.09+dfsg/src/common.h:100:32: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. template <class T> inline void memcpy(T* &a, T &b, int c) data/tinysvm-0.09+dfsg/src/common.h:133: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 ((void *)dst, (void *)src, sizeof(T)*n); data/tinysvm-0.09+dfsg/src/common.h:141: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 ((void *)dst, (void *)ptr, sizeof(T)*n); data/tinysvm-0.09+dfsg/src/example.cpp:51: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 (tmp, ".idx"); data/tinysvm-0.09+dfsg/src/example.cpp:98:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen (filename, mode); data/tinysvm-0.09+dfsg/src/example.cpp:122:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen (filename, mode); data/tinysvm-0.09+dfsg/src/getopt.c:329:4: [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 (new_str, __getopt_nonoption_flags, nonoption_flags_max_len); data/tinysvm-0.09+dfsg/src/getopt.c:441: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 (__getopt_nonoption_flags, orig_str, len); data/tinysvm-0.09+dfsg/src/model.cpp:220:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen (filename, mode); data/tinysvm-0.09+dfsg/src/model.cpp:225: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 tmpbuf[1024]; data/tinysvm-0.09+dfsg/src/model.cpp:226: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 version[512]; data/tinysvm-0.09+dfsg/src/model.cpp:272:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen (filename, mode); data/tinysvm-0.09+dfsg/src/param.cpp:146: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). solver_type = atoi(optarg); data/tinysvm-0.09+dfsg/src/param.cpp:149: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). kernel_type = atoi (optarg); data/tinysvm-0.09+dfsg/src/param.cpp:153: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). degree = atoi (optarg); data/tinysvm-0.09+dfsg/src/param.cpp:174: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). shrink_size = atoi (optarg); data/tinysvm-0.09+dfsg/src/param.cpp:180: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). final_check = atoi (optarg); data/tinysvm-0.09+dfsg/src/param.cpp:224: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 *argv[PARAM_MAX_SIZE]; data/tinysvm-0.09+dfsg/src/param.h:52: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 model[512]; data/tinysvm-0.09+dfsg/src/svm_classify.cpp:92: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). if ((fp = fopen (argv[argc - 2], "r")) == NULL) { data/tinysvm-0.09+dfsg/src/svm_learn.cpp:82:6: [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 (tmp, ".idx"); data/tinysvm-0.09+dfsg/src/timer.h:36:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/tinysvm-0.09+dfsg/src/timer.h:73:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%02d:%02d:%02d", hour, min, sec); data/tinysvm-0.09+dfsg/src/base_example.cpp:85:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen (s); data/tinysvm-0.09+dfsg/src/base_example.cpp:223:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc (fp); data/tinysvm-0.09+dfsg/src/base_example.cpp:341:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen (s); data/tinysvm-0.09+dfsg/src/base_example.cpp:401:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen (s); data/tinysvm-0.09+dfsg/src/base_example.h:71:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual int read (const char *, const char *mode = "r", const int offset = 0) = 0; data/tinysvm-0.09+dfsg/src/example.cpp:49:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *tmp = new char [strlen(p.model) + 5]; data/tinysvm-0.09+dfsg/src/example.cpp:56:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (m->read (p.model)) rebuildSVindex (m); data/tinysvm-0.09+dfsg/src/example.cpp:96:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Example::read (const char *filename, const char *mode, const int offset) data/tinysvm-0.09+dfsg/src/example.h:39:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read (const char *, const char *mode = "r", const int offset = 0); data/tinysvm-0.09+dfsg/src/getopt.c:234: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). extern int strlen (const char *); data/tinysvm-0.09+dfsg/src/getopt.c:432: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). int len = nonoption_flags_max_len = strlen (orig_str); data/tinysvm-0.09+dfsg/src/getopt.c:656: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). == (unsigned int) strlen (p->name)) data/tinysvm-0.09+dfsg/src/getopt.c:680: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). nextchar += strlen (nextchar); data/tinysvm-0.09+dfsg/src/getopt.c:710: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). nextchar += strlen (nextchar); data/tinysvm-0.09+dfsg/src/getopt.c:726: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). nextchar += strlen (nextchar); data/tinysvm-0.09+dfsg/src/getopt.c:731: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). nextchar += strlen (nextchar); data/tinysvm-0.09+dfsg/src/getopt.c:842:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((unsigned int) (nameend - nextchar) == strlen (p->name)) data/tinysvm-0.09+dfsg/src/getopt.c:865: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). nextchar += strlen (nextchar); data/tinysvm-0.09+dfsg/src/getopt.c:885: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). nextchar += strlen (nextchar); data/tinysvm-0.09+dfsg/src/getopt.c:899: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). nextchar += strlen (nextchar); data/tinysvm-0.09+dfsg/src/getopt.c:903: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). nextchar += strlen (nextchar); data/tinysvm-0.09+dfsg/src/model.cpp:218:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Model::read (const char *filename, const char *mode, const int offset) data/tinysvm-0.09+dfsg/src/model.h:51:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read (const char *, const char *mode = "r", const int offset = 0); data/tinysvm-0.09+dfsg/src/param.cpp:218:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *buf = new char[strlen (s)]; data/tinysvm-0.09+dfsg/src/param.cpp:220:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen (buf); data/tinysvm-0.09+dfsg/src/svm_classify.cpp:84:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!model.read (argv[argc - 1])) { data/tinysvm-0.09+dfsg/src/svm_classify.cpp:108:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen (line); data/tinysvm-0.09+dfsg/src/svm_learn.cpp:62:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!example.read (argv[argc - 2])) { data/tinysvm-0.09+dfsg/src/svm_learn.cpp:80:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *tmp = new char[strlen(argv[argc-1]) + 5]; data/tinysvm-0.09+dfsg/src/svm_model.cpp:132:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). model.read (argv[argc - 1]); ANALYSIS SUMMARY: Hits = 86 Lines analyzed = 5507 in approximately 0.18 seconds (30897 lines/second) Physical Source Lines of Code (SLOC) = 3443 Hits@level = [0] 170 [1] 30 [2] 31 [3] 16 [4] 9 [5] 0 Hits@level+ = [0+] 256 [1+] 86 [2+] 56 [3+] 25 [4+] 9 [5+] 0 Hits/KSLOC@level+ = [0+] 74.3538 [1+] 24.9782 [2+] 16.2649 [3+] 7.26111 [4+] 2.614 [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.