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/yagiuda-1.19/src/dipole.c Examining data/yagiuda-1.19/src/self2.c Examining data/yagiuda-1.19/src/nrutil.c Examining data/yagiuda-1.19/src/ci.c Examining data/yagiuda-1.19/src/cis_hack.c Examining data/yagiuda-1.19/src/com_hack.c Examining data/yagiuda-1.19/src/yagi.h Examining data/yagiuda-1.19/src/first.c Examining data/yagiuda-1.19/src/write_input_data.c Examining data/yagiuda-1.19/src/string.c Examining data/yagiuda-1.19/src/usage_first.c Examining data/yagiuda-1.19/src/version.c Examining data/yagiuda-1.19/src/new_length.c Examining data/yagiuda-1.19/src/usage_input.c Examining data/yagiuda-1.19/src/read_yagi_data.c Examining data/yagiuda-1.19/src/lud_hack.c Examining data/yagiuda-1.19/src/lub_hack.c Examining data/yagiuda-1.19/src/set_mean_structure.c Examining data/yagiuda-1.19/src/set_performance_structures.c Examining data/yagiuda-1.19/src/print_z_matrix.c Examining data/yagiuda-1.19/src/mpr_hack.c Examining data/yagiuda-1.19/src/genetic.c Examining data/yagiuda-1.19/src/random.c Examining data/yagiuda-1.19/src/change_max_percentage_changes.c Examining data/yagiuda-1.19/src/usage_optimise.c Examining data/yagiuda-1.19/src/optimising_for.c Examining data/yagiuda-1.19/src/print_relavent_performance_data.c Examining data/yagiuda-1.19/src/subtract_structures.c Examining data/yagiuda-1.19/src/cin.c Examining data/yagiuda-1.19/src/dynamic.c Examining data/yagiuda-1.19/src/output.c Examining data/yagiuda-1.19/src/usage_output.c Examining data/yagiuda-1.19/src/write_gnuplot_header.c Examining data/yagiuda-1.19/src/zbr_hack.c Examining data/yagiuda-1.19/src/rantest.c Examining data/yagiuda-1.19/src/selftest.c Examining data/yagiuda-1.19/src/yagi.c Examining data/yagiuda-1.19/src/usage_yagi.c Examining data/yagiuda-1.19/src/display_antenna_currents.c Examining data/yagiuda-1.19/src/nrutil.h Examining data/yagiuda-1.19/src/com_hack.h Examining data/yagiuda-1.19/src/dobetter.c Examining data/yagiuda-1.19/src/linear.c Examining data/yagiuda-1.19/src/max_side.c Examining data/yagiuda-1.19/src/nr_hack.h Examining data/yagiuda-1.19/src/error_message.c Examining data/yagiuda-1.19/src/getopt.c Examining data/yagiuda-1.19/src/genetic_algorithm_lib.c Examining data/yagiuda-1.19/src/power_input.c Examining data/yagiuda-1.19/src/auto.c Examining data/yagiuda-1.19/src/get_number_of_elements.c Examining data/yagiuda-1.19/src/self.c Examining data/yagiuda-1.19/src/perform.c Examining data/yagiuda-1.19/src/mutual.c Examining data/yagiuda-1.19/src/sens.c Examining data/yagiuda-1.19/src/randomise.c Examining data/yagiuda-1.19/src/get_command_line_options.c Examining data/yagiuda-1.19/src/test_stop.c Examining data/yagiuda-1.19/src/read_header.c Examining data/yagiuda-1.19/src/better.c Examining data/yagiuda-1.19/src/fitness.c Examining data/yagiuda-1.19/src/globals.h Examining data/yagiuda-1.19/src/fill_v_vector.c Examining data/yagiuda-1.19/src/vswr.c Examining data/yagiuda-1.19/src/show_all_optimise_parameters.c Examining data/yagiuda-1.19/src/z_input.c Examining data/yagiuda-1.19/src/gaussian.c Examining data/yagiuda-1.19/src/max_gain.c Examining data/yagiuda-1.19/src/reflection_coefficient.c Examining data/yagiuda-1.19/src/input.c Examining data/yagiuda-1.19/src/end_stop.c Examining data/yagiuda-1.19/src/write_gain.c Examining data/yagiuda-1.19/src/test2.c Examining data/yagiuda-1.19/src/getfiles.c Examining data/yagiuda-1.19/src/solve.c Examining data/yagiuda-1.19/src/copy_matrix.c Examining data/yagiuda-1.19/src/optimise.c Examining data/yagiuda-1.19/src/gain.c Examining data/yagiuda-1.19/src/fill_z_matrix.c Examining data/yagiuda-1.19/src/write_coordinates.c Examining data/yagiuda-1.19/src/write_header_to_disk.c Examining data/yagiuda-1.19/src/check_flags.c FINAL RESULTS: data/yagiuda-1.19/src/dynamic.c:33:5: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. gets(str); data/yagiuda-1.19/src/dynamic.c:39:5: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. gets(str); data/yagiuda-1.19/src/input.c:60:2: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. gets(notes); data/yagiuda-1.19/src/input.c:62:2: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. gets(filename); data/yagiuda-1.19/src/dynamic.c:19:4: [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. system("rm change"); data/yagiuda-1.19/src/dynamic.c:26:5: [4] (buffer) scanf: 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. scanf("%s",str); data/yagiuda-1.19/src/genetic_algorithm_lib.c:276:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(Pop2[c++].gene,Pop1[a].gene) ; data/yagiuda-1.19/src/genetic_algorithm_lib.c:281:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(Pop2[d].gene,Pop1[b].gene) ; data/yagiuda-1.19/src/genetic_algorithm_lib.c:295:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(Pop2[a].gene,Pop1[b].gene); data/yagiuda-1.19/src/genetic_algorithm_lib.c:296:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(Pop2[a+1].gene,Pop1[c].gene); data/yagiuda-1.19/src/get_number_of_elements.c:32:4: [4] (buffer) sscanf: 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. sscanf(line,"%s %d\n", null, &num_elements); data/yagiuda-1.19/src/get_number_of_elements.c:36:4: [4] (buffer) sscanf: 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. sscanf(line,"%s %d\n", null, driven); data/yagiuda-1.19/src/get_number_of_elements.c:40:4: [4] (buffer) sscanf: 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. sscanf(line,"%s %d\n", null, parasitic); data/yagiuda-1.19/src/getfiles.c:17:2: [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(input, argv[optind]); data/yagiuda-1.19/src/getfiles.c:18:2: [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(output, argv[optind]); data/yagiuda-1.19/src/optimise.c:66:2: [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(update_filename,argv[optind]); data/yagiuda-1.19/src/optimise.c:70:2: [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(input_filename,argv[optind]); data/yagiuda-1.19/src/optimise.c:79:2: [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(output_filename,input_filename); data/yagiuda-1.19/src/output.c:111:2: [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(input_filename, argv[optind]); data/yagiuda-1.19/src/output.c:112:2: [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(original_filename, argv[optind]); data/yagiuda-1.19/src/output.c:113:2: [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(output_filename, *(argv+optind)); data/yagiuda-1.19/src/output.c:114:2: [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(gain_filename, *(argv+optind)); data/yagiuda-1.19/src/output.c:156:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gnuplot_log_command_filename,"%s.glog",original_filename); data/yagiuda-1.19/src/output.c:157:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gnuplot_lin_command_filename,"%s.glin",original_filename); data/yagiuda-1.19/src/output.c:222:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gnuplot_filename,"%s.%.4f.g",original_filename,f/1e6); data/yagiuda-1.19/src/read_yagi_data.c:30:4: [4] (buffer) sscanf: 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. sscanf(one_line,"%s %lf", null, step_frequency); data/yagiuda-1.19/src/read_yagi_data.c:35:4: [4] (buffer) sscanf: 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. sscanf(one_line,"%s %lf", null, min_frequency); data/yagiuda-1.19/src/read_yagi_data.c:40:4: [4] (buffer) sscanf: 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. sscanf(one_line,"%s %lf", null, max_frequency); data/yagiuda-1.19/src/read_yagi_data.c:45:4: [4] (buffer) sscanf: 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. sscanf(one_line,"%s %lf", null, angular_step); data/yagiuda-1.19/src/read_yagi_data.c:49:4: [4] (buffer) sscanf: 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. sscanf(one_line,"%s %lf", null, frequency); data/yagiuda-1.19/src/random.c:50:9: [3] (random) drand48: 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. return(drand48()); data/yagiuda-1.19/src/random.c:75:16: [3] (random) lrand48: 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. return( (int) lrand48()/65535 ); data/yagiuda-1.19/src/dobetter.c:23: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). update_fp=fopen(update_filename,"a"); data/yagiuda-1.19/src/dobetter.c:34:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp_out=fopen(output_filename,"wt"); data/yagiuda-1.19/src/dynamic.c:17: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). if((fopen("change","rt"))!=NULL) data/yagiuda-1.19/src/end_stop.c:13:6: [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(fopen("stop","rt") != NULL) data/yagiuda-1.19/src/first.c:53:11: [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). elements=atoi(argv[optind+1]); data/yagiuda-1.19/src/first.c:69:5: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp=fopen(*(argv+1),"wt"); data/yagiuda-1.19/src/genetic_algorithm_lib.c:107:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char c[2] ; data/yagiuda-1.19/src/genetic_algorithm_lib.c:218: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 *) &T,(char *) &Pop1[inner],sizeof(GeneRecord)) ; data/yagiuda-1.19/src/genetic_algorithm_lib.c:219: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 *) &Pop1[inner],(char *) &Pop1[inner+1],sizeof(GeneRecord)) ; data/yagiuda-1.19/src/genetic_algorithm_lib.c:220: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 *) &Pop1[inner+1],(char *) &T,sizeof(GeneRecord)) ; data/yagiuda-1.19/src/get_command_line_options.c:39:19: [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). flag -> Cflg=atoi(optarg); data/yagiuda-1.19/src/get_command_line_options.c:42: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). flag->Aflg=atoi(optarg)+1000; data/yagiuda-1.19/src/get_command_line_options.c:50: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). flag->Wflg=atoi(optarg); data/yagiuda-1.19/src/get_command_line_options.c:229: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). flag->oflg=atoi(optarg); data/yagiuda-1.19/src/get_command_line_options.c:246:18: [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). K_times_max=atoi(optarg); data/yagiuda-1.19/src/get_command_line_options.c:287: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). flag->eflg=atoi(optarg); data/yagiuda-1.19/src/get_command_line_options.c:306: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). flag->gflg=atoi(optarg); data/yagiuda-1.19/src/get_command_line_options.c:320: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). popsize=atoi(optarg); data/yagiuda-1.19/src/get_number_of_elements.c:18:6: [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). ifp=fopen(input_filename, "rt"); data/yagiuda-1.19/src/getfiles.c:19:2: [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(output,".out"); data/yagiuda-1.19/src/getopt.c:45: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 errbuf[2]; data/yagiuda-1.19/src/input.c:83:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(type, "\"\""); data/yagiuda-1.19/src/input.c:88:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(type, "mm"); data/yagiuda-1.19/src/input.c:93:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(type, "lambda"); data/yagiuda-1.19/src/input.c:201:5: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp=fopen(filename,"wt"); data/yagiuda-1.19/src/optimise.c:19:2: [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 *input_filename, notes[1000]; data/yagiuda-1.19/src/optimise.c:55: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). iterations=atoi(argv[optind+1]); data/yagiuda-1.19/src/optimise.c:67:2: [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(update_filename,".up"); data/yagiuda-1.19/src/optimise.c:68:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). update_fp=fopen(update_filename,"wt"); /* Remove filname.up */ data/yagiuda-1.19/src/optimise.c:71:5: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp=fopen(input_filename,"rt"); data/yagiuda-1.19/src/optimise.c:80:2: [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(output_filename,".bes"); data/yagiuda-1.19/src/optimise.c:81:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp_out=fopen(output_filename,"wb"); /* Remove filname.bes */ data/yagiuda-1.19/src/optimise.c:137:3: [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(notes,"This has been run through optimise and optimised for \ data/yagiuda-1.19/src/output.c:116:2: [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(input_filename,".out"); data/yagiuda-1.19/src/output.c:117:2: [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(output_filename,".dat"); data/yagiuda-1.19/src/output.c:118:2: [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(gain_filename,".gai"); data/yagiuda-1.19/src/output.c:119:6: [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). ifp=fopen(input_filename,"rb"); data/yagiuda-1.19/src/output.c:120:6: [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). ofp=fopen(output_filename,"wb"); data/yagiuda-1.19/src/output.c:121:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). gain_fp=fopen(gain_filename,"wt"); data/yagiuda-1.19/src/output.c:158:35: [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). gnuplot_log_command_filename_fp=fopen(gnuplot_log_command_filename,"w"); data/yagiuda-1.19/src/output.c:159:35: [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). gnuplot_lin_command_filename_fp=fopen(gnuplot_lin_command_filename,"w"); data/yagiuda-1.19/src/output.c:223:24: [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). gnuplot_filename_fp=fopen(gnuplot_filename,"w"); data/yagiuda-1.19/src/read_yagi_data.c:17:6: [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). ifp=fopen(input_filename, "rt"); data/yagiuda-1.19/src/test_stop.c:10:9: [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 ( fopen("stop","r") !=NULL ) data/yagiuda-1.19/src/yagi.c:102:6: [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). ofp=fopen(output_filename,"wb"); data/yagiuda-1.19/src/dynamic.c:21:6: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c=getc(stdin); data/yagiuda-1.19/src/genetic_algorithm_lib.c:171:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(s1)!=strlen(s2)) GA_Error((char *)"Gene length mismatch for crossover") ; data/yagiuda-1.19/src/genetic_algorithm_lib.c:171:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(s1)!=strlen(s2)) GA_Error((char *)"Gene length mismatch for crossover") ; data/yagiuda-1.19/src/genetic_algorithm_lib.c:173: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). for (point=(randint()%(strlen(s1)-2))+1 ; point <strlen(s1) ; point++) data/yagiuda-1.19/src/genetic_algorithm_lib.c:173: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). for (point=(randint()%(strlen(s1)-2))+1 ; point <strlen(s1) ; point++) data/yagiuda-1.19/src/genetic_algorithm_lib.c:184: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). s1[randint()%strlen(s1)]^=1 ; data/yagiuda-1.19/src/genetic_algorithm_lib.c:190: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). for (point=0 ; point <(strlen(s1)-1) ; point++ ) data/yagiuda-1.19/src/getopt.c:51:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (void) fwrite(argv[0], (unsigned)strlen(argv[0]),1,stderr); data/yagiuda-1.19/src/getopt.c:52:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (void) fwrite(s, (unsigned)strlen(s),1,stderr); ANALYSIS SUMMARY: Hits = 86 Lines analyzed = 6601 in approximately 0.24 seconds (27248 lines/second) Physical Source Lines of Code (SLOC) = 5234 Hits@level = [0] 335 [1] 9 [2] 45 [3] 2 [4] 26 [5] 4 Hits@level+ = [0+] 421 [1+] 86 [2+] 77 [3+] 32 [4+] 30 [5+] 4 Hits/KSLOC@level+ = [0+] 80.4356 [1+] 16.431 [2+] 14.7115 [3+] 6.11387 [4+] 5.73175 [5+] 0.764234 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.