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/jclassinfo-0.19.1/getopt/getopt.c Examining data/jclassinfo-0.19.1/getopt/getopt.h Examining data/jclassinfo-0.19.1/getopt/getopt1.c Examining data/jclassinfo-0.19.1/jclass/attributes.h Examining data/jclassinfo-0.19.1/jclass/bytecode.h Examining data/jclassinfo-0.19.1/jclass/class.h Examining data/jclassinfo-0.19.1/jclass/class_loader.h Examining data/jclassinfo-0.19.1/jclass/constant_pool.h Examining data/jclassinfo-0.19.1/jclass/field.h Examining data/jclassinfo-0.19.1/jclass/jar.h Examining data/jclassinfo-0.19.1/jclass/jclass.h Examining data/jclassinfo-0.19.1/jclass/jstring.h Examining data/jclassinfo-0.19.1/jclass/manifest.h Examining data/jclassinfo-0.19.1/jclass/types.h Examining data/jclassinfo-0.19.1/jclass/attributes.c Examining data/jclassinfo-0.19.1/jclass/bytecode.c Examining data/jclassinfo-0.19.1/jclass/code_attribute.c Examining data/jclassinfo-0.19.1/jclass/constant_pool.c Examining data/jclassinfo-0.19.1/jclass/field.c Examining data/jclassinfo-0.19.1/jclass/java_file.c Examining data/jclassinfo-0.19.1/jclass/java_buf.c Examining data/jclassinfo-0.19.1/jclass/manifest.c Examining data/jclassinfo-0.19.1/jclass/strtok_r.h Examining data/jclassinfo-0.19.1/jclass/strtok_r.c Examining data/jclassinfo-0.19.1/jclass/class_loader.c Examining data/jclassinfo-0.19.1/jclass/jar.c Examining data/jclassinfo-0.19.1/jclass/open.c Examining data/jclassinfo-0.19.1/jclass/open.h Examining data/jclassinfo-0.19.1/jclass/class.c Examining data/jclassinfo-0.19.1/jclass/jstring.c Examining data/jclassinfo-0.19.1/jclassinfo/attributes.h Examining data/jclassinfo-0.19.1/jclassinfo/attributes.c Examining data/jclassinfo-0.19.1/jclassinfo/attributes_xml.h Examining data/jclassinfo-0.19.1/jclassinfo/attributes_xml.c Examining data/jclassinfo-0.19.1/jclassinfo/constant_pool.h Examining data/jclassinfo-0.19.1/jclassinfo/constant_pool.c Examining data/jclassinfo-0.19.1/jclassinfo/class.c Examining data/jclassinfo-0.19.1/jclassinfo/common.h Examining data/jclassinfo-0.19.1/jclassinfo/field.h Examining data/jclassinfo-0.19.1/jclassinfo/field.c Examining data/jclassinfo-0.19.1/jclassinfo/main.c Examining data/jclassinfo-0.19.1/jclassinfo/string_list.h Examining data/jclassinfo-0.19.1/jclassinfo/string_list.c FINAL RESULTS: data/jclassinfo-0.19.1/jclass/class_loader.c:212: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(absolute_class_filename, path->path); data/jclassinfo-0.19.1/jclass/class_loader.c:215:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(absolute_class_filename, class_filename); data/jclassinfo-0.19.1/jclass/class_loader.c:292: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(absolute_class_filename, path->path); data/jclassinfo-0.19.1/jclass/class_loader.c:295:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(absolute_class_filename, class_filename); data/jclassinfo-0.19.1/jclass/class_loader.c:419:20: [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). full_path = strcpy(full_path, jar_path); data/jclassinfo-0.19.1/jclass/class_loader.c:422:20: [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). full_path = strcat(full_path, path_token); data/jclassinfo-0.19.1/jclass/class_loader.c:466: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(bootclasspath, java_home); data/jclassinfo-0.19.1/jclass/class_loader.c:467:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(bootclasspath, BOOTSTRAP_LIB); data/jclassinfo-0.19.1/jclass/class_loader.c:488:20: [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). real_classpath = strcpy(real_classpath, bootclasspath); data/jclassinfo-0.19.1/jclass/class_loader.c:491:20: [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). real_classpath = strcat(real_classpath, classpath); data/jclassinfo-0.19.1/jclass/constant_pool.c:247: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(class_string, &class_name[array_dimensions + 1]); data/jclassinfo-0.19.1/jclass/constant_pool.c:253: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(class_name, class_string); data/jclassinfo-0.19.1/jclass/constant_pool.c:370: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(full_method_name, type); data/jclassinfo-0.19.1/jclass/constant_pool.c:379:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(full_method_name, class_name); data/jclassinfo-0.19.1/jclass/constant_pool.c:384:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(full_method_name, method_name); data/jclassinfo-0.19.1/jclass/constant_pool.c:387:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(full_method_name, parameters); data/jclassinfo-0.19.1/jclass/jstring.c:519:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(params, curr_param); data/jclassinfo-0.19.1/jclass/jstring.c:661: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(class_filename, class_name); data/jclassinfo-0.19.1/jclass/jstring.c:678:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(temp_string, flag); \ data/jclassinfo-0.19.1/jclassinfo/main.c:136:6: [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(stderr, PACKAGE_NAME ": invalid visibility \"%s\".\n",optarg); data/jclassinfo-0.19.1/jclassinfo/main.c:137:6: [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(stderr, PACKAGE_NAME ": valid values: package, protected, private, synthetic.\n"); data/jclassinfo-0.19.1/jclassinfo/main.c:171:3: [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(stderr, PACKAGE_NAME ": No class given.\n"); data/jclassinfo-0.19.1/jclassinfo/main.c:404:3: [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(stderr, PACKAGE_NAME ": Could not load class \"%s\"\n", classname); data/jclassinfo-0.19.1/getopt/getopt.c:218:9: [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. #ifndef getenv data/jclassinfo-0.19.1/getopt/getopt.c:219:14: [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. extern char *getenv (); data/jclassinfo-0.19.1/getopt/getopt.c:404: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/jclassinfo-0.19.1/getopt/getopt.c:1194: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/jclassinfo-0.19.1/getopt/getopt.c:1224: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/jclassinfo-0.19.1/getopt/getopt.h:145: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/jclassinfo-0.19.1/getopt/getopt.h:147: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/jclassinfo-0.19.1/getopt/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 (int ___argc, char *const *___argv, data/jclassinfo-0.19.1/getopt/getopt.h:165: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/jclassinfo-0.19.1/getopt/getopt.h:167: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/jclassinfo-0.19.1/getopt/getopt1.c:71: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/jclassinfo-0.19.1/getopt/getopt1.c:98:18: [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. libc_hidden_def (getopt_long) data/jclassinfo-0.19.1/getopt/getopt1.c:131: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/jclassinfo-0.19.1/jclass/class_loader.c:462: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. char *java_home = getenv("JAVA_HOME"); data/jclassinfo-0.19.1/jclass/class_loader.c:477:6: [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("CLASSPATH") != NULL) data/jclassinfo-0.19.1/jclass/class_loader.c:478:16: [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. classpath = getenv("CLASSPATH"); data/jclassinfo-0.19.1/jclassinfo/main.c:112:19: [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_return = getopt_long(argc, argv, "", long_options, &option_index); data/jclassinfo-0.19.1/jclass/attributes.c:73:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&attribute->cp_index, &(container->contents[0]), 2); data/jclassinfo-0.19.1/jclass/attributes.c:102:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&attribute->filename_index, &(container->contents[0]), 2); data/jclassinfo-0.19.1/jclass/attributes.c:134:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&attribute->no_exceptions, &(container->contents[0]), 2); data/jclassinfo-0.19.1/jclass/attributes.c:144: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(&attribute->exception_index[j], &(container->contents[(j*2) + 2]), 2); data/jclassinfo-0.19.1/jclass/attributes.c:181:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&temp, &(container->contents[0]), 2); data/jclassinfo-0.19.1/jclass/attributes.c:191: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(&temp, &(container->contents[(j*8) + 2]), 2); data/jclassinfo-0.19.1/jclass/attributes.c:193: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(&temp, &(container->contents[(j*8) + 4]), 2); data/jclassinfo-0.19.1/jclass/attributes.c:195: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(&temp, &(container->contents[(j*8) + 6]), 2); data/jclassinfo-0.19.1/jclass/attributes.c:197: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(&temp, &(container->contents[(j*8) + 8]), 2); data/jclassinfo-0.19.1/jclass/bytecode.c:32: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 name[16]; data/jclassinfo-0.19.1/jclass/bytecode.c:453:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&s2op, &code[*pc], 2); data/jclassinfo-0.19.1/jclass/bytecode.c:472:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&u2op, &code[*pc], 2); data/jclassinfo-0.19.1/jclass/bytecode.c:491:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&s4op, &code[*pc], 4); data/jclassinfo-0.19.1/jclass/code_attribute.c:51:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&code->max_stack, &(container->contents[0]), 2); data/jclassinfo-0.19.1/jclass/code_attribute.c:53:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&code->max_locals, &(container->contents[2]), 2); data/jclassinfo-0.19.1/jclass/code_attribute.c:55:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&code->code_length, &(container->contents[4]), 4); data/jclassinfo-0.19.1/jclass/code_attribute.c:61: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(code->code, &(container->contents[8]), code->code_length); data/jclassinfo-0.19.1/jclass/code_attribute.c:67:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&code->exception_table_length, &(container->contents[attribute_offset]), 2); data/jclassinfo-0.19.1/jclass/code_attribute.c:78: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(&temp, &(container->contents[attribute_offset]), 2); data/jclassinfo-0.19.1/jclass/code_attribute.c:82: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(&temp, &(container->contents[attribute_offset]), 2); data/jclassinfo-0.19.1/jclass/code_attribute.c:86: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(&temp, &(container->contents[attribute_offset]), 2); data/jclassinfo-0.19.1/jclass/code_attribute.c:90: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(&temp, &(container->contents[attribute_offset]), 2); data/jclassinfo-0.19.1/jclass/code_attribute.c:98:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&code->attributes_count, &(container->contents[attribute_offset]), 2); data/jclassinfo-0.19.1/jclass/code_attribute.c:108: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(&code->attributes[attribute_counter].name_index, &(container->contents[attribute_offset]), 2); data/jclassinfo-0.19.1/jclass/code_attribute.c:112: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(&code->attributes[attribute_counter].length, &(container->contents[attribute_offset]), 4); data/jclassinfo-0.19.1/jclass/code_attribute.c:121: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(code->attributes[attribute_counter].contents, data/jclassinfo-0.19.1/jclass/constant_pool.c:75: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). classfile = fopen(filename, "rb"); data/jclassinfo-0.19.1/jclass/jar.c:139: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 (zip->ecd, buf + offset, zip->ecd_length); data/jclassinfo-0.19.1/jclass/jar.c:353:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (zip->ent.name, zip->cd + zip->cd_pos + ZIPCFN, data/jclassinfo-0.19.1/jclass/jar.c:396: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 buf[ZIPNAME]; data/jclassinfo-0.19.1/jclass/java_buf.c:43:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&bytes, *buf, 2); data/jclassinfo-0.19.1/jclass/java_buf.c:53:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&bytes, *buf, 4); data/jclassinfo-0.19.1/jclass/java_buf.c:174:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&info->tag, *buf, 1); data/jclassinfo-0.19.1/jclass/java_buf.c:217: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(info->info.utf8->contents, *buf, info->info.utf8->length); data/jclassinfo-0.19.1/jclass/java_buf.c:293: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(attributes[j].contents, *buf, attributes[j].length); data/jclassinfo-0.19.1/jclass/jstring.c:222: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(&number[1],"%f", float_num); data/jclassinfo-0.19.1/jclass/jstring.c:271: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(&number[1],"%f", double_num); data/jclassinfo-0.19.1/jclass/jstring.c:374:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(type,"[]"); data/jclassinfo-0.19.1/jclass/jstring.c:517:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(params, ", "); data/jclassinfo-0.19.1/jclass/jstring.c:668: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(class_filename, ".class"); data/jclassinfo-0.19.1/jclass/jstring.c:693: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 temp_string[256]; data/jclassinfo-0.19.1/jclass/jstring.c:698:3: [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(temp_string, "public"); data/jclassinfo-0.19.1/jclass/jstring.c:700:3: [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(temp_string, "private"); data/jclassinfo-0.19.1/jclass/jstring.c:702:3: [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(temp_string, "protected"); data/jclassinfo-0.19.1/jclass/manifest.c:57: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. buf = memcpy(buf, orig_buf, buf_len); data/jclassinfo-0.19.1/jclass/open.c:31: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). return fopen(file, mode); data/jclassinfo-0.19.1/getopt/getopt.c:241: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 (!defined __STDC__ || !__STDC__) && !defined strlen data/jclassinfo-0.19.1/getopt/getopt.c:244: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/jclassinfo-0.19.1/getopt/getopt.c:435: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/jclassinfo-0.19.1/getopt/getopt.c:663: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/jclassinfo-0.19.1/getopt/getopt.c:708: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/jclassinfo-0.19.1/getopt/getopt.c:774: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/jclassinfo-0.19.1/getopt/getopt.c:808: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/jclassinfo-0.19.1/getopt/getopt.c:813: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/jclassinfo-0.19.1/getopt/getopt.c:1000: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/jclassinfo-0.19.1/getopt/getopt.c:1040: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/jclassinfo-0.19.1/getopt/getopt.c:1078: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/jclassinfo-0.19.1/getopt/getopt.c:1110: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/jclassinfo-0.19.1/getopt/getopt.c:1114: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/jclassinfo-0.19.1/jclass/class.c:79: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). is_filename = ((strlen(filename) > 6) && !strcmp(".class", &filename[strlen(filename) - 6]) || (!strcmp(filename, "-"))); data/jclassinfo-0.19.1/jclass/class.c:79:71: [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). is_filename = ((strlen(filename) > 6) && !strcmp(".class", &filename[strlen(filename) - 6]) || (!strcmp(filename, "-"))); data/jclassinfo-0.19.1/jclass/class_loader.c:187: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(class_name) > 6) && !strcmp(".class", &class_name[strlen(class_name) - 6])) data/jclassinfo-0.19.1/jclass/class_loader.c:187:63: [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(class_name) > 6) && !strcmp(".class", &class_name[strlen(class_name) - 6])) data/jclassinfo-0.19.1/jclass/class_loader.c:199:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path_len = strlen(path->path); data/jclassinfo-0.19.1/jclass/class_loader.c:211:56: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). absolute_class_filename = (char*) malloc(path_len + strlen(class_filename) + 2); data/jclassinfo-0.19.1/jclass/class_loader.c:266:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path_len = strlen(path->path); data/jclassinfo-0.19.1/jclass/class_loader.c:291:56: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). absolute_class_filename = (char*) malloc(path_len + strlen(class_filename) + 2); data/jclassinfo-0.19.1/jclass/class_loader.c:349:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). path = strncpy(path, jar, last_index); data/jclassinfo-0.19.1/jclass/class_loader.c:370:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path_len = strlen(classpath_token); data/jclassinfo-0.19.1/jclass/class_loader.c:418:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). full_path = (char*) malloc(strlen(jar_path) + strlen(path_token) + 2); data/jclassinfo-0.19.1/jclass/class_loader.c:418:54: [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). full_path = (char*) malloc(strlen(jar_path) + strlen(path_token) + 2); data/jclassinfo-0.19.1/jclass/class_loader.c:420: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). full_path[strlen(jar_path)] = SYSTEM_PATH_SLASH; data/jclassinfo-0.19.1/jclass/class_loader.c:421: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). full_path[strlen(jar_path) + 1] = '\0'; data/jclassinfo-0.19.1/jclass/class_loader.c:465:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). bootclasspath = (char*) malloc(strlen(java_home) + strlen(BOOTSTRAP_LIB) + 1); data/jclassinfo-0.19.1/jclass/class_loader.c:465:55: [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). bootclasspath = (char*) malloc(strlen(java_home) + strlen(BOOTSTRAP_LIB) + 1); data/jclassinfo-0.19.1/jclass/class_loader.c:487:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). real_classpath = (char*) malloc(strlen(classpath) + strlen(bootclasspath) + 2); data/jclassinfo-0.19.1/jclass/class_loader.c:487:55: [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). real_classpath = (char*) malloc(strlen(classpath) + strlen(bootclasspath) + 2); data/jclassinfo-0.19.1/jclass/class_loader.c:489: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). real_classpath[strlen(bootclasspath)] = ':'; data/jclassinfo-0.19.1/jclass/class_loader.c:490: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). real_classpath[strlen(bootclasspath) + 1] = '\0'; data/jclassinfo-0.19.1/jclass/constant_pool.c:53: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). is_filename = (strlen(filename) > 6) && !strcmp(".class", &filename[strlen(filename) - 6]); data/jclassinfo-0.19.1/jclass/constant_pool.c:53:70: [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). is_filename = (strlen(filename) > 6) && !strcmp(".class", &filename[strlen(filename) - 6]); data/jclassinfo-0.19.1/jclass/constant_pool.c:195: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). for(i = 0; i < strlen(class_name); i++) data/jclassinfo-0.19.1/jclass/constant_pool.c:207:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if((strlen(class_name) - array_dimensions) == 1) data/jclassinfo-0.19.1/jclass/constant_pool.c:246: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). class_string = (char*) malloc(strlen(class_name) + 1 - array_dimensions); data/jclassinfo-0.19.1/jclass/constant_pool.c:249: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). class_string[strlen(class_string) - 1] = '\0'; data/jclassinfo-0.19.1/jclass/constant_pool.c:252:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). class_name = (char*) malloc(strlen(class_string) + (array_dimensions*2) + 1); data/jclassinfo-0.19.1/jclass/constant_pool.c:258:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). j = strlen(class_name); data/jclassinfo-0.19.1/jclass/constant_pool.c:361: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). string_size = strlen(type) + strlen(method_name) + 2; data/jclassinfo-0.19.1/jclass/constant_pool.c:361:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). string_size = strlen(type) + strlen(method_name) + 2; data/jclassinfo-0.19.1/jclass/constant_pool.c:363: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). string_size += strlen(class_name) + strlen(parameters) + 1; data/jclassinfo-0.19.1/jclass/constant_pool.c:363: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). string_size += strlen(class_name) + strlen(parameters) + 1; data/jclassinfo-0.19.1/jclass/constant_pool.c:371:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(full_method_name, " "); data/jclassinfo-0.19.1/jclass/constant_pool.c:383:4: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(full_method_name, "."); data/jclassinfo-0.19.1/jclass/jstring.c:293:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(descriptor); data/jclassinfo-0.19.1/jclass/jstring.c:372:53: [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). type = (char*) realloc(type,((array_length * 2) + strlen(type) + 1)); data/jclassinfo-0.19.1/jclass/jstring.c:514:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). params = (char*) realloc(params, (strlen(params) + strlen(curr_param) + 3)); data/jclassinfo-0.19.1/jclass/jstring.c:514:54: [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). params = (char*) realloc(params, (strlen(params) + strlen(curr_param) + 3)); data/jclassinfo-0.19.1/jclass/jstring.c:524: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). params = (char*) realloc(params, (strlen(params) + 2)); data/jclassinfo-0.19.1/jclass/jstring.c:525:2: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(params, ")"); data/jclassinfo-0.19.1/jclass/jstring.c:548: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). finish_index = strlen(method) - 1; data/jclassinfo-0.19.1/jclass/jstring.c:572:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(class_name, &method[start_index], (finish_index - start_index)); data/jclassinfo-0.19.1/jclass/jstring.c:612:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(package, classname, last_index); data/jclassinfo-0.19.1/jclass/jstring.c:660:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). class_filename = (char*) malloc(strlen(class_name) + 7); data/jclassinfo-0.19.1/jclass/jstring.c:663: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). for(i = 0; i < strlen(class_filename); i++) data/jclassinfo-0.19.1/jclass/jstring.c:677:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(temp_string, " ");\ data/jclassinfo-0.19.1/jclass/manifest.c:112:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(manifest->sections[section_count].name, p, token_length); data/jclassinfo-0.19.1/jclass/manifest.c:176:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). entry->key = strncpy(entry->key, p, token_length); data/jclassinfo-0.19.1/jclass/manifest.c:189:20: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). entry->value = strncpy(entry->value, p, token_length); ANALYSIS SUMMARY: Hits = 148 Lines analyzed = 10420 in approximately 0.28 seconds (36611 lines/second) Physical Source Lines of Code (SLOC) = 6672 Hits@level = [0] 200 [1] 62 [2] 46 [3] 17 [4] 23 [5] 0 Hits@level+ = [0+] 348 [1+] 148 [2+] 86 [3+] 40 [4+] 23 [5+] 0 Hits/KSLOC@level+ = [0+] 52.1583 [1+] 22.1823 [2+] 12.8897 [3+] 5.9952 [4+] 3.44724 [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.