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/fig2dev-3.2.7b/transfig/sys.c Examining data/fig2dev-3.2.7b/transfig/mkfile.c Examining data/fig2dev-3.2.7b/transfig/txfile.c Examining data/fig2dev-3.2.7b/transfig/transfig.h Examining data/fig2dev-3.2.7b/transfig/transfig.c Examining data/fig2dev-3.2.7b/fig2dev/dev/readxpm.c Examining data/fig2dev-3.2.7b/fig2dev/dev/readpng.c Examining data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c Examining data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.h Examining data/fig2dev-3.2.7b/fig2dev/dev/tkpattern.c Examining data/fig2dev-3.2.7b/fig2dev/dev/tkpattern.h Examining data/fig2dev-3.2.7b/fig2dev/dev/setfigfont.c Examining data/fig2dev-3.2.7b/fig2dev/dev/setfigfont.h Examining data/fig2dev-3.2.7b/fig2dev/dev/texfonts.c Examining data/fig2dev-3.2.7b/fig2dev/dev/texfonts.h Examining data/fig2dev-3.2.7b/fig2dev/dev/readxbm.c Examining data/fig2dev-3.2.7b/fig2dev/dev/readtif.c Examining data/fig2dev-3.2.7b/fig2dev/dev/readppm.c Examining data/fig2dev-3.2.7b/fig2dev/dev/readpics.c Examining data/fig2dev-3.2.7b/fig2dev/dev/readpics.h Examining data/fig2dev-3.2.7b/fig2dev/dev/readpcx.c Examining data/fig2dev-3.2.7b/fig2dev/dev/readjpg.c Examining data/fig2dev-3.2.7b/fig2dev/dev/readgif.c Examining data/fig2dev-3.2.7b/fig2dev/dev/readeps.c Examining data/fig2dev-3.2.7b/fig2dev/dev/psprolog.h Examining data/fig2dev-3.2.7b/fig2dev/dev/psimage.h Examining data/fig2dev-3.2.7b/fig2dev/dev/psfonts.c Examining data/fig2dev-3.2.7b/fig2dev/dev/psfonts.h Examining data/fig2dev-3.2.7b/fig2dev/dev/psencode.c Examining data/fig2dev-3.2.7b/fig2dev/dev/psencode.h Examining data/fig2dev-3.2.7b/fig2dev/dev/picpsfonts.h Examining data/fig2dev-3.2.7b/fig2dev/dev/picfonts.h Examining data/fig2dev-3.2.7b/fig2dev/dev/gentpic.c Examining data/fig2dev-3.2.7b/fig2dev/dev/gentk.c Examining data/fig2dev-3.2.7b/fig2dev/dev/gentikz.c Examining data/fig2dev-3.2.7b/fig2dev/dev/gentikz.h Examining data/fig2dev-3.2.7b/fig2dev/dev/gentextyl.c Examining data/fig2dev-3.2.7b/fig2dev/dev/gensvg.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genshape.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genptk.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genps.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genps.h Examining data/fig2dev-3.2.7b/fig2dev/dev/genpictex.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genpict2e.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genpic.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genpdf.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genmp.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genmf.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genmap.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genlatex.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genlatex.h Examining data/fig2dev-3.2.7b/fig2dev/dev/genibmgl.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genge.c Examining data/fig2dev-3.2.7b/fig2dev/dev/gengbx.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genepic.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genemf.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genemf.h Examining data/fig2dev-3.2.7b/fig2dev/dev/gendxf.c Examining data/fig2dev-3.2.7b/fig2dev/dev/gencgm.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genbox.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c Examining data/fig2dev-3.2.7b/fig2dev/dev/asc85ec.c Examining data/fig2dev-3.2.7b/fig2dev/dev/genpstex.c Examining data/fig2dev-3.2.7b/fig2dev/getopt.c Examining data/fig2dev-3.2.7b/fig2dev/pi.h Examining data/fig2dev-3.2.7b/fig2dev/trans_spline.h Examining data/fig2dev-3.2.7b/fig2dev/read.h Examining data/fig2dev-3.2.7b/fig2dev/object.h Examining data/fig2dev-3.2.7b/fig2dev/localmath.c Examining data/fig2dev-3.2.7b/fig2dev/localmath.h Examining data/fig2dev-3.2.7b/fig2dev/iso2tex.c Examining data/fig2dev-3.2.7b/fig2dev/free.c Examining data/fig2dev-3.2.7b/fig2dev/free.h Examining data/fig2dev-3.2.7b/fig2dev/creationdate.c Examining data/fig2dev-3.2.7b/fig2dev/creationdate.h Examining data/fig2dev-3.2.7b/fig2dev/colors.h Examining data/fig2dev-3.2.7b/fig2dev/bound.c Examining data/fig2dev-3.2.7b/fig2dev/bound.h Examining data/fig2dev-3.2.7b/fig2dev/bool.h Examining data/fig2dev-3.2.7b/fig2dev/alloc.h Examining data/fig2dev-3.2.7b/fig2dev/lib/strstr.c Examining data/fig2dev-3.2.7b/fig2dev/lib/strrchr.c Examining data/fig2dev-3.2.7b/fig2dev/lib/strndup.c Examining data/fig2dev-3.2.7b/fig2dev/lib/strncasecmp.c Examining data/fig2dev-3.2.7b/fig2dev/lib/strdup.c Examining data/fig2dev-3.2.7b/fig2dev/lib/strchr.c Examining data/fig2dev-3.2.7b/fig2dev/lib/strcasecmp.c Examining data/fig2dev-3.2.7b/fig2dev/lib/realloc.c Examining data/fig2dev-3.2.7b/fig2dev/lib/malloc.c Examining data/fig2dev-3.2.7b/fig2dev/lib/isascii.c Examining data/fig2dev-3.2.7b/fig2dev/tests/test1.c Examining data/fig2dev-3.2.7b/fig2dev/drivers.h Examining data/fig2dev-3.2.7b/fig2dev/colors.c Examining data/fig2dev-3.2.7b/fig2dev/arrow.c Examining data/fig2dev-3.2.7b/fig2dev/fig2dev.c Examining data/fig2dev-3.2.7b/fig2dev/fig2dev.h Examining data/fig2dev-3.2.7b/fig2dev/read.c Examining data/fig2dev-3.2.7b/fig2dev/read1_3.c Examining data/fig2dev-3.2.7b/fig2dev/trans_spline.c FINAL RESULTS: data/fig2dev-3.2.7b/fig2dev/colors.c:776: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(col->name, s1); data/fig2dev-3.2.7b/fig2dev/colors.c:836: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(squeezed, name); data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:94:10: [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). (void) strcpy(gif_transparent, optarg); data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:163:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. n = sprintf(com, "%s -q -dSAFER -r80 -g%dx%d", GSEXE, data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:187:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. n += sprintf(com + n, " -sDEVICE=%s -o ", gsdev); data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:189:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(com + n, "'%s' -", to); data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:201:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. n += sprintf(com + n, data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:232:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. n += sprintf(com + n, " 2>%s", errfname); data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:235:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(com + n, " >'%s'", to); data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:239:13: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if ((tfp = popen(com, "w")) == 0) { data/fig2dev-3.2.7b/fig2dev/dev/gencgm.c:172:2: [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(cgmcom, to); data/fig2dev-3.2.7b/fig2dev/dev/gencgm.c:178:16: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if ((tfp = popen(cgmcom,"w")) == 0) { data/fig2dev-3.2.7b/fig2dev/dev/genemf.c:3225:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(comm.comment, data/fig2dev-3.2.7b/fig2dev/dev/genepic.c:1200:2: [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(tfp, EllCmdstr[EllipseCmd],EllCmdkw[EllipseCmd], "", data/fig2dev-3.2.7b/fig2dev/dev/genepic.c:1206: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(tfp, EllCmdstr[EllipseCmd],EllCmdkw[EllipseCmd], "", data/fig2dev-3.2.7b/fig2dev/dev/genepic.c:1211:2: [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(tfp, EllCmdstr[EllipseCmd], EllCmdkw[EllipseCmd], data/fig2dev-3.2.7b/fig2dev/dev/gengbx.c:826:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outbuf, "Creator: %s",prog); write_comment(outbuf); data/fig2dev-3.2.7b/fig2dev/dev/gengbx.c:827:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outbuf, "Version: %s", PACKAGE_VERSION); write_comment(outbuf); data/fig2dev-3.2.7b/fig2dev/dev/gengbx.c:828:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outbuf, "Driver version: %s", GBX_DRIVER_VERSION); data/fig2dev-3.2.7b/fig2dev/dev/gengbx.c:833:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(outbuf, "Creation date: %s", stime); data/fig2dev-3.2.7b/fig2dev/dev/genibmgl.c:296:10: [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). (void) strcpy (papersize, optarg); data/fig2dev-3.2.7b/fig2dev/dev/genibmgl.c:335:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(papersize,pd->name); /* use the "nice" form */ data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:149: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(hl->url, url); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:151: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(hl->alt, alt); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:153: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(hl->area, area); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:167: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(basename, to); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:192:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "<AREA COORDS=\"%d,%d,%d,%d\" %s>\n", data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:223:28: [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). if (l->alt[0] != '\0') strcpy(label, l->alt); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:224:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. else sprintf(label, "<TT>%s</TT>", l->url); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:284:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(&buf[strlen(buf)], "\" %s>\n", ref); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:305:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "<AREA SHAPE=\"circle\" COORDS=\"%d,%d,%d\" %s>\n", data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:320:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(&buf[strlen(buf)], "\" %s>\n", ref); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:348:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "<AREA COORDS=\"%d,%d,%d,%d\" %s>\n", data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:371:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(&buf[strlen(buf)], "\" %s>\n", ref); data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:469: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 (options, optarg); data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:1228: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(p_string,xfigcolors[c]); data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:1248:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(f_string,"withcolor (%s + %.2lfwhite)", data/fig2dev-3.2.7b/fig2dev/dev/genpdf.c:94:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(com, "%s -q -sAutoRotatePages=None " data/fig2dev-3.2.7b/fig2dev/dev/genpdf.c:99:13: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if ((tfp = popen(com, "w")) == 0) { data/fig2dev-3.2.7b/fig2dev/dev/genpict2e.c:1480:30: [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 PUTVECTOR(p,sx,sy,l) fprintf(tfp, \ data/fig2dev-3.2.7b/fig2dev/dev/genps.c:342:14: [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). (void) strcpy (boundingbox, optarg); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:436:14: [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). (void) strcpy (boundingbox, optarg); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:460:14: [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). (void) strcpy (papersize, optarg); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:538: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(papersize, pd->name); /* use the "nice" form */ data/fig2dev-3.2.7b/fig2dev/dev/genps.c:728:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(psize,papersize); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:785:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s/%s.ps", libdir, papersize); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:861:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(localefile, "%s/%s.ps", libdir, locale); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:1112:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gscom, data/fig2dev-3.2.7b/fig2dev/dev/genps.c:1117:20: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if ((status = system(gscom)) != 0) { data/fig2dev-3.2.7b/fig2dev/dev/genps.c:2254: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(tfp, TEXT_PS, "CompositeRoman", "", PSFONTMAG(t)); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:2256: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(tfp, TEXT_PS, "CompositeBold", "", PSFONTMAG(t)); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:2260:5: [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(tfp, TEXT_PS, PSFONT(t), "-iso", PSFONTMAG(t)); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:2262:5: [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(tfp, TEXT_PS, PSFONT(t), "", PSFONTMAG(t)); data/fig2dev-3.2.7b/fig2dev/dev/genpstex.c:148: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(pstex_file, optarg); data/fig2dev-3.2.7b/fig2dev/dev/genpstex.c:388: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(pstex_file, optarg); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:151:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(rn, rn_digits[i]); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:171:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(c, s); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:243:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(*lst, ",%s", val); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:246: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(*lst, val); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:391: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(stn->str, str); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:631:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%sreadme.txt", Pic_convert_dir); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1036:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(color_table[iuc].name, "usrclr%s", roman_numeral_from_int(rn, i)); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1118: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(name, special); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1126:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%sst%s", color_table[ic].name, roman_numeral_from_int(rn, ist)); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1169:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(names[ig], "gray%s", roman_numeral_from_int(rn, ig)); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1254:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fill_fillcolor_option, ",fillcolor=%s", pen_color_name); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1255:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(linecolor_option, ",linecolor=%s", pen_color_name); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1618:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(opts_curb, arrow->style == HOLLOW_ARROW ? "o" : "*"); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1624:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(opts_curb, arrow->style == HOLLOW_ARROW ? "oo" : "**"); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1652:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(opts_sqrb, "tbarsize="DBL" 2,bracketlength="DBL, data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1674: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(opts_curb, data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1713: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(opts_sqrb, sqrb_init); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1786:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(tmps, "linestyle=dashed,dash="DBL" "DBL" "DBL" "DBL" "DBL" "DBL" "DBL" "DBL, data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1835:5: [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(opts_curb, tmpc); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1838:5: [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(opts_curb, tmpc); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1845:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmps, "linecolor=%s", color_name_after_declare_color(pen_color)); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1852:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmps, "fillstyle=solid,fillcolor=%s", gray_name_after_declare_gray(fill_style)); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1855:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmps, "fillstyle=solid,fillcolor=%s", gray_name_after_declare_gray(20 - fill_style)); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1858:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmps, "fillstyle=solid,fillcolor=%s", data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1912:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmps_alt, "fillcolor=%s", color_name_after_declare_color(fill_color)); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1916:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmps_alt, "hatchcolor=%s", color_name_after_declare_color(pen_color)); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1920:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmps_alt, "fillstyle=%s*,hatchangle=%.2lf", type, -(angle + hatch_angle_offset)); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1927:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(options, "[%s]{%s}", opts_sqrb, opts_curb); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1929:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(options, "[%s]", opts_sqrb); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1931:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(options, "{%s}", opts_curb); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1983: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(eps_path, (char*)stn->val.vp); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2046:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(uniqified_base, "%s-%03d", base, base_index); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2049: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(uniqified_base, base); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2051:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(eps_path, "%s%s", Pic_convert_dir, uniqified_base); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2074:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cmd, "bmeps -c -t %s \"%s\" \"%s.eps\"", data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2078:16: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. errval = system(cmd); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2546:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, p->translation); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2560:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(p, "\\shortstack[%s]{", just_str_from_text_type(type)); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:140:10: [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). (void) strcpy (papersize, optarg); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:199: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(papersize, pd->name); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:481:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s->createBitmap(qw/%fi %fi -anchor nw", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:484:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -bitmap/, \"@%s\"", p->file); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:610:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s->createText(qw/%fi %fi", canvas, X(t->base_x), data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:644:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, ", -font => \"%s%d%s\"", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:675:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, ", -font => \"%s%d%s\"", fontNames[fnum].prefix, data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:741:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s->createLine(qw/%.4fi %.4fi/", canvas, x2, y2); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:768:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, ", -arrow => '%s', -arrowshape => [0, '%fi', '%fi']", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:775:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow => '%s', -arrowshape => ['%fi', '%fi', '%fi']", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:780:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow => '%s', -arrowshape => ['%fi', '%fi', '%fi']", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:785:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow => '%s', -arrowshape => ['%fi', '%fi', '%fi']", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:881:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s->createPolygon(qw/%.4f %.4f/,", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:885:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s->createLine(", canvas); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:932:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -stipple => \"\\@%s%d\",", patname, data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:956:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow => '%s', -arrowshape =>" data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:964:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow => '%s', -arrowshape =>" data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:970:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow => '%s', -arrowshape =>" data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:976:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow => %s, -arrowshape =>" data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1055:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(sftp, ", -fill => '#%.6x', -stipple => \"\\@%s%d\"", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1156:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s->createArc(", canvas); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1196:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s->createOval(qw/%lfi %lfi %lfi %lfi/", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1221:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s->createLine(qw/%lfi %lfi %lfi %lfi/", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1225:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s->createLine('%fi','%fi'", canvas, data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1248:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, ", -arrow => '%s', " data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1256:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, ", -arrow => '%s', " data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1262:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, ", -arrow => '%s', -arrowshape => " data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1268:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, ", -arrow => '%s', -arrowshape => " data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1336:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s->createPolygon('%fi','%fi'", canvas, data/fig2dev-3.2.7b/fig2dev/dev/gensvg.c:459: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). (void) strcpy (papersize, optarg); data/fig2dev-3.2.7b/fig2dev/dev/gensvg.c:491:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(papersize, pd->name); /* use the "nice" form */ data/fig2dev-3.2.7b/fig2dev/dev/gentikz.c:860: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(tfp, GRIDLINE, PREC1(0.5*THICK_SCALE), 0.5*THICK_SCALE, data/fig2dev-3.2.7b/fig2dev/dev/gentikz.c:864: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(tfp, GRIDLINE, PREC1(1.25*THICK_SCALE), 1.25*THICK_SCALE, data/fig2dev-3.2.7b/fig2dev/dev/gentikz.c:975:2: [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(tfp, /* width and height must be given as dimen */ data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:139:10: [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). (void) strcpy (papersize, optarg); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:203: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(papersize, pd->name); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:447:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s create bitmap %fi %fi -anchor nw", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:451:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -bitmap @%s", p->file); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:576:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s create text %fi %fi", canvas, X(t->base_x), data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:609:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -font \"%s%d%s\"", fontNames[t->font+1].prefix, data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:639:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -font \"%s%d%s\"", fontNames[fnum].prefix, data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:705:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s create line %.4f %.4f", canvas, x2, y2); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:732:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow %s -arrowshape {0 %fi %fi}", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:739:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow %s -arrowshape {%fi %fi %fi}", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:744:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow %s -arrowshape {%fi %fi %fi}", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:749:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow %s -arrowshape {%fi %fi %fi}", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:843:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s create polygon %.4f %.4f", canvas, cx1, cy1); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:846:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s create line", canvas); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:893:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -stipple @$%s%d", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:917:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow %s -arrowshape " data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:925:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow %s -arrowshape " data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:931:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow %s -arrowshape " data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:937:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow %s -arrowshape " data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1012:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(sftp, " -fill #%.6x -stipple @$%s%d", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1115:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s create arc", canvas); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1154:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s create oval %fi %fi %fi %fi", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1180:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s create line %fi %fi %fi %fi", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1184:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s create line", canvas); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1208:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow %s -arrowshape {0 %fi %fi}", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1215:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow %s -arrowshape {%fi %fi %fi}", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1220:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow %s -arrowshape {%fi %fi %fi}", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1225:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, " -arrow %s -arrowshape {%fi %fi %fi}", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1293:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(stfp, "%s create polygon %fi %fi", canvas, X(p->x), Y(p->y)); data/fig2dev-3.2.7b/fig2dev/dev/readgif.c:209:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cmd, "giftopnm -quiet %s | ppmtopcx -quiet 2>/dev/null", data/fig2dev-3.2.7b/fig2dev/dev/readgif.c:212:18: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if ((giftopcx = popen(cmd, "r")) == 0) { data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:131:2: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(unc); data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:135: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(name, *retname); data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:143:12: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. fstream = popen(unc, "r"); data/fig2dev-3.2.7b/fig2dev/dev/readppm.c:60:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "ppmtopcx >%s 2>/dev/null", pcxname); data/fig2dev-3.2.7b/fig2dev/dev/readppm.c:61:18: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if ((giftopcx = popen(buf,"w" )) == 0) { data/fig2dev-3.2.7b/fig2dev/dev/readtif.c:63:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cmd, "tifftopnm %s 2>/dev/null | ppmtopcx 2>/dev/null", data/fig2dev-3.2.7b/fig2dev/dev/readtif.c:65:18: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if ((tiftopcx = popen(cmd, "r")) == 0) { data/fig2dev-3.2.7b/fig2dev/dev/readxbm.c:222:6: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(line,"#define %s %d",name_and_type,&value) == 2) { data/fig2dev-3.2.7b/fig2dev/dev/readxbm.c:235:6: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(line, "static short %s = {", name_and_type) == 1) data/fig2dev-3.2.7b/fig2dev/dev/readxbm.c:237:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. else if (sscanf(line,"static unsigned char %s = {",name_and_type) == 1) data/fig2dev-3.2.7b/fig2dev/dev/readxbm.c:239:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. else if (sscanf(line, "static char %s = {", name_and_type) == 1) data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:95:2: [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(buf, template); data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:96: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(template, buf); data/fig2dev-3.2.7b/fig2dev/fig2dev.c:180:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, argptr); data/fig2dev-3.2.7b/fig2dev/fig2dev.c:220: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, Usage, prog, prog); data/fig2dev-3.2.7b/fig2dev/fig2dev.c:338: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,Usage,prog,prog); data/fig2dev-3.2.7b/fig2dev/lib/strdup.c:49:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(p, str); data/fig2dev-3.2.7b/fig2dev/read.c:303:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(papersize, line); data/fig2dev-3.2.7b/fig2dev/read.c:346: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(gif_transparent, Fig_color_names[gif_colnum]); data/fig2dev-3.2.7b/fig2dev/read.c:1579: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(comp->comment, comments[i]); data/fig2dev-3.2.7b/fig2dev/read.c:1613: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(comments[numcom++], &line[i]); data/fig2dev-3.2.7b/fig2dev/read1_3.c:520:8: [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). (void)strcpy(t->cstring, buf); data/fig2dev-3.2.7b/fig2dev/trans_spline.c:526: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(lcomm->comment, scomm->comment); data/fig2dev-3.2.7b/transfig/sys.c:33:8: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ls = popen("/bin/ls *.fig", "r"); data/fig2dev-3.2.7b/transfig/sys.c:50:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(sysbuf, "%s~", file); data/fig2dev-3.2.7b/transfig/sys.c:81:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(temp, name); data/fig2dev-3.2.7b/transfig/sys.c:82: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(temp, suff); data/fig2dev-3.2.7b/fig2dev/colors.c:736: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. rgbfile = getenv("FIG2DEV_RGBFILE"); data/fig2dev-3.2.7b/fig2dev/creationdate.c:49: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. source_date_epoch = getenv("SOURCE_DATE_EPOCH"); data/fig2dev-3.2.7b/fig2dev/dev/genemf.c:3185: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. locale = getenv("LANG"); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:779: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. libdir = getenv("FIG2DEV_LIBDIR"); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:850: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. libdir = getenv("FIG2DEV_LIBDIR"); data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:82: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 ((p = (getenv("TMP") || getenv("TEMP"))) && data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:82:29: [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 ((p = (getenv("TMP") || getenv("TEMP"))) && data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:111:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand((unsigned int)time(NULL)); data/fig2dev-3.2.7b/fig2dev/colors.c:733: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 s[MAX_LINE], s1[MAX_LINE]; data/fig2dev-3.2.7b/fig2dev/colors.c:740:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(rgbfile, "r"); data/fig2dev-3.2.7b/fig2dev/colors.c:833: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 squeezed[MAX_LINE]; data/fig2dev-3.2.7b/fig2dev/dev/asc85ec.c:23:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char buf[4]; data/fig2dev-3.2.7b/fig2dev/dev/asc85ec.c:111:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buffer[512]; data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:49:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char com_buf[200 + L_xtmpnam + 256]; data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:52:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char errfname[L_xtmpnam] = "f2derrorXXXXXX"; data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:178:8: [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. n += sprintf(com + n, " -dJPEGQ=%d", jpeg_quality); data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:182:8: [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. n += sprintf(com + n, data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:191: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(com + n, "- -"); data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:194:8: [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. n += sprintf(com + n, " -sDEVICE=ppmraw -o - - | "); data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:205: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. n += sprintf(com + n, data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:208:9: [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. n += sprintf(com + n, data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:211:9: [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. n += sprintf(com + n, "{ ppmquant 256 | ppmtoxpm; }"); data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:213:9: [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. n += sprintf(com + n, "ppmtoacad"); data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:215:9: [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. n += sprintf(com + n, "ppmtopcx"); data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:217:9: [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. n += sprintf(com + n, "pnmtopng"); data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:219:9: [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. n += sprintf(com + n, "pnmtotiff"); data/fig2dev-3.2.7b/fig2dev/dev/gencgm.c:171:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(cgmcom, "ralcgm -b - "); data/fig2dev-3.2.7b/fig2dev/dev/gencgm.c:175:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(cgmcom, "ralcgm -b - -"); data/fig2dev-3.2.7b/fig2dev/dev/gendxf.c:144: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). if ((ffp = fopen(optarg, "r")) == NULL) data/fig2dev-3.2.7b/fig2dev/dev/gendxf.c:158: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). if ((ffp = fopen(optarg, "r")) == NULL) data/fig2dev-3.2.7b/fig2dev/dev/gendxf.c:179:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((ffp = fopen(optarg, "r")) == NULL) data/fig2dev-3.2.7b/fig2dev/dev/genemf.c:2298: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 cbits[4]; data/fig2dev-3.2.7b/fig2dev/dev/genemf.c:2397: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 buf[16], *realname; data/fig2dev-3.2.7b/fig2dev/dev/genemf.h:455: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 lcsFilename[MAX_PATH]; data/fig2dev-3.2.7b/fig2dev/dev/genemf.h:468:5: [2] (buffer) TCHAR: 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. TCHAR lcsFilename[MAX_PATH]; data/fig2dev-3.2.7b/fig2dev/dev/genemf.h:491:5: [2] (buffer) TCHAR: 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. TCHAR lfFaceName[LF_FACESIZE]; data/fig2dev-3.2.7b/fig2dev/dev/genemf.h:511:5: [2] (buffer) TCHAR: 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. TCHAR elfFullName[LF_FULLFACESIZE]; data/fig2dev-3.2.7b/fig2dev/dev/genemf.h:512:5: [2] (buffer) TCHAR: 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. TCHAR elfStyle[LF_FACESIZE]; data/fig2dev-3.2.7b/fig2dev/dev/genepic.c:274: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). encoding = atoi(optarg); data/fig2dev-3.2.7b/fig2dev/dev/genepic.c:299:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). LineThick = atoi(optarg); /* save user's argument here */ data/fig2dev-3.2.7b/fig2dev/dev/genepic.c:314:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). loop = atoi(optarg); data/fig2dev-3.2.7b/fig2dev/dev/genepic.c:334:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). DashStretch= atoi(optarg); data/fig2dev-3.2.7b/fig2dev/dev/gengbx.c:154:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char outbuf[GBX_BUF_SIZE]; data/fig2dev-3.2.7b/fig2dev/dev/gengbx.c:820: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 stime[CREATION_TIME_LEN]; data/fig2dev-3.2.7b/fig2dev/dev/genibmgl.c:220:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((ffp = fopen(optarg, "r")) == NULL) data/fig2dev-3.2.7b/fig2dev/dev/genibmgl.c:238: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). if ((ffp = fopen(optarg, "r")) == NULL) data/fig2dev-3.2.7b/fig2dev/dev/genibmgl.c:263:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((ffp = fopen(optarg, "r")) == NULL) data/fig2dev-3.2.7b/fig2dev/dev/genibmgl.c:329:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(papersize, "tabloid"); data/fig2dev-3.2.7b/fig2dev/dev/genlatex.c:266: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). thick_width = atoi(optarg); data/fig2dev-3.2.7b/fig2dev/dev/genlatex.c:274:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). encoding = atoi(optarg); data/fig2dev-3.2.7b/fig2dev/dev/genlatex.c:1004:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *ad1[4] = { " 0,-1", " 1, 0", " 0, 1", "-1, 0" }; data/fig2dev-3.2.7b/fig2dev/dev/genlatex.c:1005:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *ad2[4] = { "-1, 0", " 0,-1", " 1, 0", " 0, 1" }; data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:53:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char url[TEXT_LENGTH], alt[TEXT_LENGTH]; data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:54:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[2000]; data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:203: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 label[TEXT_LENGTH]; data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:274:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "<AREA SHAPE=\"poly\" COORDS=\""); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:276: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(&buf[strlen(buf)], "%d,%d,", cx, cy); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:279: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(&buf[strlen(buf)], "%d,%d", data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:282:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(&buf[strlen(buf)], ",%d,%d", data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:311: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(buf, "<AREA SHAPE=\"poly\" COORDS=\""); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:314:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(&buf[strlen(buf)], "%d,%d", data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:354: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(buf, "<AREA SHAPE=\"poly\" COORDS=\""); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:365:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(&buf[strlen(buf)], "%d,%d", x, y); data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:201:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char options[1024] = ""; data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:210:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char xfigpsfonts[35][FONTNAMESIZE] = { data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:253:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char xfiglatexfonts[6][FONTNAMESIZE] = { data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:265:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char xfigcolors[32][17] = { data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:336: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(immediate_insert_filename,"r"))!=NULL) { data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:450:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). prologues_nr = atoi(optarg); data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:1106:6: [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 tmpstr[15]; data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:1225:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char p_string[30]; data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:1230: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(p_string,"(%.2lf,%.2lf,%.2lf)", data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:1235:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(p_string,"(0.00,0.00,0.00)"); data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:1242:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char f_string[100]; data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:1245: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(f_string,"withcolor (black + %.2lfwhite)", data/fig2dev-3.2.7b/fig2dev/dev/genpict2e.c:225:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). border_margin = atoi(optarg); data/fig2dev-3.2.7b/fig2dev/dev/genpict2e.c:232:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). default_color = atoi(optarg); data/fig2dev-3.2.7b/fig2dev/dev/genpict2e.c:282:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ltxarrow = atoi(optarg); data/fig2dev-3.2.7b/fig2dev/dev/genpict2e.c:646:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(unit,"cm"); data/fig2dev-3.2.7b/fig2dev/dev/genpictex.c:121:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). encoding = atoi(optarg); data/fig2dev-3.2.7b/fig2dev/dev/genpictex.c:147: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 host[256]; data/fig2dev-3.2.7b/fig2dev/dev/genpictex.c:149: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 date_buf[CREATION_TIME_LEN]; data/fig2dev-3.2.7b/fig2dev/dev/genpictex.c:167:12: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. (void)strcpy(host, "unknown-host!?!?"); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:102:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char tmpeps[L_xtmpnam + 17] = "f2dtmpepsXXXXXX"; data/fig2dev-3.2.7b/fig2dev/dev/genps.c:104:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char tmpprev[L_xtmpnam + 18] = "f2dtmpprevXXXXXX"; data/fig2dev-3.2.7b/fig2dev/dev/genps.c:145:41: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static void convert_xpm_colors(unsigned char cmap[3][MAXCOLORMAPSIZE], data/fig2dev-3.2.7b/fig2dev/dev/genps.c:221: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 *fill_def[NUMPATTERNS] = { data/fig2dev-3.2.7b/fig2dev/dev/genps.c:448: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). xoff = atoi(optarg); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:454: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). yoff = atoi(optarg); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:474: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 host[256]; data/fig2dev-3.2.7b/fig2dev/dev/genps.c:475: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 date_buf[CREATION_TIME_LEN]; data/fig2dev-3.2.7b/fig2dev/dev/genps.c:482: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 psize[20]; data/fig2dev-3.2.7b/fig2dev/dev/genps.c:485: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 filename[512], str[512]; data/fig2dev-3.2.7b/fig2dev/dev/genps.c:516:2: [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(host,"llx=%d\n",llx); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:533:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(papersize, "tabloid"); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:645:10: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. (void) strcpy(host, "unknown host"); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:788: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(filename, "rb"); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:848: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 localefile[512], str[512]; data/fig2dev-3.2.7b/fig2dev/dev/genps.c:863: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(localefile, "rb"); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:1218: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[BUFSIZ+1]; data/fig2dev-3.2.7b/fig2dev/dev/genps.c:1221: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). if ((infile = fopen(infilename, "r")) == 0) { data/fig2dev-3.2.7b/fig2dev/dev/genps.c:1244: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). if ((infile = fopen(infilename, "r")) == 0) { data/fig2dev-3.2.7b/fig2dev/dev/genps.c:1351: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[512]; data/fig2dev-3.2.7b/fig2dev/dev/genps.c:2524: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 colorspace[13], pencolor[25], fillcolor[25]; data/fig2dev-3.2.7b/fig2dev/dev/genps.c:2530:6: [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(colorspace, "/DeviceGray"); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:2531:6: [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(fillcolor, "%.2f", grayfill); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:2532:6: [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(pencolor, "%.2f", graypen); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:2534:6: [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(colorspace, "/DeviceRGB"); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:2535:6: [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(fillcolor, "%.2f %.2f %.2f", fill_r, fill_g, fill_b); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:2536:6: [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(pencolor, "%.2f %.2f %.2f", pen_r, pen_g, pen_b); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:2674:29: [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. convert_xpm_colors(unsigned char cmap[3][MAXCOLORMAPSIZE], XpmColor *coltabl, int ncols) data/fig2dev-3.2.7b/fig2dev/dev/genpstex.c:80:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char pstex_file[1000] = ""; data/fig2dev-3.2.7b/fig2dev/dev/genpstex.c:88:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char szFileName[1000]; data/fig2dev-3.2.7b/fig2dev/dev/genpstex.c:173:2: [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(szFileName + iLength, ".create"); data/fig2dev-3.2.7b/fig2dev/dev/genpstex.c:174:17: [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). ptCreateFile = fopen (szFileName, "wb"); data/fig2dev-3.2.7b/fig2dev/dev/genpstex.c:222:2: [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(szFileName + iLength, ".size"); data/fig2dev-3.2.7b/fig2dev/dev/genpstex.c:273: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 szFileName[1000]; data/fig2dev-3.2.7b/fig2dev/dev/genpstex.c:280:2: [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(szFileName + iLength, "%03d", iObjectsFileNumber++); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:358: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 str[1]; data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:422:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char Pic_convert_dir[245] = ""; /* 256 minus length of "/readme.txt" */ data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:440: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 str[MAX_PST_VERSION_STRING_SIZE]; data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:441: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 key[MAX_PST_VERSION_STRING_SIZE * 2]; data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:494: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 (&v->key[M - i], v->str, i); /* save major in key */ data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:522: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 (&v->key[M], &v->str[i_minor], i - i_minor); /* save minor in key */ data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:531: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 (&v->key[M], &v->str[i_minor], i - i_minor); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:568: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 fn[256]; data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:632:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(fn, "w"); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:982: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 name[24]; data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1029: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 rn[100]; data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1100: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 *special, rn[100]; data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1152:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char names[20][16]; /* grayxviii */ data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1153: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 rn[100]; data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1243: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 fill_fillcolor_option[50], linecolor_option[50]; data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1562: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(opts_curb, "%c", ch_arrow); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1617:2: [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(opts_sqrb, "dotsize="DBL" 2", cm_from_1200ths(arrow->ht)); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1623:2: [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(opts_sqrb, "dotsize="DBL" 2", cm_from_1200ths(arrow->ht)); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1631:2: [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(opts_curb, "%c", (ch_arrow == '<') ? '>' : '<'); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1636: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(opts_sqrb, "tbarsize="DBL" 2", cm_from_1200ths(arrow->wid)); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1644: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(opts_curb, "%c", (ch_arrow == '<') ? '>' : '<'); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1655: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(opts_curb, "%c", (ch_arrow == '<') ? '[' : ']'); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1664: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(opts_sqrb, "arrowsize="DBL" 2,arrowlength=%.5lf,arrowinset=%.5lf", data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1705: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 tmps[256], tmps_alt[256], data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1734: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(tmps, "linewidth="DBL"", data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1750: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(tmps, "linestyle=dotted,dotsep="DBL"", data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1756: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(tmps, "linestyle=dashed,dash="DBL" "DBL"", data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1764: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(tmps, "linestyle=dashed,dash="DBL" "DBL" "DBL" "DBL"", data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1774: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(tmps, "linestyle=dashed,dash="DBL" "DBL" "DBL" "DBL" "DBL" "DBL"", data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1815:2: [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(prefix, "\\pstVerb{%d setlinejoin}%%\n", join_style); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1816:2: [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(postfix, "\\pstVerb{0 setlinejoin}%%\n"); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1820:2: [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(tmps, "linejoin=%d", join_style); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1950:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256], uniqified_base[256], *base, *ext; data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2072:7: [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 cmd[1024]; data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2103: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 options[256], file_name[256], prefix[256], postfix[256]; data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2141: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(options, "cornersize=absolute,linearc="DBL"", cm_from_1200ths(radius)); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2310: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 options[256]; data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2445: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 options[256]; data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2716: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 formatted_text[64*1024]; data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2717: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 angle[32]; data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2732: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(angle, "{%.2lf}", text->angle * (180.0 / M_PI)); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2759: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 options[256]; data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:393: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 stfp[1024]; data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:396:11: [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 buf[16]; data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:488: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(stfp, ", -foreground => '#%6.6x'", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:493: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(stfp, ", -background => '#%6.6x'", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:497: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(stfp, ");\n"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:521: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 stfp[2048]; data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:613:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(stfp, " -text/, '"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:627: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(stfp, ", -anchor => 'sw'"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:631: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(stfp, ", -anchor => 's'"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:634: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(stfp, ", -anchor => 'se'"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:680: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(stfp, ", -fill => '#%6.6x'", rgbColorVal(t->color)); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:683:2: [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(stfp, ");\n"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:702: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 stfp[64]; data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:709: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(stfp, ", '%.4fi', '%.4fi'", x3, y3); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:731: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 dir[8], stfp[1024]; data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:757:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "last"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:760:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "first"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:763:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "both"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:798: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(stfp, ", -capstyle => 'round'"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:802: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(stfp, ", -capstyle => 'projecting'"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:811: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(stfp, ", -width => '%d'", s->thickness); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:815: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(stfp, ", -fill => '#%6.6x'", s->pen_color); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:818:2: [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(stfp, ");\n"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:830: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 stfp[64]; data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:839: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(stfp, "'%.4fi', '%.4fi',\n", xmid, ymid); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:847: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(stfp, "'%.4fi', '%.4fi', ", x4, y4); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:863: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 dir[8], stfp[1024]; data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:918: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(stfp, " -outline => undef,"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:921: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(stfp, " -outline => '#%6.6x',", s->pen_color); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:925: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(stfp, " -fill => undef,"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:928: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(stfp, " -fill => '#%6.6x',", s->fill_color); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:937: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(stfp, " -width => %d", s->thickness); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:945:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "last"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:948:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "first"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:951:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "both"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:991: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(stfp, " -capstyle => 'round',"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:995: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(stfp, " -capstyle => 'projecting',"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1004: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(stfp, " -width => '%d',", s->thickness); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1008: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(stfp, " -fill => '#%6.6x',", s->pen_color); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1012:2: [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(stfp, ");\n"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1042: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 sftp[256]; data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1049: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(sftp, ", -fill => '#%.6x', -outline => undef, -width => 0);\n", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1068: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(sftp, ", -fill => &$shade('#%.6x', %d)", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1073: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(sftp, ", -fill => &$tint('#%.6x', %d)", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1087: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(sftp, ", -fill => '#%.6x'", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1095: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(sftp, ", -outline => '#%.6x'", rgbColorVal(penColor)); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1098: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(sftp, ", -width => %d", thickness/15); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1105:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(sftp, ", -outline => undef, -width => 0"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1108:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(sftp, ");\n"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1123: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 stfp[1024]; data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1159:2: [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(stfp, "qw/%.3fi %.3fi %.3fi %.3fi", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1163:2: [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(stfp, " -start %lf -extent %lf/", startAngle, extent); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1169:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(stfp, ", -style => 'arc'"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1171:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(stfp, ", -style => 'chord'"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1175:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(stfp, ", -style => 'pieslice'"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1192: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 stfp[1024]; data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1212: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 dir[8], stfp[1024]; data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1229: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(stfp, ", '%fi','%fi'", X(q->x), Y(q->y)); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1237:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "last"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1240:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "first"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1243:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "both"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1284: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(stfp, ", -joinstyle => 'round'"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1288: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(stfp, ", -joinstyle => 'bevel'"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1300: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(stfp, ", -capstyle => 'round'"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1304: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(stfp, ", -capstyle => 'projecting'"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1313: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(stfp, ", -width => %d", thickness); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1317: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(stfp, ", -fill => '#%6.6x'", rgbColorVal(penColor)); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1320:2: [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(stfp, ");\n"); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1331: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 stfp[1024]; data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1342: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(stfp, ", '%fi','%fi'", X(q->x), Y(q->y)); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1351: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(stfp, ", '%fi','%fi'", X(q->x), Y(q->y)); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1359: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 stfp[200]; data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1368: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(stfp, ", -dash => [%d,%d]", round(v), round(v)); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1371: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(stfp, ", -dash => [%d,%d]", one, round(v)); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1374: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(stfp, ", -dash => [%d,%d,%d,%d]", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1379: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(stfp, ", -dash => [%d,%d,%d,%d,%d,%d]", data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1384: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(stfp, ", -dash => [%d,%d,%d,%d,%d,%d,%d,%d]", data/fig2dev-3.2.7b/fig2dev/dev/gensvg.c:474: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 date_buf[CREATION_TIME_LEN]; data/fig2dev-3.2.7b/fig2dev/dev/gensvg.c:961:8: [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. const char *anchor[3] = { "start", "middle", "end" }; data/fig2dev-3.2.7b/fig2dev/dev/gensvg.c:962:8: [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. const char *family[9] = { "Times", "AvantGarde", data/fig2dev-3.2.7b/fig2dev/dev/gentextyl.c:88:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). linethick = atoi(optarg); data/fig2dev-3.2.7b/fig2dev/dev/gentikz.c:96: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[9]; data/fig2dev-3.2.7b/fig2dev/dev/gentikz.c:146: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. static const char *arrowflag[3] = { data/fig2dev-3.2.7b/fig2dev/dev/gentikz.c:298:22: [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). border_margin = atoi(optarg); data/fig2dev-3.2.7b/fig2dev/dev/gentikz.c:305:22: [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). default_color = atoi(optarg); data/fig2dev-3.2.7b/fig2dev/dev/gentikz.c:729:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(unit,"cm"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:389: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 stfp[256]; data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:392:11: [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 buf[16]; data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:455: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(stfp, " -foreground #%6.6x", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:461: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(stfp, " -background #%6.6x", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:488: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 stfp[2048]; data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:579:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(stfp, " -text \""); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:592: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(stfp, " -anchor sw"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:596: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(stfp, " -anchor s"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:599: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(stfp, " -anchor se"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:644: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(stfp, " -fill #%6.6x", rgbColorVal(t->color)); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:666: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 stfp[64]; data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:673: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(stfp, " %.4f %.4f", x3, y3); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:695: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 dir[8], stfp[256]; data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:721:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "last"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:724:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "first"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:727:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "both"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:762: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(stfp, " -capstyle round"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:766: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(stfp, " -capstyle projecting"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:775: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(stfp, " -width %d", s->thickness); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:779: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(stfp, " -fill #%6.6x", s->pen_color); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:792: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 stfp[64]; data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:801: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(stfp, " %.4f %.4f;\n", xmid, ymid); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:809: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(stfp, " %.4f %.4f", x4, y4); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:825: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 dir[8], stfp[256]; data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:879: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(stfp, " -outline {}"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:882: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(stfp, " -outline #%6.6x", s->pen_color); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:886: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(stfp, " -fill {}"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:889: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(stfp, " -fill #%6.6x", s->fill_color); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:898: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(stfp, " -width %d", s->thickness); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:906:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "last"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:909:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "first"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:912:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "both"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:951: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(stfp, " -capstyle round"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:955: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(stfp, " -capstyle projecting"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:964: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(stfp, " -width %d", s->thickness); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:968: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(stfp, " -fill #%6.6x", s->pen_color); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1000: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 sftp[256]; data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1006: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(sftp, " -fill #%.6x -outline {} -width 0\n", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1026: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(sftp, " -fill [::tk::Darken #%.6x %d]", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1031: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(sftp, " -fill [tint #%.6x %d]", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1045: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(sftp, " -fill #%.6x", rgbColorVal(fillColor)); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1054: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(sftp, " -outline #%.6x", rgbColorVal(penColor)); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1057: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(sftp, " -width %d", thickness/15); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1064:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(sftp, " -outline {} -width 0"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1082: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 stfp[256]; data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1118:2: [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(stfp, " %.3fi %.3fi %.3fi %.3fi", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1122:2: [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(stfp, " -start %f -extent %f", startAngle, extent); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1128:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(stfp, " -style arc"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1130:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(stfp, " -style chord"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1134:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(stfp, " -style pieslice"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1150: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 stfp[256]; data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1170: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 dir[8], stfp[256]; data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1186: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(stfp, " %fi %fi", X(p->x), Y(p->y)); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1189: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(stfp, " %fi %fi", X(q->x), Y(q->y)); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1197:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "last"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1200:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "first"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1203:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dir, "both"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1241: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(stfp, " -joinstyle round"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1245: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(stfp, " -joinstyle bevel"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1257: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(stfp, " -capstyle round"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1261: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(stfp, " -capstyle projecting"); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1270: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(stfp, " -width %d", thickness); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1274: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(stfp, " -fill #%6.6x", rgbColorVal(penColor)); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1287: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 stfp[256]; data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1298: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(stfp, " %fi %fi", X(q->x), Y(q->y)); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1307: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(stfp, " %fi %fi", X(q->x), Y(q->y)); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1315: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 stfp[200]; data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1324: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(stfp, " -dash {%d %d}", round(v), round(v)); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1327: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(stfp, " -dash {%d %d}", one, round(v)); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1330: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(stfp, " -dash {%d %d %d %d}", round(v), data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1334: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(stfp, " -dash {%d %d %d %d %d %d}", data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1339: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(stfp, " -dash {%d %d %d %d %d %d %d %d}", data/fig2dev-3.2.7b/fig2dev/dev/gentpic.c:465: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 attr[80]; data/fig2dev-3.2.7b/fig2dev/dev/gentpic.c:483: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(attr, "dashed"); data/fig2dev-3.2.7b/fig2dev/dev/gentpic.c:485: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(attr, "dotted"); data/fig2dev-3.2.7b/fig2dev/dev/gentpic.c:487: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(attr, " invis"); data/fig2dev-3.2.7b/fig2dev/dev/psencode.c:259: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 s[80]; data/fig2dev-3.2.7b/fig2dev/dev/psencode.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(s,"%02x%02x%02x", R[k], G[k], B[k]); put_string; data/fig2dev-3.2.7b/fig2dev/dev/readeps.c:68: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[BUFSIZ]; data/fig2dev-3.2.7b/fig2dev/dev/readeps.c:139:11: [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 buf[BUFSIZ]; data/fig2dev-3.2.7b/fig2dev/dev/readgif.c:53: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 cmap[3][MAXCOLORMAPSIZE]); data/fig2dev-3.2.7b/fig2dev/dev/readgif.c:67:11: [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 ColorMap[3][MAXCOLORMAPSIZE]; data/fig2dev-3.2.7b/fig2dev/dev/readgif.c:87: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[512]; data/fig2dev-3.2.7b/fig2dev/dev/readgif.c:94: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 version[4]; data/fig2dev-3.2.7b/fig2dev/dev/readgif.c:95:11: [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 transp[3]; /* RGB of transparent color (if any) */ data/fig2dev-3.2.7b/fig2dev/dev/readgif.c:241: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 cmap[3][MAXCOLORMAPSIZE]) data/fig2dev-3.2.7b/fig2dev/dev/readgif.c:244:11: [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 rgb[3]; data/fig2dev-3.2.7b/fig2dev/dev/readgif.c:261:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char buf[256]; data/fig2dev-3.2.7b/fig2dev/dev/readgif.c:291: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(str, "UNKNOWN (0x%02x)", label); data/fig2dev-3.2.7b/fig2dev/dev/readjpg.c:57:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buffer[BUFSIZ]; data/fig2dev-3.2.7b/fig2dev/dev/readjpg.c:103: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 date_buf[CREATION_TIME_LEN]; data/fig2dev-3.2.7b/fig2dev/dev/readjpg.c:340: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 appstring[APP_MAX]; data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:61:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(unc, "gunzip -q -c "); /* tell gunzip to output to stdout */ data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:64:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(unc, "gunzip -q "); data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:74: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(unc + pos, name, len + 1); /* strcat(unc, name) */ data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:80: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(*retname, name, len + 1); /* strcpy(*retname, name) */ data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:86: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(*retname, name, len); data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:87: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(*retname + len, ".gz", (size_t) 4); /* retname = name".gz" */ data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:90:6: [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(unc + pos, *retname, len + 4); data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:94:6: [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(*retname + len, ".z", (size_t) 3); data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:97: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(unc + pos, *retname, len + 3); data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:101: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(*retname + len, ".Z", (size_t) 3); data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:104: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(unc + pos, *retname, len + 3); data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:113: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(*retname, p + 1, len -= (p - name)); data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:116:8: [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(name, *retname, len); data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:141:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fstream = fopen(name, "rb"); data/fig2dev-3.2.7b/fig2dev/dev/readpng.c:200: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(ptr, row_pointers[i], rowsize); data/fig2dev-3.2.7b/fig2dev/dev/readppm.c:44: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[BUFSIZ]; data/fig2dev-3.2.7b/fig2dev/dev/readppm.c:45: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 pcxname[L_xtmpnam + 17] = "f2dtmppcxXXXXXX"; data/fig2dev-3.2.7b/fig2dev/dev/readppm.c:71:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((giftopcx = fopen(pcxname, "rb")) == NULL) { data/fig2dev-3.2.7b/fig2dev/dev/readxbm.c:200: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 line[MAX_SIZE]; /* input line from file */ data/fig2dev-3.2.7b/fig2dev/dev/readxbm.c:202: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_and_type[MAX_SIZE]; /* an input line */ data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:58: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[L_xtmpnam]; data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:73: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(buf, P_tmpdir, t); data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:74: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(buf + t, "/", (size_t)2); data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:85: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(buf, p, t); data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:86: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(buf + t, "/", (size_t)2); data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:100:11: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). if ((i = mkstemp(template)) == -1) data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:115: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(p, "%6x", (unsigned)(rand() & 0xffffff)); data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:116:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (fopen(template, "rb") == NULL) data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:117: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). f = fopen(template, mode); data/fig2dev-3.2.7b/fig2dev/fig2dev.c:83: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 gif_transparent[20]="\0"; /* GIF transp color hex name (e.g. #ff00dd) */ data/fig2dev-3.2.7b/fig2dev/fig2dev.c:85: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 boundingbox[64]; /* boundingbox */ data/fig2dev-3.2.7b/fig2dev/fig2dev.c:86: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 lang[40]; /* selected output language */ data/fig2dev-3.2.7b/fig2dev/fig2dev.c:92: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 gscom[1000]; /* to build up a command for ghostscript */ data/fig2dev-3.2.7b/fig2dev/fig2dev.c:443: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). if ((tfp = fopen(to, "wb")) == NULL) { data/fig2dev-3.2.7b/fig2dev/fig2dev.h:104:8: [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. extern char papersize[16]; /* paper size */ data/fig2dev-3.2.7b/fig2dev/object.h:186:11: [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 cmap[3][MAXCOLORMAPSIZE]; /* for color files */ data/fig2dev-3.2.7b/fig2dev/read.c:86:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *comments[MAXCOMMENTS]; /* comments saved for current object */ data/fig2dev-3.2.7b/fig2dev/read.c:138:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(file_name, "r")) == NULL) data/fig2dev-3.2.7b/fig2dev/read.c:194: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[16]; data/fig2dev-3.2.7b/fig2dev/read.c:337: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). gif_colnum = atoi(line); data/fig2dev-3.2.7b/fig2dev/read.c:358:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(papersize,"A4"); data/fig2dev-3.2.7b/fig2dev/read.c:360:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(papersize,"Letter"); data/fig2dev-3.2.7b/fig2dev/read.c:520: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(gif_transparent, "#%2x%2x%2x", data/fig2dev-3.2.7b/fig2dev/read.c:1116: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(l->pic->file + (c - from + 1), file, len + 1); data/fig2dev-3.2.7b/fig2dev/read.c:1120: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(l->pic->file, file, len + 1); data/fig2dev-3.2.7b/fig2dev/read.c:1453: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(next, start, len); data/fig2dev-3.2.7b/fig2dev/read.c:1461: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(next + len, *line, end - *line + 1); data/fig2dev-3.2.7b/fig2dev/read.c:1469: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(next + len, *line, chars + 1); data/fig2dev-3.2.7b/fig2dev/read.c:1516: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(t->cstring, start, len + 1); data/fig2dev-3.2.7b/fig2dev/read.c:1681: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[BUFSIZ]; data/fig2dev-3.2.7b/fig2dev/read1_3.c:490: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[128]; data/fig2dev-3.2.7b/fig2dev/tests/test1.c:51: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[BUFSIZ]; data/fig2dev-3.2.7b/fig2dev/tests/test1.c:63: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(filepath, i18ndir, n); data/fig2dev-3.2.7b/fig2dev/tests/test1.c:64: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(filepath + n, "/cs_CZ.ps", (size_t)10); data/fig2dev-3.2.7b/fig2dev/tests/test1.c:65:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (fopen(filepath, mode) == NULL) { data/fig2dev-3.2.7b/transfig/sys.c:24:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char sysbuf[MAXSYS]; data/fig2dev-3.2.7b/transfig/transfig.c:202:18: [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). else if ((tx = fopen(txfile, "w")) == NULL) { data/fig2dev-3.2.7b/transfig/transfig.c:213:18: [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). else if ((mk = fopen(mkfile, "w")) == NULL) { data/fig2dev-3.2.7b/fig2dev/colors.c:792: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). len = strlen(name); data/fig2dev-3.2.7b/fig2dev/dev/asc85ec.c:34:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((i = getc(in)) == EOF) data/fig2dev-3.2.7b/fig2dev/dev/genbitmaps.c:141:7: [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). n = strlen(to); data/fig2dev-3.2.7b/fig2dev/dev/gencgm.c:170: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). cgmcom = malloc(strlen(to) + 13); data/fig2dev-3.2.7b/fig2dev/dev/genemf.c:2969:24: [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). srcleft = srccnt = strlen(str); data/fig2dev-3.2.7b/fig2dev/dev/genemf.c:3011: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). *n_chars = strlen(str); data/fig2dev-3.2.7b/fig2dev/dev/genemf.c:3220: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). if ((comm.comment = malloc(strlen(figname) + data/fig2dev-3.2.7b/fig2dev/dev/genemf.c:3232:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). commlen += strlen(p->comment) + 1; data/fig2dev-3.2.7b/fig2dev/dev/genibmgl.c:1112:41: [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). fprintf(tfp, "CP%.4f,0.0;", -(double)(strlen(t->cstring)/2.0)); data/fig2dev-3.2.7b/fig2dev/dev/genibmgl.c:1115:41: [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). fprintf(tfp, "CP%.4f,0.0;", -(double)(strlen(t->cstring))); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:148:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). hl->url = (char *)malloc(strlen(url) + 1); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:150:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). hl->alt = (char *)malloc(strlen(alt) + 1); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:152:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). hl->area = (char *)malloc(strlen(area) + 1); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:166:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). basename = (char *)malloc(strlen(to) + 1); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:168: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). for (i = strlen(basename) - 1; 0 < i; i--) { data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:228: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). len = len + strlen(label) + 3; data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:276: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). sprintf(&buf[strlen(buf)], "%d,%d,", cx, cy); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:278:24: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. if (alpha != sa) sprintf(&buf[strlen(buf)], ","); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:278: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). if (alpha != sa) sprintf(&buf[strlen(buf)], ","); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:279: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). sprintf(&buf[strlen(buf)], "%d,%d", data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:282: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). sprintf(&buf[strlen(buf)], ",%d,%d", data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:284: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). sprintf(&buf[strlen(buf)], "\" %s>\n", ref); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:313:20: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. if (theta != 0.0) sprintf(&buf[strlen(buf)], ","); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:313: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). if (theta != 0.0) sprintf(&buf[strlen(buf)], ","); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:314:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sprintf(&buf[strlen(buf)], "%d,%d", data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:320: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). sprintf(&buf[strlen(buf)], "\" %s>\n", ref); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:360:22: [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 (sizeof(buf) < strlen(buf) + 100) { data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:364:26: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. if (p != l->points) sprintf(&buf[strlen(buf)], ","); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:364:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (p != l->points) sprintf(&buf[strlen(buf)], ","); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:365: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). sprintf(&buf[strlen(buf)], "%d,%d", x, y); data/fig2dev-3.2.7b/fig2dev/dev/genmap.c:371: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). sprintf(&buf[strlen(buf)], "\" %s>\n", ref); data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:345:16: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c=getc(in))!=EOF) { data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:460: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). cllen = strlen(options); data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:467:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (optarg != NULL && (cllen+strlen(optarg+2)<sizeof(options))) { data/fig2dev-3.2.7b/fig2dev/dev/genmp.c:1134:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ( tmpstr, cp, delim_length ); data/fig2dev-3.2.7b/fig2dev/dev/genpdf.c:76:7: [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). n = strlen(to); data/fig2dev-3.2.7b/fig2dev/dev/genpict2e.c:1640: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). n = c == NULL ? (int) strlen(l->pic->file) : c - l->pic->file; data/fig2dev-3.2.7b/fig2dev/dev/genpict2e.c:1642: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). n = strlen(l->pic->file); data/fig2dev-3.2.7b/fig2dev/dev/genps.c:729: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). for (i = strlen(psize)-1; i >= 0; --i) data/fig2dev-3.2.7b/fig2dev/dev/genps.c:1464:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((c=getc(picf))==EOF) data/fig2dev-3.2.7b/fig2dev/dev/genps.c:1774:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((len = read(fileno(picf),buf,sizeof(buf))) > 0) { data/fig2dev-3.2.7b/fig2dev/dev/genpstex.c:170:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(szFileName, pstex_file, 900); data/fig2dev-3.2.7b/fig2dev/dev/genpstex.c:171: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). iLength = strlen(szFileName); data/fig2dev-3.2.7b/fig2dev/dev/genpstex.c:276:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(szFileName, pstex_file, 900); data/fig2dev-3.2.7b/fig2dev/dev/genpstex.c:277: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). iLength = strlen(szFileName); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:170:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *c = (char*)xmalloc(strlen(s) + 1); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:242:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *lst += strlen(*lst); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:387:67: [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). stn = (STRING_TABLE_NODE*)xmalloc(sizeof(STRING_TABLE_NODE) + strlen(str)); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:475:7: [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(str) > sizeof v->str - 1) { data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1637:2: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(opts_curb, "|"); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:1836: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(opts_curb, "-"); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2021: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). iext = strlen(buf); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2561: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). p += strlen(p); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2572: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). p += strlen(p); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2577: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(p, "}"); data/fig2dev-3.2.7b/fig2dev/dev/genpstricks.c:2578: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). p += strlen(p); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:614: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). j = strlen(stfp); data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:615: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). for (i = 0; i < strlen(t->cstring); ++i) { data/fig2dev-3.2.7b/fig2dev/dev/genptk.c:1444: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). len = strlen(s); data/fig2dev-3.2.7b/fig2dev/dev/genshape.c:138:27: [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 ((groupid==NULL) || (strlen(groupid)==0)) die("Programming Error: no groupname specified"); data/fig2dev-3.2.7b/fig2dev/dev/genshape.c:1027:9: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. bool equal; data/fig2dev-3.2.7b/fig2dev/dev/genshape.c:1201:14: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. while (equal && (aind<num_above_borders) && (bind<num_below_borders)) { data/fig2dev-3.2.7b/fig2dev/dev/genshape.c:1252:14: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. while (equal && aind<num_above_borders) { data/fig2dev-3.2.7b/fig2dev/dev/genshape.c:1273:14: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. while (equal && bind<num_below_borders) { data/fig2dev-3.2.7b/fig2dev/dev/genshape.c:1292:11: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (equal) { data/fig2dev-3.2.7b/fig2dev/dev/gentikz.c:956:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = c == NULL ? (int)strlen(pic->file) : c - pic->file; data/fig2dev-3.2.7b/fig2dev/dev/gentikz.c:958: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). n = strlen(pic->file); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:580: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). j = strlen(stfp); data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:581: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). for (i = 0; i < strlen(t->cstring); ++i) { data/fig2dev-3.2.7b/fig2dev/dev/gentk.c:1399: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). len = strlen(s); data/fig2dev-3.2.7b/fig2dev/dev/psencode.c:38: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). #define put_string nc=strlen(s); for(i=0;i<nc;++i) putc((s[i]),tfp); Nbyte += nc data/fig2dev-3.2.7b/fig2dev/dev/psencode.c:295:7: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(s,"\n"); put_string; data/fig2dev-3.2.7b/fig2dev/dev/psencode.c:297:7: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(s, " "); put_string; data/fig2dev-3.2.7b/fig2dev/dev/readgif.c:116:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(version, (char*)(buf + 3), 3); data/fig2dev-3.2.7b/fig2dev/dev/readgif.c:204: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). if ((cmd = malloc(strlen(realname) + 50)) == NULL) { data/fig2dev-3.2.7b/fig2dev/dev/readjpg.c:308:27: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). val = (unsigned int) (getc(fp) << 8); data/fig2dev-3.2.7b/fig2dev/dev/readjpg.c:309:28: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). val += (unsigned int) (getc(fp)); data/fig2dev-3.2.7b/fig2dev/dev/readjpg.c:323:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fp); data/fig2dev-3.2.7b/fig2dev/dev/readjpg.c:326:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fp); data/fig2dev-3.2.7b/fig2dev/dev/readjpg.c:367:30: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). image->bits_per_component = getc(image->fp); data/fig2dev-3.2.7b/fig2dev/dev/readjpg.c:370:24: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). image->components = getc(image->fp); data/fig2dev-3.2.7b/fig2dev/dev/readjpg.c:379:8: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). b = getc(image->fp); data/fig2dev-3.2.7b/fig2dev/dev/readjpg.c:431:8: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). b = getc(image->fp); data/fig2dev-3.2.7b/fig2dev/dev/readjpg.c:460:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (void) getc(image->fp); data/fig2dev-3.2.7b/fig2dev/dev/readpcx.c:162:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inbyte=fgetc(pcxfile); data/fig2dev-3.2.7b/fig2dev/dev/readpcx.c:168:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inbyte2=fgetc(pcxfile); data/fig2dev-3.2.7b/fig2dev/dev/readpcx.c:206:10: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (void) fgetc(pcxfile); /* ditch splitter byte */ data/fig2dev-3.2.7b/fig2dev/dev/readpcx.c:208:27: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pic->cmap[RED][x] = fgetc(pcxfile); data/fig2dev-3.2.7b/fig2dev/dev/readpcx.c:209:29: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pic->cmap[GREEN][x] = fgetc(pcxfile); data/fig2dev-3.2.7b/fig2dev/dev/readpcx.c:210:28: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pic->cmap[BLUE][x] = fgetc(pcxfile); data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:56: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). len = strlen(name); data/fig2dev-3.2.7b/fig2dev/dev/readpics.c:66: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). pos = strlen(unc); data/fig2dev-3.2.7b/fig2dev/dev/readtif.c:57: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). if ((cmd = malloc(strlen(filename) + 50)) == 0) { data/fig2dev-3.2.7b/fig2dev/dev/readxbm.c:158:7: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = getc(file); data/fig2dev-3.2.7b/fig2dev/dev/readxbm.c:219: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(line) == MAX_SIZE-1) { data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:67: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). n = strlen(template); data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:70: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). t = strlen(P_tmpdir); data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:83: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). (t = strlen(p)) + n + 1 < (size_t)L_xtmpnam) { data/fig2dev-3.2.7b/fig2dev/dev/xtmpfile.c:105: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). i = strlen(template); data/fig2dev-3.2.7b/fig2dev/fig2dev.c:267:24: [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 ((size_t)nchars < strlen(p+1)) { data/fig2dev-3.2.7b/fig2dev/fig2dev.c:298:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(lang,optarg,sizeof(lang)-1); data/fig2dev-3.2.7b/fig2dev/fig2dev.c:439: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 (strcmp(to + strlen(to) - 4, ".fig") == 0 ){ data/fig2dev-3.2.7b/fig2dev/lib/strdup.c:47: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). p = (char *)malloc(strlen(str) + 1); data/fig2dev-3.2.7b/fig2dev/lib/strndup.c:31:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(p, str, n); data/fig2dev-3.2.7b/fig2dev/lib/strstr.c:24: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). len2 = strlen(s2); data/fig2dev-3.2.7b/fig2dev/read.c:167:6: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fp); data/fig2dev-3.2.7b/fig2dev/read.c:207:8: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fp); data/fig2dev-3.2.7b/fig2dev/read.c:297: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). if (strlen(line) + 1 > sizeof papersize) { data/fig2dev-3.2.7b/fig2dev/read.c:1115:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(l->pic->file, from, (size_t)(c - from + 1)); data/fig2dev-3.2.7b/fig2dev/read.c:1443: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). len = strlen(start); data/fig2dev-3.2.7b/fig2dev/read.c:1578:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). comp->comment = malloc(strlen(comments[i])+1); data/fig2dev-3.2.7b/fig2dev/read.c:1654:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (fgetc(fp) != '\n') { data/fig2dev-3.2.7b/fig2dev/read.c:1809:8: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cc = getc(fp); data/fig2dev-3.2.7b/fig2dev/read.c:1812:7: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cc=getc(fp); data/fig2dev-3.2.7b/fig2dev/read1_3.c:514:42: [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). t->cstring = (char *) calloc((unsigned)(strlen(buf)+1), sizeof(char)); data/fig2dev-3.2.7b/fig2dev/tests/test1.c:58: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). n = strlen(i18ndir); data/fig2dev-3.2.7b/fig2dev/trans_spline.c:525:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lcomm->comment = malloc(strlen(scomm->comment)+1); data/fig2dev-3.2.7b/transfig/sys.c:35:7: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(ls); data/fig2dev-3.2.7b/transfig/sys.c:40:6: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(ls); data/fig2dev-3.2.7b/transfig/sys.c:63: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). for (p1 = &str[strlen(str)-1], p2 = &suf[strlen(suf)-1]; data/fig2dev-3.2.7b/transfig/sys.c:63: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). for (p1 = &str[strlen(str)-1], p2 = &suf[strlen(suf)-1]; data/fig2dev-3.2.7b/transfig/sys.c:80:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). temp = (char *)malloc(strlen(name)+strlen(suff)+1); data/fig2dev-3.2.7b/transfig/sys.c:80: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). temp = (char *)malloc(strlen(name)+strlen(suff)+1); ANALYSIS SUMMARY: Hits = 704 Lines analyzed = 49184 in approximately 1.65 seconds (29858 lines/second) Physical Source Lines of Code (SLOC) = 35986 Hits@level = [0] 2283 [1] 123 [2] 388 [3] 8 [4] 185 [5] 0 Hits@level+ = [0+] 2987 [1+] 704 [2+] 581 [3+] 193 [4+] 185 [5+] 0 Hits/KSLOC@level+ = [0+] 83.0045 [1+] 19.5632 [2+] 16.1452 [3+] 5.3632 [4+] 5.14089 [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.