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/flam3-3.1.1/config.h Examining data/flam3-3.1.1/docstring.c Examining data/flam3-3.1.1/filters.c Examining data/flam3-3.1.1/filters.h Examining data/flam3-3.1.1/flam3-animate.c Examining data/flam3-3.1.1/flam3-convert.c Examining data/flam3-3.1.1/flam3-genome.c Examining data/flam3-3.1.1/flam3-render.c Examining data/flam3-3.1.1/img.h Examining data/flam3-3.1.1/interpolation.c Examining data/flam3-3.1.1/interpolation.h Examining data/flam3-3.1.1/isaac.c Examining data/flam3-3.1.1/isaac.h Examining data/flam3-3.1.1/isaacs.h Examining data/flam3-3.1.1/jpeg.c Examining data/flam3-3.1.1/palettes.c Examining data/flam3-3.1.1/palettes.h Examining data/flam3-3.1.1/parser.c Examining data/flam3-3.1.1/parser.h Examining data/flam3-3.1.1/png.c Examining data/flam3-3.1.1/private.h Examining data/flam3-3.1.1/rect.c Examining data/flam3-3.1.1/variations.c Examining data/flam3-3.1.1/variations.h Examining data/flam3-3.1.1/flam3.c Examining data/flam3-3.1.1/flam3.h FINAL RESULTS: data/flam3-3.1.1/flam3-animate.c:71:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(palpath,"flam3_palettes=%sflam3-palettes.xml",exepath); data/flam3-3.1.1/flam3-animate.c:258:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fname, "%s%05d.%s", prefix, ftime, format); data/flam3-3.1.1/flam3-animate.c:265:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(flamename,"%s.flam3",fname); data/flam3-3.1.1/flam3-convert.c:200:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(palpath,"flam3_palettes=%sflam3-palettes.xml",exepath); data/flam3-3.1.1/flam3-genome.c:198:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(comment_string,"<comm>%s</comm>",comment); data/flam3-3.1.1/flam3-genome.c:507:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(palpath,"flam3_palettes=%sflam3-palettes.xml",exepath); data/flam3-3.1.1/flam3-genome.c:920:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(action,"clone %s", getenv("clone_action")); data/flam3-3.1.1/flam3-render.c:161:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(palpath,"flam3_palettes=%sflam3-palettes.xml",exepath); data/flam3-3.1.1/flam3-render.c:351:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fname,out); data/flam3-3.1.1/flam3-render.c:353:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fname, "%s.%s",cps[i].flame_name,format); data/flam3-3.1.1/flam3-render.c:355:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fname, "%s%05d.%s", prefix, i, format); data/flam3-3.1.1/flam3.c:1654:11: [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(tmpnam, tmp_path); data/flam3-3.1.1/flam3.c:1905:43: [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. #define PRINTNON(p) do { if (x->p != 0.0) fprintf(f, #p "=\"%f\" ",x->p); } while(0) data/flam3-3.1.1/flam3.c:2661:10: [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(action,addtoaction); data/flam3-3.1.1/flam3.c:2759:10: [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(trystr,ministr); data/flam3-3.1.1/flam3.c:2803:13: [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(trystr,ministr); data/flam3-3.1.1/flam3.c:2938:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(ministr,"(%d%s)",b,(same>0) ? " same" : ""); data/flam3-3.1.1/img.h:26:12: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/flam3-3.1.1/img.h:26:21: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/flam3-3.1.1/private.h:33:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/flam3-3.1.1/private.h:33:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/flam3-3.1.1/flam3-animate.c:36:18: [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 *format = getenv("format"); data/flam3-3.1.1/flam3-animate.c:47:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *inf = getenv("in"); data/flam3-3.1.1/flam3-animate.c:99: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. if (getenv("frame")) { data/flam3-3.1.1/flam3-animate.c:100: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. if (getenv("time")) { data/flam3-3.1.1/flam3-animate.c:104: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. if (getenv("begin") || getenv("end")) { data/flam3-3.1.1/flam3-animate.c:104:28: [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("begin") || getenv("end")) { data/flam3-3.1.1/flam3-animate.c:108:37: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. first_frame = last_frame = atoi(getenv("frame")); data/flam3-3.1.1/flam3-animate.c:111: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. if (getenv("time")) { data/flam3-3.1.1/flam3-animate.c:112: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. if (getenv("begin") || getenv("end")) { data/flam3-3.1.1/flam3-animate.c:112:28: [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("begin") || getenv("end")) { data/flam3-3.1.1/flam3-animate.c:179:8: [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("time") && !getenv("frame")) { data/flam3-3.1.1/flam3-animate.c:179:27: [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("time") && !getenv("frame")) { data/flam3-3.1.1/flam3-animate.c:180:10: [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("begin")) { data/flam3-3.1.1/flam3-animate.c:183:10: [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("end")) { data/flam3-3.1.1/flam3-animate.c:254: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. if (getenv("out")) data/flam3-3.1.1/flam3-animate.c:255: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. fname = getenv("out"); data/flam3-3.1.1/flam3-animate.c:324:10: [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("out")) data/flam3-3.1.1/flam3-genome.c:26:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *e = getenv("extras"); data/flam3-3.1.1/flam3-genome.c:31: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. if (getenv("noedits")) data/flam3-3.1.1/flam3-genome.c:91:17: [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 *nick = getenv("nick"); data/flam3-3.1.1/flam3-genome.c:92: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. char *url = getenv("url"); data/flam3-3.1.1/flam3-genome.c:93:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *id = getenv("id"); data/flam3-3.1.1/flam3-genome.c:94: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. char *gen = getenv("gen"); data/flam3-3.1.1/flam3-genome.c:95:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *comment = getenv("comment"); data/flam3-3.1.1/flam3-genome.c:228: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. char *os = getenv("offset"); data/flam3-3.1.1/flam3-genome.c:454:18: [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 *clone = getenv("clone"); data/flam3-3.1.1/flam3-genome.c:455:22: [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 *clone_all = getenv("clone_all"); data/flam3-3.1.1/flam3-genome.c:456:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *animate = getenv("animate"); data/flam3-3.1.1/flam3-genome.c:457:19: [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 *mutate = getenv("mutate"); data/flam3-3.1.1/flam3-genome.c:458:19: [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 *cross0 = getenv("cross0"); data/flam3-3.1.1/flam3-genome.c:459:19: [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 *cross1 = getenv("cross1"); data/flam3-3.1.1/flam3-genome.c:460:19: [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 *method = getenv("method"); data/flam3-3.1.1/flam3-genome.c:461:18: [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 *inter = getenv("inter"); data/flam3-3.1.1/flam3-genome.c:462:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *find_parents = getenv("find_parents"); data/flam3-3.1.1/flam3-genome.c:463:19: [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 *rotate = getenv("rotate"); data/flam3-3.1.1/flam3-genome.c:464:18: [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 *strip = getenv("strip"); data/flam3-3.1.1/flam3-genome.c:465: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 *sequence = getenv("sequence"); data/flam3-3.1.1/flam3-genome.c:472: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 *use_vars = getenv("use_vars"); data/flam3-3.1.1/flam3-genome.c:473:26: [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 *dont_use_vars = getenv("dont_use_vars"); data/flam3-3.1.1/flam3-genome.c:659:8: [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("template")) { data/flam3-3.1.1/flam3-genome.c:660:18: [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 *tf = getenv("template"); data/flam3-3.1.1/flam3-genome.c:710:12: [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("begin")) data/flam3-3.1.1/flam3-genome.c:715:12: [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("end")) data/flam3-3.1.1/flam3-genome.c:919: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. if (getenv("clone_action")) data/flam3-3.1.1/flam3-genome.c:920:40: [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. sprintf(action,"clone %s", getenv("clone_action")); data/flam3-3.1.1/flam3-genome.c:922:39: [3] (random) random: 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. flam3_copy(&selp0, &(parent0[random()%parent0_n])); data/flam3-3.1.1/flam3-genome.c:951:28: [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 (NULL == getenv("method")) data/flam3-3.1.1/flam3-genome.c:1000:28: [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 (NULL == getenv("method")) data/flam3-3.1.1/flam3-genome.c:1063:31: [3] (random) random: 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. if (!did_color && random()&1) { data/flam3-3.1.1/flam3-genome.c:1130:27: [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 *maxforms = getenv("maxforms"); data/flam3-3.1.1/flam3-render.c:76: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. if (getenv("use_mem")) { data/flam3-3.1.1/flam3-render.c:77:28: [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. mem_available = atof(getenv("use_mem")); data/flam3-3.1.1/flam3-render.c:125:19: [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 *format = getenv("format"); data/flam3-3.1.1/flam3-render.c:130: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. char *inf = getenv("in"); data/flam3-3.1.1/flam3-render.c:276:11: [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("nstrips")) { data/flam3-3.1.1/flam3-render.c:277:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. nstrips = atoi(getenv("nstrips")); data/flam3-3.1.1/flam3.c:73:32: [3] (random) random: 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. #define random_distrib(v) ((v)[random()%vlen(v)]) data/flam3-3.1.1/flam3.c:1644:9: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). char tmpnam[256]; data/flam3-3.1.1/flam3.c:1651:19: [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. tmp_path = getenv("TEMP"); data/flam3-3.1.1/flam3.c:1654:18: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). strcpy(tmpnam, tmp_path); data/flam3-3.1.1/flam3.c:1655:18: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). strcat(tmpnam, "\\fr0st.tmp"); data/flam3-3.1.1/flam3.c:1656:28: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). tmpflame = fopen(tmpnam, "w+"); data/flam3-3.1.1/flam3.c:1677:14: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). unlink(tmpnam); data/flam3-3.1.1/flam3.c:1868: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. if (getenv("intpalette")) data/flam3-3.1.1/flam3.c:1878: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. if (getenv("intpalette")) data/flam3-3.1.1/flam3.c:2495:12: [3] (random) random: 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 (random() & 0xfffffff) / (double) 0xfffffff; data/flam3-3.1.1/flam3.c:2499:13: [3] (random) random: 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 ((random() & 0xfffffff) - 0x7ffffff) / (double) 0x7ffffff; data/flam3-3.1.1/flam3.c:2541:9: [3] (random) random: 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. l = random(); data/flam3-3.1.1/flam3.c:2581:11: [3] (random) random: 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. if (random()&1) { data/flam3-3.1.1/flam3.c:2583:18: [3] (random) random: 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. } else if (random()&31) { data/flam3-3.1.1/flam3.c:2584:17: [3] (random) random: 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. sym = (random()%13)-6; data/flam3-3.1.1/flam3.c:2586:17: [3] (random) random: 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. sym = (random()%51)-25; data/flam3-3.1.1/flam3.c:3075:10: [3] (random) random: 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 random() % flam3_nvariations; data/flam3-3.1.1/flam3.c:3079:11: [3] (random) random: 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 random() % n; data/flam3-3.1.1/flam3.c:3102:24: [3] (random) random: 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. cp->hue_rotation = (random()&7) ? 0.0 : flam3_random01(); data/flam3-3.1.1/flam3.c:3534:18: [3] (random) random: 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. if (sym || (!(random()%4) && !addfinal)) data/flam3-3.1.1/flam3.c:3946: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. char *s = getenv("seed"); data/flam3-3.1.1/flam3.c:3953:4: [3] (random) srandom: 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. srandom(seed); data/flam3-3.1.1/flam3.c:4057:17: [3] (random) random: 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. ri = 2 * (random() % ntries); data/flam3-3.1.1/flam3.c:4116:30: [3] (random) random: 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. flam3_iterate(cp, 1, 20+(random()%10), p, xform_distrib, &rc); data/flam3-3.1.1/flam3.c:4123:5: [3] (random) srandom: 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. srandom(i); data/flam3-3.1.1/flam3.c:4153:5: [3] (random) srandom: 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. srandom(i); data/flam3-3.1.1/jpeg.c:35:17: [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 *nick = getenv("nick"); data/flam3-3.1.1/jpeg.c:36: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. char *url = getenv("url"); data/flam3-3.1.1/jpeg.c:37:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *id = getenv("id"); data/flam3-3.1.1/jpeg.c:61:8: [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("jpeg")) { data/flam3-3.1.1/jpeg.c:62:26: [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. int quality = atoi(getenv("jpeg")); data/flam3-3.1.1/palettes.c:153:17: [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 *d = getenv("flam3_palettes"); data/flam3-3.1.1/palettes.c:162:24: [3] (random) random: 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. n = the_palettes[random()%npalettes].number; data/flam3-3.1.1/palettes.c:354:15: [3] (random) random: 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. int i = random() % g->num_xforms; data/flam3-3.1.1/palettes.c:472:20: [3] (random) random: 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. if (x0 >= 0 && (random()&1)) g->xform[x0].color = 0.0; data/flam3-3.1.1/palettes.c:473:20: [3] (random) random: 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. if (x1 >= 0 && (random()&1)) g->xform[x1].color = 1.0; data/flam3-3.1.1/png.c:43: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. char *nick = getenv("nick"); data/flam3-3.1.1/png.c:44:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *url = getenv("url"); data/flam3-3.1.1/png.c:45: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. char *id = getenv("id"); data/flam3-3.1.1/private.h:63:9: [3] (random) random: 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. #define random() (rand() ^ (rand()<<15)) data/flam3-3.1.1/private.h:64:9: [3] (random) srandom: 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. #define srandom(x) (srand(x)) data/flam3-3.1.1/private.h:64:22: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define srandom(x) (srand(x)) data/flam3-3.1.1/private.h:69:28: [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. #define argi(s,d) ((ai = getenv(s)) ? atoi(ai) : (d)) data/flam3-3.1.1/private.h:70:28: [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. #define argf(s,d) ((ai = getenv(s)) ? atof(ai) : (d)) data/flam3-3.1.1/private.h:71:28: [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. #define args(s,d) ((ai = getenv(s)) ? ai : (d)) data/flam3-3.1.1/rect.c:1267:8: [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("insert_palette")) { data/flam3-3.1.1/flam3-animate.c:26: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 flamename[256]; data/flam3-3.1.1/flam3-animate.c:55: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 badval_string[64]; data/flam3-3.1.1/flam3-animate.c:56: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 numiter_string[64]; data/flam3-3.1.1/flam3-animate.c:57: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 rtime_string[64]; data/flam3-3.1.1/flam3-animate.c:62: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 exepath[256]; data/flam3-3.1.1/flam3-animate.c:63: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 palpath[256]; data/flam3-3.1.1/flam3-animate.c:68: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(palpath,"flam3_palettes=flam3-palettes.xml"); data/flam3-3.1.1/flam3-animate.c:108:32: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). first_frame = last_frame = atoi(getenv("frame")); data/flam3-3.1.1/flam3-animate.c:135: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). in = fopen(inf, "rb"); data/flam3-3.1.1/flam3-animate.c:271:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). genfp = fopen(flamename,"w"); data/flam3-3.1.1/flam3-animate.c:282: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). fp = fopen(fname, "wb"); data/flam3-3.1.1/flam3-animate.c:293: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(badval_string, "%g",stats.badvals/(double)stats.num_iters); data/flam3-3.1.1/flam3-animate.c:295: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(numiter_string,"%g",(double)stats.num_iters); data/flam3-3.1.1/flam3-animate.c: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(rtime_string,"%d",stats.render_seconds); data/flam3-3.1.1/flam3-convert.c:72:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *argv[MAXARGS]; data/flam3-3.1.1/flam3-convert.c:193: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 palpath[256],exepath[256]; data/flam3-3.1.1/flam3-convert.c:197: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(palpath,"flam3_palettes=flam3-palettes.xml"); data/flam3-3.1.1/flam3-genome.c:69:8: [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(s, "rb"); data/flam3-3.1.1/flam3-genome.c:90:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char timestring[100]; data/flam3-3.1.1/flam3-genome.c:98:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[100]; data/flam3-3.1.1/flam3-genome.c:99:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char comment_string[100]; data/flam3-3.1.1/flam3-genome.c:142: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(buffer, "%d", sheep_gen); data/flam3-3.1.1/flam3-genome.c:145: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(buffer, "%d", sheep_id); data/flam3-3.1.1/flam3-genome.c:157:10: [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(buffer,"%d",parent0->genome_index); data/flam3-3.1.1/flam3-genome.c:164:10: [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(buffer,"%d",parent0->genome_index); data/flam3-3.1.1/flam3-genome.c:177:10: [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(buffer,"%d",parent1->genome_index); data/flam3-3.1.1/flam3-genome.c:184:10: [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(buffer,"%d",parent1->genome_index); data/flam3-3.1.1/flam3-genome.c:239:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char action[50]; data/flam3-3.1.1/flam3-genome.c:260:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(action,"rotate %g",blend*360.0); data/flam3-3.1.1/flam3-genome.c:268:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(result->flame_name,"%f",result->time); data/flam3-3.1.1/flam3-genome.c:286:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char action[50]; data/flam3-3.1.1/flam3-genome.c:315:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(action,"interpolate %g",blend*360.0); data/flam3-3.1.1/flam3-genome.c:323:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(result->flame_name,"%f",result->time); data/flam3-3.1.1/flam3-genome.c:339:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char trunc_note[30]; data/flam3-3.1.1/flam3-genome.c:347:10: [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(trunc_note," trunc_density %d",i); data/flam3-3.1.1/flam3-genome.c:370:16: [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(trunc_note," trunc %d %d",i,smallest); data/flam3-3.1.1/flam3-genome.c:489:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char action[flam3_max_action_length]; data/flam3-3.1.1/flam3-genome.c:498:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char exepath[256]; data/flam3-3.1.1/flam3-genome.c:499:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char palpath[256]; data/flam3-3.1.1/flam3-genome.c:504: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(palpath,"flam3_palettes=flam3-palettes.xml"); data/flam3-3.1.1/flam3-genome.c:590:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ivars[num_ivars++] = atoi(var_tok); data/flam3-3.1.1/flam3-genome.c:597:34: [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). ivars[num_ivars++] = atoi(var_tok); data/flam3-3.1.1/flam3-genome.c:615:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). novars[num_novars++] = atoi(var_tok); data/flam3-3.1.1/flam3-genome.c:622:36: [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). novars[num_novars++] = atoi(var_tok); data/flam3-3.1.1/flam3-genome.c:917:10: [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(action,"clone"); data/flam3-3.1.1/flam3-genome.c:979:19: [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 tm[flam3_name_len+1]; data/flam3-3.1.1/flam3-genome.c:1021:16: [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(action,"random"); data/flam3-3.1.1/flam3-genome.c:1131:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (maxforms && atoi(maxforms)) { data/flam3-3.1.1/flam3-genome.c:1133:41: [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). while (cp_save.num_xforms > atoi(maxforms)) data/flam3-3.1.1/flam3-render.c:116:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[256]; data/flam3-3.1.1/flam3-render.c:144:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char numiter_string[64]; data/flam3-3.1.1/flam3-render.c:145:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char badval_string[64]; data/flam3-3.1.1/flam3-render.c:146:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rtime_string[64]; data/flam3-3.1.1/flam3-render.c:151:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char exepath[256]; data/flam3-3.1.1/flam3-render.c:152:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char palpath[256]; data/flam3-3.1.1/flam3-render.c:158: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(palpath,"flam3_palettes=flam3-palettes.xml"); data/flam3-3.1.1/flam3-render.c:216: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). in = fopen(inf, "rb"); data/flam3-3.1.1/flam3-render.c:277:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). nstrips = atoi(getenv("nstrips")); data/flam3-3.1.1/flam3-render.c:320:7: [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(&savectx, &f.rc, sizeof(randctx)); data/flam3-3.1.1/flam3-render.c:336:10: [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(&f.rc, &savectx, sizeof(randctx)); data/flam3-3.1.1/flam3-render.c:360: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). fp = fopen(fname, "wb"); data/flam3-3.1.1/flam3-render.c:369:10: [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(badval_string,"%g",stats.badvals/(double)stats.num_iters); data/flam3-3.1.1/flam3-render.c:371:10: [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(numiter_string,"%g",(double)stats.num_iters); data/flam3-3.1.1/flam3-render.c:373:10: [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(rtime_string,"%d",stats.render_seconds); data/flam3-3.1.1/flam3-render.c:382:39: [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. write_jpeg(fp, (unsigned char *)image, cps[i].width, real_height, &fpc); data/flam3-3.1.1/flam3.c:1175:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dest->motion,src->motion,src->num_motion*sizeof(flam3_xform)); data/flam3-3.1.1/flam3.c:1189: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(dest, src, sizeof(flam3_genome)); data/flam3-3.1.1/flam3.c:1216:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dest->chaos[i],src->chaos[i], numstd * sizeof(double)); data/flam3-3.1.1/flam3.c:1228: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(dest, src, sizeof(flam3_genome)); data/flam3-3.1.1/flam3.c:1250:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dest->chaos[i], src->chaos[i], numsrcstd*sizeof(double)); data/flam3-3.1.1/flam3.c:1409:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[MAXBUF]; data/flam3-3.1.1/flam3.c:1410: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 *f = fopen("/proc/cpuinfo", "r"); data/flam3-3.1.1/flam3.c:1464:10: [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(locale, lorig, slen); data/flam3-3.1.1/flam3.c:1644:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpnam[256]; data/flam3-3.1.1/flam3.c:1646:15: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). tmpflame = tmpfile(); data/flam3-3.1.1/flam3.c:1655:11: [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(tmpnam, "\\fr0st.tmp"); data/flam3-3.1.1/flam3.c:1656:22: [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). tmpflame = fopen(tmpnam, "w+"); data/flam3-3.1.1/flam3.c:1698:7: [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(locale, lorig, slen); data/flam3-3.1.1/flam3.c:2671:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ministr[12]; data/flam3-3.1.1/flam3.c:2739: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(ministr,"%7.5g",t); data/flam3-3.1.1/flam3.c:2758:10: [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(ministr,"%d:",rb); data/flam3-3.1.1/flam3.c:2779:22: [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(ministr," 1"); data/flam3-3.1.1/flam3.c:2782:22: [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(ministr," 0"); data/flam3-3.1.1/flam3.c:2788:22: [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(ministr," 0"); data/flam3-3.1.1/flam3.c:2791:22: [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(ministr," 1"); data/flam3-3.1.1/flam3.c:2796:16: [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(ministr," %d",used_parent); data/flam3-3.1.1/flam3.c:2832: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(ministr," %d:",startParent); data/flam3-3.1.1/flam3.c:2839:13: [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(ministr," %d",ci); data/flam3-3.1.1/flam3.c:2854:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ministr[30]; data/flam3-3.1.1/flam3.c:2915: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(ministr,"%d coefs",modxf); data/flam3-3.1.1/flam3.c:3045: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(ministr,"%d",nx); data/flam3-3.1.1/flam3.c:3949:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). seed = atoi(s); data/flam3-3.1.1/flam3.h:460:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char flame_name[flam3_name_len+1]; /* 64 chars plus a null */ data/flam3-3.1.1/flam3.h:476:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char parent_fname[flam3_parent_fn_len]; /* base filename where parent was located */ data/flam3-3.1.1/jpeg.c:41:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nick_string[64], url_string[128], id_string[128]; data/flam3-3.1.1/jpeg.c:42:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bv_string[64],ni_string[64],rt_string[64]; data/flam3-3.1.1/jpeg.c:43:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char genome_string[65536], ver_string[64]; data/flam3-3.1.1/jpeg.c:62: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). int quality = atoi(getenv("jpeg")); data/flam3-3.1.1/palettes.c:68:30: [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). pal->number = atoi(val); data/flam3-3.1.1/palettes.c:96: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). fp = fopen(filename, "rb"); data/flam3-3.1.1/palettes.h:25: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 name[flam3_name_len]; data/flam3-3.1.1/palettes.h:26:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char colors[256][3]; data/flam3-3.1.1/parser.c:89:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmps[2]; data/flam3-3.1.1/parser.c:296:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmps[2]; data/flam3-3.1.1/parser.c:838:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmps[2]; data/flam3-3.1.1/png.c:122:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char sig_buf [SIG_CHECK_SIZE]; data/flam3-3.1.1/private.h:69:41: [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). #define argi(s,d) ((ai = getenv(s)) ? atoi(ai) : (d)) data/flam3-3.1.1/variations.c:35:1: [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 *flam3_variation_names[1+flam3_nvariations] = { data/flam3-3.1.1/flam3-animate.c:70:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(exepath,argv[0],slashloc-argv[0]+1); data/flam3-3.1.1/flam3-animate.c:257:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fname = malloc(strlen(prefix) + 20); data/flam3-3.1.1/flam3-convert.c:199:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(exepath,argv[0],slashloc-argv[0]+1); data/flam3-3.1.1/flam3-convert.c:216:11: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getchar(); data/flam3-3.1.1/flam3-convert.c:229:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s += strlen(s); data/flam3-3.1.1/flam3-genome.c:200: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). comment_doc = xmlReadMemory(comment_string, strlen(comment_string), "comment.env", NULL, XML_PARSE_NONET); data/flam3-3.1.1/flam3-genome.c:506:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(exepath,argv[0],slashloc-argv[0]+1); data/flam3-3.1.1/flam3-genome.c:980:19: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tm, cp_orig.flame_name, flam3_name_len); data/flam3-3.1.1/flam3-render.c:160:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(exepath,argv[0],slashloc-argv[0]+1); data/flam3-3.1.1/flam3.c:1445:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). doc = xmlReadMemory(xmldata, (int)strlen(xmldata), xmlfilename, NULL, XML_PARSE_NONET); data/flam3-3.1.1/flam3.c:1461: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). int slen = strlen(lorig) + 1; data/flam3-3.1.1/flam3.c:1542:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(f); data/flam3-3.1.1/flam3.c:1695: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). int slen = strlen(lorig) + 1; data/flam3-3.1.1/flam3.c:2520:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)&f->rc.randrsl,(const char *)isaac_seed, RANDSIZ*sizeof(ub4)); data/flam3-3.1.1/flam3.c:2657: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). int alen = strlen(action); data/flam3-3.1.1/flam3.c:2658:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int addlen = strlen(addtoaction); data/flam3-3.1.1/jpeg.c:70:78: [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). jpeg_write_marker(&info, JPEG_COM, (unsigned char *)ver_string, (int)strlen(ver_string)); data/flam3-3.1.1/jpeg.c:74:83: [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). jpeg_write_marker(&info, JPEG_COM, (unsigned char *)nick_string, (int)strlen(nick_string)); data/flam3-3.1.1/jpeg.c:79:82: [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). jpeg_write_marker(&info, JPEG_COM, (unsigned char *)url_string, (int)strlen(url_string)); data/flam3-3.1.1/jpeg.c:84:81: [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). jpeg_write_marker(&info, JPEG_COM, (unsigned char *)id_string, (int)strlen(id_string)); data/flam3-3.1.1/jpeg.c:87:77: [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). jpeg_write_marker(&info, JPEG_COM, (unsigned char *)bv_string, (int)strlen(bv_string)); data/flam3-3.1.1/jpeg.c:88:77: [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). jpeg_write_marker(&info, JPEG_COM, (unsigned char *)ni_string, (int)strlen(ni_string)); data/flam3-3.1.1/jpeg.c:89:77: [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). jpeg_write_marker(&info, JPEG_COM, (unsigned char *)rt_string, (int)strlen(rt_string)); data/flam3-3.1.1/jpeg.c:90:81: [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). jpeg_write_marker(&info, JPEG_COM, (unsigned char *)genome_string, (int)strlen(genome_string)); data/flam3-3.1.1/palettes.c:70:16: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pal->name, val, flam3_name_len); data/flam3-3.1.1/palettes.c:107:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fp); data/flam3-3.1.1/palettes.c:125:32: [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). doc = xmlReadMemory(s, (int)strlen(s), filename, NULL, XML_PARSE_NONET); data/flam3-3.1.1/parser.c:39:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (endp!=nstr+strlen(nstr)) { data/flam3-3.1.1/parser.c:63:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (endp!=nstr+strlen(nstr)) { data/flam3-3.1.1/parser.c:127:8: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(&(colstr[c_idx]),"%1s",tmps)>0) { data/flam3-3.1.1/parser.c:271:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(loc_current_cp.parent_fname,parent_file,flam3_parent_fn_len-1); data/flam3-3.1.1/parser.c:372:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cp->flame_name, att_str, flam3_name_len); data/flam3-3.1.1/parser.c:373: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). i = (int)strlen(cp->flame_name)-1; data/flam3-3.1.1/parser.c:382:14: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(att_str, "%d %d%1s", &cp->width, &cp->height, tmps) != 2) { data/flam3-3.1.1/parser.c:388:14: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(att_str, "%lf %lf%1s", &cp->center[0], &cp->center[1], tmps) != 2) { data/flam3-3.1.1/parser.c:466:14: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(att_str, "%lf %lf %lf%1s", &cp->background[0], &cp->background[1], &cp->background[2], tmps) != 3) { data/flam3-3.1.1/parser.c:524:20: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(att_str, "%lf %lf %lf%1s", &r, &g, &b, tmps) != 3) { data/flam3-3.1.1/parser.c:530:20: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(att_str, "%lf %lf %lf %lf%1s", &r, &g, &b, &a, tmps) != 4) { data/flam3-3.1.1/parser.c:536:20: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(att_str, "%lf%1s", &a, tmps) != 1) { data/flam3-3.1.1/parser.c:883:14: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(att_str, "%lf %lf%1s", &this_xform->color, &tmpc1, tmps) != 2) { data/flam3-3.1.1/parser.c:885:17: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(att_str, "%lf%1s", &this_xform->color,tmps) != 1) { data/flam3-3.1.1/parser.c:917: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). if (cpy != att_str+strlen(att_str)) { data/flam3-3.1.1/parser.c:987: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). if (cpy != att_str+strlen(att_str)) { data/flam3-3.1.1/parser.c:1006: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). if (cpy != att_str+strlen(att_str)) { data/flam3-3.1.1/parser.c:1378: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). strl = (int)strlen(cont_str)-1; ANALYSIS SUMMARY: Hits = 276 Lines analyzed = 15698 in approximately 0.52 seconds (30359 lines/second) Physical Source Lines of Code (SLOC) = 11096 Hits@level = [0] 467 [1] 45 [2] 108 [3] 102 [4] 21 [5] 0 Hits@level+ = [0+] 743 [1+] 276 [2+] 231 [3+] 123 [4+] 21 [5+] 0 Hits/KSLOC@level+ = [0+] 66.9611 [1+] 24.8738 [2+] 20.8183 [3+] 11.0851 [4+] 1.89257 [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.