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/micropolis-activity-0.0.20071228/src/sim/headers/animtab.h Examining data/micropolis-activity-0.0.20071228/src/sim/headers/cam.h Examining data/micropolis-activity-0.0.20071228/src/sim/headers/mac.h Examining data/micropolis-activity-0.0.20071228/src/sim/headers/macros.h Examining data/micropolis-activity-0.0.20071228/src/sim/headers/sim.h Examining data/micropolis-activity-0.0.20071228/src/sim/headers/view.h Examining data/micropolis-activity-0.0.20071228/src/sim/w_print.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_net.c Examining data/micropolis-activity-0.0.20071228/src/sim/random.c Examining data/micropolis-activity-0.0.20071228/src/sim/terrain/terragen.c Examining data/micropolis-activity-0.0.20071228/src/sim/terrain/mapgener.c Examining data/micropolis-activity-0.0.20071228/src/sim/terrain/terra.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_cam.c Examining data/micropolis-activity-0.0.20071228/src/sim/g_ani.c Examining data/micropolis-activity-0.0.20071228/src/sim/g_bigmap.c Examining data/micropolis-activity-0.0.20071228/src/sim/g_cam.c Examining data/micropolis-activity-0.0.20071228/src/sim/g_map.c Examining data/micropolis-activity-0.0.20071228/src/sim/g_setup.c Examining data/micropolis-activity-0.0.20071228/src/sim/g_smmaps.c Examining data/micropolis-activity-0.0.20071228/src/sim/rand.c Examining data/micropolis-activity-0.0.20071228/src/sim/s_alloc.c Examining data/micropolis-activity-0.0.20071228/src/sim/s_disast.c Examining data/micropolis-activity-0.0.20071228/src/sim/s_eval.c Examining data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c Examining data/micropolis-activity-0.0.20071228/src/sim/s_gen.c Examining data/micropolis-activity-0.0.20071228/src/sim/s_init.c Examining data/micropolis-activity-0.0.20071228/src/sim/s_msg.c Examining data/micropolis-activity-0.0.20071228/src/sim/s_power.c Examining data/micropolis-activity-0.0.20071228/src/sim/s_scan.c Examining data/micropolis-activity-0.0.20071228/src/sim/s_sim.c Examining data/micropolis-activity-0.0.20071228/src/sim/s_traf.c Examining data/micropolis-activity-0.0.20071228/src/sim/s_zone.c Examining data/micropolis-activity-0.0.20071228/src/sim/sim.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_budget.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_con.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_date.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_editor.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_eval.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_graph.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_inter.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_keys.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_map.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_piem.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_resrc.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_sim.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_sound.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_sprite.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_stubs.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_tk.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_tool.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_update.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_util.c Examining data/micropolis-activity-0.0.20071228/src/sim/w_x.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfsca.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxbsrc.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxklst.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxcclk.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxtend.h Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxrexp.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxproc.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxclp.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/main.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxmath.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxutil.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlist.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsig.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxunix.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsel.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxmsgc.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstup.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxdup.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxchmd.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfctl.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxdebg.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclplus.cc Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/mainplus.cc Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxcret.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxclck.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxgenl.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/patchlvl.h Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstr.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxprof.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxhndl.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclplus.h Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxid.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxint.h Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfmat.c Examining data/micropolis-activity-0.0.20071228/src/tclx/src/tclxmerr.c Examining data/micropolis-activity-0.0.20071228/src/tclx/ossupp/sigs.c Examining data/micropolis-activity-0.0.20071228/src/tclx/ossupp/ids.c Examining data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c Examining data/micropolis-activity-0.0.20071228/src/tclx/ossupp/times.c Examining data/micropolis-activity-0.0.20071228/src/tclx/ossupp/fcntl.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkcvbmap.c Examining data/micropolis-activity-0.0.20071228/src/tk/tk3d.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkfont.c Examining data/micropolis-activity-0.0.20071228/src/tk/default.h Examining data/micropolis-activity-0.0.20071228/src/tk/tkgeo.c Examining data/micropolis-activity-0.0.20071228/src/tk/tklist.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkcvline.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkcursor.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkentry.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c Examining data/micropolis-activity-0.0.20071228/src/tk/ks_names.h Examining data/micropolis-activity-0.0.20071228/src/tk/tkrectov.c Examining data/micropolis-activity-0.0.20071228/src/tk/main.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkcvpoly.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkbitmap.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkcvwind.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkoption.c Examining data/micropolis-activity-0.0.20071228/src/tk/tk.h Examining data/micropolis-activity-0.0.20071228/src/tk/tktxidx.c Examining data/micropolis-activity-0.0.20071228/src/tk/tktcp.h Examining data/micropolis-activity-0.0.20071228/src/tk/tktext.h Examining data/micropolis-activity-0.0.20071228/src/tk/tkpresrv.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkgc.c Examining data/micropolis-activity-0.0.20071228/src/tk/tktxtag.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkerror.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkget.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkcvarc.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkframe.c Examining data/micropolis-activity-0.0.20071228/src/tk/tktxdisp.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkwm.h Examining data/micropolis-activity-0.0.20071228/src/tk/tkplace.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkselect.c Examining data/micropolis-activity-0.0.20071228/src/tk/tktxbtre.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkmenu.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkconfig.h Examining data/micropolis-activity-0.0.20071228/src/tk/library/demos/tkSquare.c Examining data/micropolis-activity-0.0.20071228/src/tk/tktrig.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c Examining data/micropolis-activity-0.0.20071228/src/tk/tksend.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkmsg.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkshare.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkatom.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkargv.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkpack.c Examining data/micropolis-activity-0.0.20071228/src/tk/tktcp.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkevent.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.h Examining data/micropolis-activity-0.0.20071228/src/tk/tktext.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkmnbut.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkcvtext.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkbind.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkcolor.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkgrab.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkint.h Examining data/micropolis-activity-0.0.20071228/src/tk/tkpixmap.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkscale.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkscrbar.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c Examining data/micropolis-activity-0.0.20071228/src/tk/tkwm.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclbasic.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclvar.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclexpr.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclassem.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tcl.h Examining data/micropolis-activity-0.0.20071228/src/tcl/panic.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclhash.h Examining data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c Examining data/micropolis-activity-0.0.20071228/src/tcl/compat/string.h Examining data/micropolis-activity-0.0.20071228/src/tcl/compat/teststrtoul.c Examining data/micropolis-activity-0.0.20071228/src/tcl/compat/dirent2.h Examining data/micropolis-activity-0.0.20071228/src/tcl/compat/testpid.c Examining data/micropolis-activity-0.0.20071228/src/tcl/compat/testwait.c Examining data/micropolis-activity-0.0.20071228/src/tcl/compat/testuid.c Examining data/micropolis-activity-0.0.20071228/src/tcl/compat/strstr.c Examining data/micropolis-activity-0.0.20071228/src/tcl/compat/strtoul.c Examining data/micropolis-activity-0.0.20071228/src/tcl/compat/dirent.h Examining data/micropolis-activity-0.0.20071228/src/tcl/compat/limits.h Examining data/micropolis-activity-0.0.20071228/src/tcl/compat/opendir.c Examining data/micropolis-activity-0.0.20071228/src/tcl/compat/strtod.c Examining data/micropolis-activity-0.0.20071228/src/tcl/compat/strtol.c Examining data/micropolis-activity-0.0.20071228/src/tcl/compat/stdlib.h Examining data/micropolis-activity-0.0.20071228/src/tcl/compat/strerror.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclproc.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclhash.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclparse.c Examining data/micropolis-activity-0.0.20071228/src/tcl/regexp.h Examining data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclget.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tcltest.c Examining data/micropolis-activity-0.0.20071228/src/tcl/regexp.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclckall.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclint.h Examining data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclunix.h Examining data/micropolis-activity-0.0.20071228/src/tcl/tclunxst.c Examining data/micropolis-activity-0.0.20071228/src/tcl/tclenv.c FINAL RESULTS: data/micropolis-activity-0.0.20071228/src/tcl/tclunix.h:319:12: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. extern int readlink _ANSI_ARGS_((CONST char *path, char *buf, int size)); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:606:15: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. linkLength = readlink(fileName, linkValue, sizeof(linkValue) - 1); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxchmd.c:228:13: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod (fileArgv [idx], (unsigned short) modeVal) < 0) data/micropolis-activity-0.0.20071228/src/tclx/src/tclxchmd.c:348:13: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (chown (fileArgv[idx], ownerId, groupId) < 0) { data/micropolis-activity-0.0.20071228/src/tclx/src/tclxchmd.c:409:18: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. (chown (fileArgv[idx], fileStat.st_uid, groupId) < 0)) { data/micropolis-activity-0.0.20071228/src/sim/g_setup.c:225:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s/images/obj%d-%d.xpm", HomeDir, id, i); data/micropolis-activity-0.0.20071228/src/sim/g_setup.c:303:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s/images/%s", HomeDir, data/micropolis-activity-0.0.20071228/src/sim/g_setup.c:346:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s/images/%s", HomeDir, "tilessm.xpm"); data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:198:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s\\%s", dir, filename); data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:206:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%s", dir, filename); data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:501: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(CityFileName, filename); data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:514: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(filename, cp); data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:523:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "Unable to load a city from the file named \"%s\". %s", data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:543:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "UIDidntLoadCity {%s}", msg); data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:559:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "Unable to save the city to the file named \"%s\". %s", data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:586:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "UIDidntSaveCity {%s}", msg); data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:600: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(CityFileName, filename); data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:614: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(filename, cp); data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:618:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "Unable to save the city to the file named \"%s\". %s", data/micropolis-activity-0.0.20071228/src/sim/s_msg.c:434: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(LastMessage, str); data/micropolis-activity-0.0.20071228/src/sim/s_msg.c:436:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "UISetMessage {%s}", str); data/micropolis-activity-0.0.20071228/src/sim/sim.c:124: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(TO, FROM); data/micropolis-activity-0.0.20071228/src/sim/sim.c:130: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(stderr, \ data/micropolis-activity-0.0.20071228/src/sim/sim.c:132: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(stderr, \ data/micropolis-activity-0.0.20071228/src/sim/sim.c:153:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dir, "%s/res/", HomeDir); data/micropolis-activity-0.0.20071228/src/sim/sim.c:735:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(Displays, "{%s}", optarg); data/micropolis-activity-0.0.20071228/src/sim/sim.c:739:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FirstDisplay, optarg); data/micropolis-activity-0.0.20071228/src/sim/sim.c:742:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(FirstDisplay, "%s:0", optarg); data/micropolis-activity-0.0.20071228/src/sim/sim.c:748:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(Displays, "%s {%s}", d, optarg); data/micropolis-activity-0.0.20071228/src/sim/sim.c:828:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(Displays, "{%s}", d); data/micropolis-activity-0.0.20071228/src/sim/sim.c:831: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(FirstDisplay, d); data/micropolis-activity-0.0.20071228/src/sim/sim.c:834:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(FirstDisplay, "%s:0", d); data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:251:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(flowStr, "-%s", dollarStr); data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:255:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(flowStr, "+%s", dollarStr); data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:347:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "UISetBudget {%s} {%s} {%s} {%s} {%d}", data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:360:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "UISetBudgetValues {%s} {%s} %d {%s} {%s} %d {%s} {%s} %d", data/micropolis-activity-0.0.20071228/src/sim/w_cam.c:535: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(cam->name, name); data/micropolis-activity-0.0.20071228/src/sim/w_cam.c:635:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(interp->result, "%s", (cam == NULL) ? "" : cam->name); data/micropolis-activity-0.0.20071228/src/sim/w_cam.c:660:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(interp->result, "%s", (cam == NULL) ? "" : cam->name); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:675:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(interp->result, "%s", data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:164:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "UISetEvaluation {%s} {%s} {%s} {%s} {%s} {%s} {%s} {%s} {%s} {%s} {%s} {%s} {%s} {%s} {%s} {%s} {%s} {%s}", data/micropolis-activity-0.0.20071228/src/sim/w_net.c:141:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cmd, "HandlePacket %d {%s} {", sock, inet_ntoa(addr.sin_addr)); data/micropolis-activity-0.0.20071228/src/sim/w_resrc.c:109:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(fname, PATHSTR, ResourceDir, data/micropolis-activity-0.0.20071228/src/sim/w_resrc.c:207: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(str, st->strings[num-1]); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:122:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(interp->result, "%s", var); \ data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:192:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(interp->result, "%s", CityName); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:210: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(CityFileName, argv[2]); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:214:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(interp->result, "%s", CityFileName ? CityFileName : ""); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1345: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(interp->result, MicropolisVersion); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1361:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1365:12: [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. result = system(buf); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1411:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(interp->result, "%s", buf); data/micropolis-activity-0.0.20071228/src/sim/w_sound.c:315:7: [4] (shell) execl: 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. execl(player, player, filename, NULL); data/micropolis-activity-0.0.20071228/src/sim/w_sprite.c:112:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(interp->result, "%s", sprite->var); \ data/micropolis-activity-0.0.20071228/src/sim/w_sprite.c:279: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(sprite->name, name); data/micropolis-activity-0.0.20071228/src/sim/w_tk.c:392:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "UIDidPan %s %d %d", Tk_PathName(view->tkwin), x, y); data/micropolis-activity-0.0.20071228/src/sim/w_tk.c:567:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "UIDidStopPan %s", Tk_PathName(view->tkwin)); data/micropolis-activity-0.0.20071228/src/sim/w_tk.c:796:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(initCmd, "source %s/micropolis.tcl", ResourceDir); data/micropolis-activity-0.0.20071228/src/sim/w_tk.c:813:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "UIStartMicropolis {%s} {%s} {%s}", data/micropolis-activity-0.0.20071228/src/sim/w_tool.c:821:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "UIShowZoneStatus {%s} {%s} {%s} {%s} {%s} {%s} %d %d", data/micropolis-activity-0.0.20071228/src/sim/w_tool.c:902:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "UIDidTool%s %s %d %d", data/micropolis-activity-0.0.20071228/src/sim/w_tool.c:914:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "UISetToolState %s %d", Tk_PathName(view->tkwin), state); data/micropolis-activity-0.0.20071228/src/sim/w_tool.c:1709:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "DoPendTool %s %d %d %d", data/micropolis-activity-0.0.20071228/src/sim/w_update.c:152:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(localStr, "Funds: %s", dollarStr); data/micropolis-activity-0.0.20071228/src/sim/w_update.c:154:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "UISetFunds {%s}", localStr); data/micropolis-activity-0.0.20071228/src/sim/w_update.c:196:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s %d", dateStr[m], y); data/micropolis-activity-0.0.20071228/src/sim/w_update.c:198:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, data/micropolis-activity-0.0.20071228/src/sim/w_util.c:243:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "UISetCityName {%s}", CityName); data/micropolis-activity-0.0.20071228/src/sim/w_util.c:278:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "UISetMapState %s %d", Tk_PathName(view->tkwin), state); data/micropolis-activity-0.0.20071228/src/sim/w_util.c:309:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "UIPopUpMessage {%s}", msg); data/micropolis-activity-0.0.20071228/src/sim/w_x.c:306: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(xd->display, display); data/micropolis-activity-0.0.20071228/src/sim/w_x.c:517: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(t, title); data/micropolis-activity-0.0.20071228/src/tcl/compat/string.h:32:16: [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). extern char * strcat _ANSI_ARGS_((char *dst, char *src)); data/micropolis-activity-0.0.20071228/src/tcl/compat/string.h:36:16: [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). extern char * strcpy _ANSI_ARGS_((char *dst, char *src)); data/micropolis-activity-0.0.20071228/src/tcl/panic.c:50:12: [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. (void) fprintf(stderr, format, arg1, arg2, arg3, arg4, arg5, arg6, data/micropolis-activity-0.0.20071228/src/tcl/regexp.c:1198:10: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). (void) strcat(buf, p); data/micropolis-activity-0.0.20071228/src/tcl/tclassem.c:176: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(newBuf, cbPtr->buffer); data/micropolis-activity-0.0.20071228/src/tcl/tclassem.c:181: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(cbPtr->buffer+cbPtr->bytesUsed, string); data/micropolis-activity-0.0.20071228/src/tcl/tclbasic.c:785:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(copyStorage, "\n while executing\n\"%.*s%s\"", data/micropolis-activity-0.0.20071228/src/tcl/tclbasic.c:788:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(copyStorage, "\n invoked from within\n\"%.*s%s\"", data/micropolis-activity-0.0.20071228/src/tcl/tclbasic.c:1016: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(cmd + spaceUsed, string); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:887:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(dst+dstSize, newFormat, twoWordValue); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:890:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(dst+dstSize, newFormat, (short)tmp); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:892:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(dst+dstSize, newFormat, oneWordValue); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c:121:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "\n (%s line %d)", clause, interp->errorLine); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c:513: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(iPtr->result, TCL_VERSION); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:680:18: [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 the scanf format is influenceable by an attacker, it's exploitable. numScanned = sscanf(argv[1], argv[2], data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:1151: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(tvarPtr->command, argv[4]); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:1312: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(p, tvarPtr->command); data/micropolis-activity-0.0.20071228/src/tcl/tclenv.c:249: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, name); data/micropolis-activity-0.0.20071228/src/tcl/tclenv.c:252: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+1, value); data/micropolis-activity-0.0.20071228/src/tcl/tclenv.c:431: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(newEnviron[i], environ[i]); data/micropolis-activity-0.0.20071228/src/tcl/tclexpr.c:258: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(valuePtr->pv.buffer, string); data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:119:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(p, "%s%s%s", dir, separator, name); data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:250:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newRem+l1+l2, closeBrace+1); data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:331:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(newDir, "%s%s%s", dir, separator, entryPtr->d_name); data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:369:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(newDir, "%s%s%.*s", dir, separator, p-rem, rem); data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:492: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(curBuf, dir); data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:493: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(curBuf, p); data/micropolis-activity-0.0.20071228/src/tcl/tclhash.c:523: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(hPtr->key.string, key); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:314: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(eventPtr->command, argv[2]); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:644: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(revPtr->newBytes, string); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:782: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, eventPtr->command + bytesSeen); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:941:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dst, cmd); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:946: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(dst, new); data/micropolis-activity-0.0.20071228/src/tcl/tclparse.c:325:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dst, value); data/micropolis-activity-0.0.20071228/src/tcl/tclparse.c:420: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(pvPtr->next, iPtr->result); data/micropolis-activity-0.0.20071228/src/tcl/tclparse.c:662: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(dst, value); data/micropolis-activity-0.0.20071228/src/tcl/tclproc.c:73: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(procPtr->command, argv[3]); data/micropolis-activity-0.0.20071228/src/tcl/tclproc.c:130: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(argPtr->name, fieldValues[0]); data/micropolis-activity-0.0.20071228/src/tcl/tclproc.c:133:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(argPtr->defValue, fieldValues[1]); data/micropolis-activity-0.0.20071228/src/tcl/tcltest.c:51: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(dumpFile, argv[1]); data/micropolis-activity-0.0.20071228/src/tcl/tcltest.c:70:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(interp->result, data/micropolis-activity-0.0.20071228/src/tcl/tclunix.h:302:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. extern int access _ANSI_ARGS_((CONST char *path, int mode)); data/micropolis-activity-0.0.20071228/src/tcl/tclunix.h:306:12: [4] (shell) execvp: 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. extern int execvp _ANSI_ARGS_((CONST char *name, char **argv)); data/micropolis-activity-0.0.20071228/src/tcl/tclunix.h:315:15: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). extern char * mktemp _ANSI_ARGS_((char *template)); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:504:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(fileName, mode) == -1) { data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:995:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. char *access; data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1025:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. switch (access[0]) { data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1037:57: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. Tcl_AppendResult(interp, "illegal access mode \"", access, data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1041:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access[1] == '+') { data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1043:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access[2] != 0) { data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1046:16: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. } else if (access[1] != 0) { data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1063:31: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. filePtr->f = fopen(fileName, access); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1195: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(currentDir, buffer); data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:580:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(inName, TMP_STDIN_NAME); data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:677: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(errName, TMP_STDERR_NAME); data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:747:6: [4] (shell) execvp: 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. execvp(execName, &argv[firstArg]); data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:235:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(interp->result, data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:965: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(iPtr->result, string); data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:1046: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(iPtr->appendResult + iPtr->appendUsed, string); data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:1168: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(new, iPtr->result); data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:1175: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(iPtr->appendResult, iPtr->result); data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:1393: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(iPtr->patterns[0], string); data/micropolis-activity-0.0.20071228/src/tcl/tclvar.c:455: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(newVarPtr->value.string, varPtr->value.string); data/micropolis-activity-0.0.20071228/src/tcl/tclvar.c:475: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(varPtr->value.string + varPtr->valueLength, newValue); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:107: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(tbuf, days_a[timeptr->tm_wday]); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:114: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(tbuf, days_l[timeptr->tm_wday]); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:122: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(tbuf, months_a[timeptr->tm_mon]); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:129: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(tbuf, months_l[timeptr->tm_mon]); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:133:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tbuf, "%s %s %2d %02d:%02d:%02d %d", data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:174: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(tbuf, ampm[0]); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:176: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(tbuf, ampm[1]); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:196:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tbuf, "%s %s %2d %d", data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:221:25: [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(tbuf, timeptr->tm_zone); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:226: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(tbuf, tzname[i]); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:269: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(s, tbuf); data/micropolis-activity-0.0.20071228/src/tclx/src/tclplus.cc:60:9: [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 (ptr, parmPtr); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxbsrc.c:126:9: [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 (oldResult, searchCBPtr->interp->result); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxclp.c:321:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (oldHookPtr, hookValue); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:250:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (statList, data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfsca.c:288:9: [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 (contextPtr->defaultAction, argv [2]); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfsca.c:312: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(newmatch->command, argv [firstArg + 2]); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxhndl.c:244: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 (tblHdrPtr->handleBase, (char *) handleBase); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxhndl.c:327:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (handlePtr, "%s%d", tblHdrPtr->handleBase, entryIdx); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxhndl.c:429:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (handlePtr, "%s%d", tblHdrPtr->handleBase, walkKey); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxid.c:89: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 (interp->result, pw->pw_name); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxid.c:121: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 (interp->result, grp->gr_name); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:276:9: [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 (pathName, fileName); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:296: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 (pathName, curDir); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:298: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 (pathName, fileName); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:482: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 (indexPtr + 4, packageName); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:544: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 (indexPtr + 4, packageName); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:566: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 (fileId, pkgDataArgv [0]); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:630: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 (indexPtr + 5, procName); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:683: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 (indexPtr + 5, procName); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:899: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 (cmdPtr, initCmd); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:900: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 (cmdPtr, tlibFilePath); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:944: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 (tndxFilePath, tlibFilePath); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:979: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 (msg, tlibFilePath); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1048:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (filePath + dirLen + 1, lineArgv [1]); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1094: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 (msg, indexFilePath); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1153:17: [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 (filePath, dirName); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1156:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (filePath + dirLen + 1, entryPtr->d_name); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1163:18: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. (access (filePath, R_OK) < 0)) data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1230:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (dirName, X_OK) == 0) data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1307:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (cmdPtr, location); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1499: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 (msg, argv [1]); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxmath.c:67: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 (interp->result, argv [maxIdx]); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxmath.c:107: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 (interp->result, argv [minIdx]); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxproc.c:84:9: [4] (shell) execvp: 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 (execvp (argv[1], argList) < 0) { data/micropolis-activity-0.0.20071228/src/tclx/src/tclxproc.c:176:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (interp->result, "%d %s %d", returnedPid, "EXIT", data/micropolis-activity-0.0.20071228/src/tclx/src/tclxproc.c:179:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (interp->result, "%d %s %s", returnedPid, "SIG", data/micropolis-activity-0.0.20071228/src/tclx/src/tclxproc.c:182:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (interp->result, "%d %s %s", returnedPid, "STOP", data/micropolis-activity-0.0.20071228/src/tclx/src/tclxproc.c:280:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (interp->result, "%d %s %d", returnedPid, "EXIT", data/micropolis-activity-0.0.20071228/src/tclx/src/tclxproc.c:283:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (interp->result, "%d %s %s", returnedPid, "SIG", data/micropolis-activity-0.0.20071228/src/tclx/src/tclxproc.c:286:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (interp->result, "%d %s %s", returnedPid, "STOP", data/micropolis-activity-0.0.20071228/src/tclx/src/tclxprof.c:172: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 (entryPtr->procName, procName); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsig.c:455:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (errorInfo, "\n while executing signal trap code for %s%s", data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsig.c:537: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 (savedResult, interp->result); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsig.c:825:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (signalTrapCmds [signalNum], command); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstup.c:353:9: [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 (defaultFilePath, TCL_DEFAULT); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstup.c:354:9: [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 (defaultFilePath, TCL_VERSION); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstup.c:355:9: [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 (defaultFilePath, TCL_EXTD_VERSION_SUFFIX); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstup.c:383: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 (tclxVersion, TCL_VERSION); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstup.c:384: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 (tclxVersion, TCL_EXTD_VERSION_SUFFIX); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxunix.c:308: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 (srcpath, tmppath); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxutil.c:367: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 (dynBufPtr->ptr + dynBufPtr->len, newStr); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxutil.c:641:13: [4] (shell) execl: 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 (execl ("/bin/sh", "sh", "-c", command, (char *) NULL) < 0) { data/micropolis-activity-0.0.20071228/src/tk/tk3d.c:498:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(interp->result, "bad relief type \"%.50s\": must be %s", data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:570:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(new, "%s; %s", psPtr->command, command); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:579: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(psPtr->command, command); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:825: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(p, modPtr->name); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:838: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(p, eiPtr->name); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:2193: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(error, interp->result); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:2199: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(errorInfo, tmp); data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:596:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:881:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(butPtr->selVarName, Tk_Name(butPtr->tkwin)); data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:886:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(butPtr->onValue, Tk_Name(butPtr->tkwin)); data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:930:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(butPtr->text, value); data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:1526: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(butPtr->text, value); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:100: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(afterPtr->command, argv[2]); data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c:178:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "\n (%s \"%.50s\" in widget \"%.50s\")", data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c:192:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c:368: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(new, value); data/micropolis-activity-0.0.20071228/src/tk/tkcvtext.c:837: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(new+beforeThis, string); data/micropolis-activity-0.0.20071228/src/tk/tkcvtext.c:838: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(new+beforeThis+length, textPtr->text+beforeThis); data/micropolis-activity-0.0.20071228/src/tk/tkcvtext.c:909: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(new+first, textPtr->text+last+1); data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:1039: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(new+index, string); data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:1040: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(new+index+length, entryPtr->string+index); data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:1109: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(new+index, entryPtr->string+index+count); data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:1197: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(entryPtr->string, value); data/micropolis-activity-0.0.20071228/src/tk/tklist.c:936: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(newPtr->text, *argv); data/micropolis-activity-0.0.20071228/src/tk/tkmenu.c:1281:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(mePtr->name, mePtr->label); data/micropolis-activity-0.0.20071228/src/tk/tkmenu.c:1285:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(mePtr->onValue, mePtr->label); data/micropolis-activity-0.0.20071228/src/tk/tkmnbut.c:709:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(mbPtr->text, value); data/micropolis-activity-0.0.20071228/src/tk/tkmnbut.c:1157: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(mbPtr->text, value); data/micropolis-activity-0.0.20071228/src/tk/tkmsg.c:406:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(msgPtr->string, value); data/micropolis-activity-0.0.20071228/src/tk/tkmsg.c:778: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(msgPtr->string, value); data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:1331:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fileName, "%s/.Xdefaults", home); data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:355:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf,"%s %d",inet_ntoa(sockaddr.sin_addr), data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:599: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(cmdPtr->tclCmd, argv[3]); data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:601: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(cmdPtr->fileId, argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:585:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(interp->result, "bad arg to %s -window", cmd); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:591:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(interp->result, "not enough args to %s", cmd); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:660: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(cmdInfoPtr->command, argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:966: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(getInfoPtr->string + getInfoPtr->bytesUsed, portion); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1124:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newResult, result); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1133:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(result+curSize, atomName); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1691:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(command, "%s %d %d", cmdInfoPtr->command, offset, maxBytes); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1704: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(oldResultString, cmdInfoPtr->interp->result); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1881:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer+length, " %s", atomString); data/micropolis-activity-0.0.20071228/src/tk/tksend.c:254: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(riPtr->name, name); data/micropolis-activity-0.0.20071228/src/tk/tksend.c:434:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(property, "C %x %x %s|%s", data/micropolis-activity-0.0.20071228/src/tk/tksend.c:907:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(returnProp, "R %x %d %s", serial, result, data/micropolis-activity-0.0.20071228/src/tk/tksend.c:960: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(pcPtr->result, p); data/micropolis-activity-0.0.20071228/src/tk/tksend.c:1044:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(pcPtr->result, data/micropolis-activity-0.0.20071228/src/tk/tksend.c:1095: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(pcPtr2->result, msg); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:402: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 (error, interp -> result); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:411: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 (errorInfo, tmp); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:844: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 (hostName, interp -> result); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1329: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 (client -> command, server -> command); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1738: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 (server -> command, argv [a]); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1931: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 (client -> command, argv [1]); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2353: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 (clientName, server -> interp -> result); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2503: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 (client -> resultString, result); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2653:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "RawInput %s %d %d", client -> name, buffer, unixStatus); data/micropolis-activity-0.0.20071228/src/tk/tktxbtre.c:653: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(linePtr->bytes + ch1, line2Ptr->bytes + ch2); data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:511: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(pathName+1, name); data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:513: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(pathName, parentPtr->pathName); data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:515: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(pathName+length1+1, name); data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:710:9: [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(dsp, screenName); data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:2270:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(Cmd, "%s %s", argv[4], argv[2]); data/micropolis-activity-0.0.20071228/src/sim/sim.c:147: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 ((s = getenv("SIMHOME")) == NULL) { data/micropolis-activity-0.0.20071228/src/sim/sim.c:638:8: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. (c = getopt(argc, argv, "tcwmSR:gs:l:")) != -1) { data/micropolis-activity-0.0.20071228/src/sim/sim.c:823:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *d = getenv("DISPLAY"); data/micropolis-activity-0.0.20071228/src/sim/w_cam.c:342:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XSYNCHRONIZE") != NULL) { data/micropolis-activity-0.0.20071228/src/sim/w_date.c:439:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XSYNCHRONIZE") != NULL) { data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:392:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XSYNCHRONIZE") != NULL) { data/micropolis-activity-0.0.20071228/src/sim/w_tk.c:184:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XSYNCHRONIZE") != NULL) { data/micropolis-activity-0.0.20071228/src/tcl/compat/stdlib.h:36:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. extern char * getenv _ANSI_ARGS_((char *name)); data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:441:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. dir = getenv("HOME"); data/micropolis-activity-0.0.20071228/src/tcl/tclunix.h:312:15: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. extern char * getwd _ANSI_ARGS_((char *buffer)); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1177:6: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. if (getwd(buffer) == NULL) { data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:281:9: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. if (getwd (curDir) == NULL) { data/micropolis-activity-0.0.20071228/src/tclx/src/tclxmath.c:180:9: [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(seed); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstup.c:133:22: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((option = getopt (argc, argv, "qc:f:u")) != -1) { data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstup.c:205: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 ((defaultFileToUse = getenv ("TCLDEFAULT")) == NULL) data/micropolis-activity-0.0.20071228/src/tk/main.c:224:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *tcllib = getenv("TCL_LIBRARY"); data/micropolis-activity-0.0.20071228/src/tk/main.c:225:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *tklib = getenv("TK_LIBRARY"); data/micropolis-activity-0.0.20071228/src/tk/main.c:226:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *create = getenv("CREATE_COLORMAP"); data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:1324: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. home = getenv("HOME"); data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:309:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. screenName = getenv("DISPLAY"); data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:343:10: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XSYNCHRONIZE") != NULL) { data/micropolis-activity-0.0.20071228/src/sim/g_bigmap.c:165: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((char *)image, (char *)mem + (2 * 16 * (n)), 2 * 16); \ data/micropolis-activity-0.0.20071228/src/sim/g_bigmap.c:174: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((char *)image, (char *)mem + (4 * 16 * (n)), 4 * 16); \ data/micropolis-activity-0.0.20071228/src/sim/g_cam.c:213: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(p, f, w); data/micropolis-activity-0.0.20071228/src/sim/g_cam.c:226: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(back, back + backline*h, backline); data/micropolis-activity-0.0.20071228/src/sim/g_cam.c:227: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(back + backline*(h+1), back + backline, backline); data/micropolis-activity-0.0.20071228/src/sim/g_cam.c:232: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(p, f, w); data/micropolis-activity-0.0.20071228/src/sim/g_cam.c:238: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(back, back + backline*h, backline); data/micropolis-activity-0.0.20071228/src/sim/g_cam.c:239: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(back + backline*(h+1), back + backline, backline); data/micropolis-activity-0.0.20071228/src/sim/g_cam.c:244: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(p, f, w); data/micropolis-activity-0.0.20071228/src/sim/g_cam.c:250: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(back + (backline * (h + 1)), back + backline*h, backline); data/micropolis-activity-0.0.20071228/src/sim/g_cam.c:251: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(back, back + backline, backline); data/micropolis-activity-0.0.20071228/src/sim/g_cam.c:264: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(p, f, w + 2); data/micropolis-activity-0.0.20071228/src/sim/g_cam.c:273: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(p - backline, f, w); data/micropolis-activity-0.0.20071228/src/sim/g_cam.c:278: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(p, f, w); data/micropolis-activity-0.0.20071228/src/sim/g_cam.c:949: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(front, back, cam->width); data/micropolis-activity-0.0.20071228/src/sim/g_cam.c:1044: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(front, back, cam->width); data/micropolis-activity-0.0.20071228/src/sim/g_cam.c:1088:13: [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(filename, "r")) == NULL) { data/micropolis-activity-0.0.20071228/src/sim/g_setup.c:217: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[256]; data/micropolis-activity-0.0.20071228/src/sim/g_setup.c:293: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[256]; data/micropolis-activity-0.0.20071228/src/sim/g_smmaps.c:95: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((char *)image, ((char *)mem) + (n * 4 * 2), (3 * 2)); \ data/micropolis-activity-0.0.20071228/src/sim/g_smmaps.c:99: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((char *)image, ((char *)mem) + (n * 4 * 3), (3 * 3)); \ data/micropolis-activity-0.0.20071228/src/sim/g_smmaps.c:103: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((char *)image, ((char *)mem) + (n * 4 * 4), (3 * 4)); \ data/micropolis-activity-0.0.20071228/src/sim/headers/animtab.h:184: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. unsigned char aniSynch[1024] = { data/micropolis-activity-0.0.20071228/src/sim/headers/mac.h:85: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[4]; data/micropolis-activity-0.0.20071228/src/sim/headers/sim.h:570: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. extern unsigned char *History10[HISTORIES], *History120[HISTORIES]; data/micropolis-activity-0.0.20071228/src/sim/headers/sim.h:599: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 *cityClassStr[6]; data/micropolis-activity-0.0.20071228/src/sim/headers/sim.h:654: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 *dateStr[12]; data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:193:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[512]; data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:201: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 ((f = fopen(filename, "rb")) == NULL) { data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:209: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 ((f = fopen(filename, "r")) == NULL) { data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:329: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 ((f = fopen(filename, "wb")) == NULL) { data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:331: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 ((f = fopen(filename, "w")) == NULL) { data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:495: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 msg[256]; data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:542: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[1024]; data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:551: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 msg[256]; data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:585: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[1024]; data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:594: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 msg[256]; data/micropolis-activity-0.0.20071228/src/sim/s_msg.c:70: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 LastMessage[256]; data/micropolis-activity-0.0.20071228/src/sim/s_msg.c:311: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 messageStr[256]; data/micropolis-activity-0.0.20071228/src/sim/s_msg.c:419: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]; data/micropolis-activity-0.0.20071228/src/sim/s_msg.c:422: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(buf, "UIAutoGoto %d %d", x, y); data/micropolis-activity-0.0.20071228/src/sim/s_msg.c:430: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]; data/micropolis-activity-0.0.20071228/src/sim/s_msg.c:445: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]; data/micropolis-activity-0.0.20071228/src/sim/s_msg.c:447: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(buf, "UIShowPicture %d", id); data/micropolis-activity-0.0.20071228/src/sim/s_power.c:69: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 PowerStackX[PWRSTKSIZE], PowerStackY[PWRSTKSIZE]; data/micropolis-activity-0.0.20071228/src/sim/sim.c:142: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 dir[256]; data/micropolis-activity-0.0.20071228/src/sim/sim.c:464: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(src, dst, WORLD_Y * sizeof (short)); data/micropolis-activity-0.0.20071228/src/sim/sim.c:476: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(CellSrc,CellSrc + (SRCCOL * WORLD_X), data/micropolis-activity-0.0.20071228/src/sim/sim.c:478: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(CellSrc + SRCCOL * (WORLD_X + 1), CellSrc + SRCCOL, data/micropolis-activity-0.0.20071228/src/sim/sim.c:483: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(src, dst, WORLD_Y * sizeof (short)); data/micropolis-activity-0.0.20071228/src/sim/sim.c:489: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(CellSrc, CellSrc + (SRCCOL * WORLD_X), data/micropolis-activity-0.0.20071228/src/sim/sim.c:491: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(CellSrc + SRCCOL * (WORLD_X + 1), CellSrc + SRCCOL, data/micropolis-activity-0.0.20071228/src/sim/sim.c:500: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(src, dst, WORLD_Y * sizeof (short)); data/micropolis-activity-0.0.20071228/src/sim/sim.c:506: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(CellSrc + (SRCCOL * (WORLD_X + 1)), CellSrc + (SRCCOL * WORLD_X), data/micropolis-activity-0.0.20071228/src/sim/sim.c:508: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(CellSrc, CellSrc + SRCCOL, data/micropolis-activity-0.0.20071228/src/sim/sim.c:664:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). c = atoi(optarg); data/micropolis-activity-0.0.20071228/src/sim/sim.c:681:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). c = atoi(optarg); data/micropolis-activity-0.0.20071228/src/sim/sim.c:702:6: [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). c = atoi(optarg); data/micropolis-activity-0.0.20071228/src/sim/terrain/terra.c:630: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 dateBuffer[10]; /* buffer for date */ data/micropolis-activity-0.0.20071228/src/sim/terrain/terra.c:663: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(dateBuffer,"%4d",(CityTime/48)+1900); /* set date */ data/micropolis-activity-0.0.20071228/src/sim/terrain/terra.c:668:12: [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). tmpTime=(atoi(dateBuffer)-1900)*48L; /* set new date */ data/micropolis-activity-0.0.20071228/src/sim/terrain/terra.c:707: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 temStr[20]; /* temporary string for percentages */ data/micropolis-activity-0.0.20071228/src/sim/terrain/terra.c:762: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(temStr,"%3d%%%%",treeLevel); /* get string for tree level */ data/micropolis-activity-0.0.20071228/src/sim/terrain/terra.c:764: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(temStr,"%3d%%%%",lakeLevel); /* get string for lake level */ data/micropolis-activity-0.0.20071228/src/sim/terrain/terra.c:766: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(temStr,"%3d%%%%",curvLevel); /* get string for curviness level */ data/micropolis-activity-0.0.20071228/src/sim/terrain/terra.c:830: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(temStr,"%3d%%%%",treeLevel); /* get string for tree level */ data/micropolis-activity-0.0.20071228/src/sim/terrain/terra.c:832: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(temStr,"%3d%%%%",lakeLevel); /* get string for lake level */ data/micropolis-activity-0.0.20071228/src/sim/terrain/terra.c:834: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(temStr,"%3d%%%%",curvLevel); /* get string for curviness level */ data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:241: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 numStr[256], dollarStr[256], collectedStr[256], data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:249: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(numStr, "%d", cashFlow); data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:253: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(numStr, "%d", cashFlow); data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:258: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(numStr, "%ld", TotalFunds); data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:261: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(numStr, "%ld", cashFlow2 + TotalFunds); data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:264: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(numStr, "%ld", TaxFund); data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:281: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 num[256]; data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:282: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 fireWant[256], policeWant[256], roadWant[256]; data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:283: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 fireGot[256], policeGot[256], roadGot[256]; data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:285: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(num, "%ld", fireMaxValue); data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:288: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(num, "%ld", policeMaxValue); data/micropolis-activity-0.0.20071228/src/sim/w_budget.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(num, "%ld", roadMaxValue); data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:294: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(num, "%d", (int)(fireMaxValue * firePercent)); data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:297: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(num, "%d", (int)(policeMaxValue * policePercent)); data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:300: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(num, "%d", (int)(roadMaxValue * roadPercent)); data/micropolis-activity-0.0.20071228/src/sim/w_budget.c:345: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]; data/micropolis-activity-0.0.20071228/src/sim/w_budget.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 buf[256]; data/micropolis-activity-0.0.20071228/src/sim/w_cam.c:399: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. (char *) scam, argv[2], 0); data/micropolis-activity-0.0.20071228/src/sim/w_cam.c:423: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(interp->result, "%d %d", scam->w_x, scam->w_y); data/micropolis-activity-0.0.20071228/src/sim/w_cam.c:445: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(interp->result, "%d %d", scam->w_width, scam->w_height); data/micropolis-activity-0.0.20071228/src/sim/w_cam.c:468: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(interp->result, "%d", scam->visible); data/micropolis-activity-0.0.20071228/src/sim/w_cam.c:496: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(interp->result, "%d", err); data/micropolis-activity-0.0.20071228/src/sim/w_cam.c:610: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. (char *) cam, argv[3], 0); data/micropolis-activity-0.0.20071228/src/sim/w_date.c:254: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. (char *) date, argv[2], 0); data/micropolis-activity-0.0.20071228/src/sim/w_date.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(interp->result, "%d %d", date->w_x, date->w_y); data/micropolis-activity-0.0.20071228/src/sim/w_date.c:296: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(interp->result, "%d %d", date->w_width, date->w_height); data/micropolis-activity-0.0.20071228/src/sim/w_date.c:320: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(interp->result, "%d", date->visible); data/micropolis-activity-0.0.20071228/src/sim/w_date.c:648: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 yearString[256]; data/micropolis-activity-0.0.20071228/src/sim/w_date.c:689: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( data/micropolis-activity-0.0.20071228/src/sim/w_date.c:719: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( data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:92: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. (char *) view, argv[2], 0); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:112: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(interp->result, "%d %d", view->w_x, view->w_y); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:134: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(interp->result, "%d %d", view->w_width, view->w_height); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:153: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(interp->result, "%d", view->auto_goto); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:172: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(interp->result, "%d", view->sound); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:190: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(interp->result, "%d", view->skips); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:221: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(interp->result, "%d %d", view->pan_x, view->pan_y); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:261: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(interp->result, "%d", view->tool_state); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:279: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(interp->result, "%d", view->tool_mode); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:446: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(interp->result, "%d", view->visible); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:492: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(interp->result, "%d %d", x, y); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:551: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(interp->result, "%d", view->auto_going); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:573: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(interp->result, "%d", view->auto_speed); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:603: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(interp->result, "%d %d", view->auto_x_goal, view->auto_y_goal); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:625: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(interp->result, "%d", view->super_user); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:646: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(interp->result, "%d", view->show_me); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:697: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(interp->result, "%d", view->show_overlay); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:718: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(interp->result, "%d", view->overlay_mode); data/micropolis-activity-0.0.20071228/src/sim/w_editor.c:739: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(interp->result, "%d", view->dynamic_filter); data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:72: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 *cityClassStr[6] = { data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:76: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 *cityLevelStr[3] = { data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:80: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 *probStr[10] = { data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:90: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 title[256], data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:107: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(title, "City Evaluation %d", CurrentYear()); data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:108: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(goodyes, "%d%%", CityYes); data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:109: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(goodno, "%d%%", CityNo); data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:110: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(prob0, "%d%%", ProblemVotes[ProblemOrder[0]]); data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:111: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(prob1, "%d%%", ProblemVotes[ProblemOrder[1]]); data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:112: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(prob2, "%d%%", ProblemVotes[ProblemOrder[2]]); data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:113: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(prob3, "%d%%", ProblemVotes[ProblemOrder[3]]); data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:114: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(pop, "%ld", CityPop); data/micropolis-activity-0.0.20071228/src/sim/w_eval.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(delta, "%ld", deltaCityPop); data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:116: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(assessed, "%ld", CityAssValue); data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:119: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(score, "%d", CityScore); data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:120: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(changed, "%d", deltaCityScore); data/micropolis-activity-0.0.20071228/src/sim/w_eval.c:162: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[2048]; data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:67: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. unsigned char *History10[HISTORIES]; data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:68: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. unsigned char *History120[HISTORIES]; data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:205: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. (char *) graph, argv[2], 0); data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:225: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(interp->result, "%d %d", graph->w_x, graph->w_y); data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:247: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(interp->result, "%d %d", graph->w_width, graph->w_height); data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:271:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(interp->result, "%d", graph->visible); data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:297: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(interp->result, "%d", graph->range); data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:323: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(interp->result, "%d", graph->mask); data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:858: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[256]; data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:860: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, "%d", year--); data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:879: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[256]; data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:881: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, "%d0", year--); data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:430: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. (char *) intervalPtr, argv[2], 0); data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:441: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(interp->result, "%d %d", intervalPtr->minValue, intervalPtr->maxValue); data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:698: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 valueString[30]; data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:740: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(valueString, "%d", intervalPtr->fromValue); data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:744: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(valueString, "%d", intervalPtr->toValue); data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:968: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 valueString[30]; data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:972: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(valueString, "%d", value); data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:1180: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 valueString[30]; data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:1185: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(valueString, "%d", value); data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:1552: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 string[256]; data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:1554: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(string, " %d %d", intervalPtr->minValue, intervalPtr->maxValue); data/micropolis-activity-0.0.20071228/src/sim/w_keys.c:65: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 LastKeys[5]; data/micropolis-activity-0.0.20071228/src/sim/w_map.c:87: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. (char *) view, argv[2], 0); data/micropolis-activity-0.0.20071228/src/sim/w_map.c:107: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(interp->result, "%d %d", view->w_x, view->w_y); data/micropolis-activity-0.0.20071228/src/sim/w_map.c:129: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(interp->result, "%d %d", view->w_width, view->w_height); data/micropolis-activity-0.0.20071228/src/sim/w_map.c:151: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(interp->result, "%d", view->map_state); data/micropolis-activity-0.0.20071228/src/sim/w_map.c:172: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(interp->result, "%d", view->show_editors); data/micropolis-activity-0.0.20071228/src/sim/w_map.c:270: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(interp->result, "%d", view->visible); data/micropolis-activity-0.0.20071228/src/sim/w_map.c:290: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(interp->result, "Sorry Not Implemented Yet"); /* XXX */ data/micropolis-activity-0.0.20071228/src/sim/w_map.c:523: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(view->other_data, view->data, view->line_bytes * view->m_height); /* XXX: handle depth */ data/micropolis-activity-0.0.20071228/src/sim/w_net.c:126: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 buf[NET_BUFFER_SIZE]; data/micropolis-activity-0.0.20071228/src/sim/w_net.c:127: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 cmd[NET_BUFFER_SIZE * 4 + 256]; data/micropolis-activity-0.0.20071228/src/sim/w_net.c:145:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cp, "%3d ", buf[i]); data/micropolis-activity-0.0.20071228/src/sim/w_piem.c:565: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(interp->result, "%d", data/micropolis-activity-0.0.20071228/src/sim/w_piem.c:611: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((VOID *) newEntries, (VOID *) menuPtr->entries, data/micropolis-activity-0.0.20071228/src/sim/w_piem.c:662: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. (char *) menuPtr, argv[2], 0); data/micropolis-activity-0.0.20071228/src/sim/w_piem.c:721: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. (char *) mePtr, argv[3], COMMAND_MASK << mePtr->type); data/micropolis-activity-0.0.20071228/src/sim/w_piem.c:744: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(interp->result, "%d", index); data/micropolis-activity-0.0.20071228/src/sim/w_piem.c:879: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 msg[100]; data/micropolis-activity-0.0.20071228/src/sim/w_piem.c:881: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(msg, "grab failed for unknown reason (code %d)", data/micropolis-activity-0.0.20071228/src/sim/w_piem.c:911: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(interp->result, "%d", distance); data/micropolis-activity-0.0.20071228/src/sim/w_piem.c:923: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(interp->result, "%d", direction); data/micropolis-activity-0.0.20071228/src/sim/w_piem.c:1541: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. char xstr[32], ystr[32]; data/micropolis-activity-0.0.20071228/src/sim/w_print.c:67: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 tally[TILE_COUNT]; data/micropolis-activity-0.0.20071228/src/sim/w_resrc.c:89: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 fname[256]; data/micropolis-activity-0.0.20071228/src/sim/w_resrc.c:116: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). ((fp = fopen(fname, PERMSTR)) == NULL) || data/micropolis-activity-0.0.20071228/src/sim/w_resrc.c:205: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(str, "Well I'll be a monkey's uncle!"); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:110: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(interp->result, "%d", var); \ data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:116: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(interp->result, "%d", var); \ data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:209:23: [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. CityFileName = (char *)ckalloc(strlen(argv[0]) + 1); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:235: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(interp->result, "%d", GameLevel); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:256: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(interp->result, "%d", SimSpeed); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:277: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(interp->result, "%d", sim_skips); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:299: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(interp->result, "%d", sim_skip); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:321: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(interp->result, "%d", sim_delay); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:332: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(interp->result, "%d", WORLD_X); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:343: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(interp->result, "%d", WORLD_Y); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:364: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(interp->result, "%d", heat_steps); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:384: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(interp->result, "%d", heat_flow); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:404: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(interp->result, "%d", heat_rule); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:426: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(interp->result, "%d", sim_just_cam); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:451: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(interp->result, "%d", sock); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:501: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(interp->result, "%ld", TotalFunds); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:523: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(interp->result, "%d", CityTax); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:546: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(interp->result, "%d", (int)(firePercent * 100.0)); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:569: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(interp->result, "%d", (int)(policePercent * 100.0)); data/micropolis-activity-0.0.20071228/src/sim/w_sim.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(interp->result, "%d", (int)(roadPercent * 100.0)); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:612: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(interp->result, "%d", CurrentYear()); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:635: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(interp->result, "%d", autoBudget); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:657: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(interp->result, "%d", autoGo); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:679: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(interp->result, "%d", autoBulldoze); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:701: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(interp->result, "%d", NoDisasters ? 0 : 1); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:723: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(interp->result, "%d", UserSoundOn); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:754: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(interp->result, "%d", FlushStyle); data/micropolis-activity-0.0.20071228/src/sim/w_sim.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(interp->result, "%ld", DonDither); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:796: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(interp->result, "%d", DoOverlay); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:905: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(interp->result, "%d", Map[x][y]); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:925: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(interp->result, "%d", tile); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:955: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(interp->result, "%d", DynamicData[index]); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1002: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(interp->result, "%d", tkCollapseMotion); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1020: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(interp->result, "%d", LVAverage); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1031: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(interp->result, "%d", AverageTrf()); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1042: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(interp->result, "%d", CrimeAverage); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1053: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(interp->result, "%d", GetUnemployment()); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1064: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(interp->result, "%d", GetFire()); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1075: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(interp->result, "%d", PolluteAverage); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1086: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(interp->result, "%d", (PolMaxX <<4) + 8); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1097: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(interp->result, "%d", (PolMaxY <<4) + 8); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1108: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(interp->result, "%d", TrafMaxX); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1119: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(interp->result, "%d", TrafMaxY); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1130: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(interp->result, "%d", (MeltX <<4) + 8); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1141: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(interp->result, "%d", (MeltY <<4) + 8); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1152: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(interp->result, "%d", (CrimeMaxX <<4) + 8); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1163: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(interp->result, "%d", (CrimeMaxY <<4) + 8); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1174: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(interp->result, "%d", (CCx <<4) + 8); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1185: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(interp->result, "%d", (CCy <<4) + 8); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1196: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(interp->result, "%d", (FloodX <<4) + 8); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1207: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(interp->result, "%d", (FloodY <<4) + 8); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1218: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(interp->result, "%d", (CrashX <<4) + 8); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1229: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(interp->result, "%d", (CrashY <<4) + 8); data/micropolis-activity-0.0.20071228/src/sim/w_sim.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(interp->result, "%d", DoAnimation); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1282: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(interp->result, "%d", DoMessages); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1303: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(interp->result, "%d", DoNotices); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1325: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(interp->result, "%d", r); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1334: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(interp->result, "msdos"); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1336: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(interp->result, "unix"); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1354: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[512]; data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1367: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(interp->result, "%d", result); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1375: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[2048]; data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1432: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(interp->result, "%d", NeedRest); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1447: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(interp->result, "%d", MultiPlayerMode); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1462: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(interp->result, "%d", SugarMode); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1478: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(interp->result, "%d", aircrash); data/micropolis-activity-0.0.20071228/src/sim/w_sound.c:152: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]; data/micropolis-activity-0.0.20071228/src/sim/w_sound.c:212: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]; data/micropolis-activity-0.0.20071228/src/sim/w_sound.c:281: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 filename[256], player[256]; data/micropolis-activity-0.0.20071228/src/sim/w_sprite.c:105: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(interp->result, "%d", sprite->var); \ data/micropolis-activity-0.0.20071228/src/sim/w_stubs.c:185: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]; data/micropolis-activity-0.0.20071228/src/sim/w_stubs.c:187: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(buf, "UIStartScenario %d", scenario); data/micropolis-activity-0.0.20071228/src/sim/w_tk.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 buf[256]; data/micropolis-activity-0.0.20071228/src/sim/w_tk.c:500: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 line[200]; data/micropolis-activity-0.0.20071228/src/sim/w_tk.c:566: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]; data/micropolis-activity-0.0.20071228/src/sim/w_tk.c:737: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 initCmd[256]; data/micropolis-activity-0.0.20071228/src/sim/w_tk.c:811: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[1024]; data/micropolis-activity-0.0.20071228/src/sim/w_tool.c:777: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 localStr[256]; data/micropolis-activity-0.0.20071228/src/sim/w_tool.c:778: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 statusStr[5][256]; data/micropolis-activity-0.0.20071228/src/sim/w_tool.c:819: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[1024]; data/micropolis-activity-0.0.20071228/src/sim/w_tool.c:899: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]; data/micropolis-activity-0.0.20071228/src/sim/w_tool.c:912: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]; data/micropolis-activity-0.0.20071228/src/sim/w_tool.c:1707: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]; data/micropolis-activity-0.0.20071228/src/sim/w_update.c:81: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 *dateStr[12] = { data/micropolis-activity-0.0.20071228/src/sim/w_update.c:139: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 localStr[256], dollarStr[256], buf[256]; data/micropolis-activity-0.0.20071228/src/sim/w_update.c:149: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(localStr, "%ld", TotalFunds); data/micropolis-activity-0.0.20071228/src/sim/w_update.c:174: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[256], buf[256]; data/micropolis-activity-0.0.20071228/src/sim/w_update.c:247: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]; data/micropolis-activity-0.0.20071228/src/sim/w_update.c:249: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(buf, "UISetDemand %d %d %d", data/micropolis-activity-0.0.20071228/src/sim/w_update.c:280: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]; data/micropolis-activity-0.0.20071228/src/sim/w_update.c:281: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(buf, "UISetOptions %d %d %d %d %d %d %d %d", data/micropolis-activity-0.0.20071228/src/sim/w_util.c:169: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[256]; data/micropolis-activity-0.0.20071228/src/sim/w_util.c:170: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, "UISetSpeed %d", sim_paused ? 0 : SimMetaSpeed); data/micropolis-activity-0.0.20071228/src/sim/w_util.c:216: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]; data/micropolis-activity-0.0.20071228/src/sim/w_util.c:218: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(buf, "UISetGameLevel %d", GameLevel); data/micropolis-activity-0.0.20071228/src/sim/w_util.c:240: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[1024]; data/micropolis-activity-0.0.20071228/src/sim/w_util.c:272: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]; data/micropolis-activity-0.0.20071228/src/sim/w_util.c:307: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[1024]; data/micropolis-activity-0.0.20071228/src/sim/w_x.c:1374: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(want[col], have[col], (height * sizeof(short))); data/micropolis-activity-0.0.20071228/src/tcl/compat/dirent2.h:38: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 d_name[MAXNAMLEN + 1]; /* Name must be no longer than this */ data/micropolis-activity-0.0.20071228/src/tcl/compat/dirent2.h:51: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 dd_buf[DIRBLKSIZ]; data/micropolis-activity-0.0.20071228/src/tcl/compat/opendir.c:30:12: [2] (misc) open: 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 ((fd = open(myname, 0, 0)) == -1) data/micropolis-activity-0.0.20071228/src/tcl/compat/opendir.c:49: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 od_name[ODIRSIZ]; data/micropolis-activity-0.0.20071228/src/tcl/compat/opendir.c:57: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 od_name[ODIRSIZ]; data/micropolis-activity-0.0.20071228/src/tcl/compat/stdlib.h:30: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). extern int atoi _ANSI_ARGS_((char *string)); data/micropolis-activity-0.0.20071228/src/tcl/compat/stdlib.h:31:14: [2] (integer) atol: 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). extern long atol _ANSI_ARGS_((char *string)); data/micropolis-activity-0.0.20071228/src/tcl/compat/strerror.c:47: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. static char msg[50]; data/micropolis-activity-0.0.20071228/src/tcl/compat/strerror.c:469: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(msg, "unknown error (%d)", error); data/micropolis-activity-0.0.20071228/src/tcl/compat/string.h:26:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. extern char * memcpy _ANSI_ARGS_((char *t, char *f, int n)); data/micropolis-activity-0.0.20071228/src/tcl/regexp.c:1128: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 buf[50]; data/micropolis-activity-0.0.20071228/src/tcl/regexp.c:1172: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(buf+strlen(buf), "OPEN%d", OP(op)-OPEN); data/micropolis-activity-0.0.20071228/src/tcl/regexp.c:1184: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(buf+strlen(buf), "CLOSE%d", OP(op)-CLOSE); data/micropolis-activity-0.0.20071228/src/tcl/regexp.h:16: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 *startp[NSUBEXP]; data/micropolis-activity-0.0.20071228/src/tcl/regexp.h:17: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 *endp[NSUBEXP]; data/micropolis-activity-0.0.20071228/src/tcl/regexp.h:22: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 program[1]; /* Unwarranted chumminess with compiler. */ data/micropolis-activity-0.0.20071228/src/tcl/tclbasic.c:450: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 copyStorage[NUM_CHARS]; data/micropolis-activity-0.0.20071228/src/tcl/tclbasic.c:461: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 *(argStorage[NUM_ARGS]); data/micropolis-activity-0.0.20071228/src/tcl/tclbasic.c:737: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(iPtr->resultSpace, "command returned bad code: %d", data/micropolis-activity-0.0.20071228/src/tcl/tclbasic.c:982: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 fixedSpace[FIXED_SIZE+1]; data/micropolis-activity-0.0.20071228/src/tcl/tclbasic.c:1010: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((VOID *) new, (VOID *) cmd, spaceUsed); data/micropolis-activity-0.0.20071228/src/tcl/tclckall.c:37: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. unsigned char low_guard[GUARD_SIZE]; data/micropolis-activity-0.0.20071228/src/tcl/tclckall.c:38: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. char body[1]; data/micropolis-activity-0.0.20071228/src/tcl/tclckall.c:193:13: [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). fileP = fopen (fileName, "wb"); data/micropolis-activity-0.0.20071228/src/tcl/tclckall.c:195:13: [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). fileP = fopen (fileName, "w"); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:177: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 msg[100]; data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:178: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(msg, "\n (\"%.50s\" arm line %d)", caseArgv[body-1], data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:239: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(interp->result, "%d", result); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:349:36: [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. Tcl_SetVar2(interp, "errorCode", (char *) NULL, argv[3], data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:404: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 msg[60]; data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:405: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(msg, "\n (\"eval\" body line %d)", interp->errorLine); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:498: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 msg[60]; data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:499: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(msg, "\n (\"for\" body line %d)", interp->errorLine); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:581: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 msg[100]; data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:582: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(msg, "\n (\"foreach\" body line %d)", data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:625: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 newFormat[40]; /* A new format specifier is generated here. */ data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:733: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). width = atoi(format); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:749: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(newPtr, "%d", width); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:760: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). precision = atoi(format); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:776: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(newPtr, "%d", precision); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:850: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(interp->result, "bad field specifier \"%c\"", *format); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:873:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((VOID *) newDst, (VOID *) dst, dstSize); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:882: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((VOID *) (dst+dstSize), (VOID *) oneWordValue, size); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c:105: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 msg[60]; data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c:106: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(msg, "\n (\"if\" test line %d)", interp->errorLine); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c:120: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 msg[60]; data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c:154: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 newString[30]; data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c:183: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(newString, "%d", value); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c:271: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(iPtr->result, "%d", iPtr->cmdCount); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c:397: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(iPtr->result, "%d", iPtr->varFramePtr->level); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c:659: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((VOID *) interp->result, (VOID *) element, size); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c:830: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(interp->result, "%d", count); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c:1091: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(interp->result, "%d", match); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:33: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 command[4]; /* Space for Tcl command to invoke. Actual data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:117: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. string = (char *) ckalloc((unsigned) (strlen(argPtr[1]) + 1)); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:155: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 *result, info[50]; data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:165: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(info, "%d %d", regexpPtr->startp[i] - string, data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:256: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. string = (char *) ckalloc((unsigned) (strlen(argPtr[1]) + 1)); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:652: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(interp->result, "bad scan conversion character \"%c\"", data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:698: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 string[120]; data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:701: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(string, "%d", *((int *) curField->location)); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:713: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(string, "%d", *((char *) curField->location) & 0xff); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:727: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(string, "%g", *((double *) curField->location)); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:734: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(string, "%g", *((float *) curField->location)); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:742: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(interp->result, "%d", numScanned); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:790: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 string[2]; data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:898: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(interp->result, "%d", match); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:932: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(interp->result, "%d", strlen(argv[2])); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:1208: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 ops[4], *p; data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:1288: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 staticSpace[STATIC_SIZE+1]; data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:1405: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 msg[60]; data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:1406: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(msg, "\n (\"while\" body line %d)", data/micropolis-activity-0.0.20071228/src/tcl/tclenv.c:229: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((VOID *) newEnviron, (VOID *) environ, data/micropolis-activity-0.0.20071228/src/tcl/tclenv.c:430:19: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. newEnviron[i] = (char *) ckalloc((unsigned) (strlen(environ[i]) + 1)); data/micropolis-activity-0.0.20071228/src/tcl/tclexpr.c:52: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 staticSpace[STATIC_STRING_SPACE]; data/micropolis-activity-0.0.20071228/src/tcl/tclexpr.c:617: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(interp->result, data/micropolis-activity-0.0.20071228/src/tcl/tclexpr.c:1125: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(valuePtr->pv.buffer, "%ld", valuePtr->intValue); data/micropolis-activity-0.0.20071228/src/tcl/tclexpr.c:1127: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(valuePtr->pv.buffer, "%g", valuePtr->doubleValue); data/micropolis-activity-0.0.20071228/src/tcl/tclexpr.c:1319: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(interp->result, "%ld", value.intValue); data/micropolis-activity-0.0.20071228/src/tcl/tclexpr.c:1321: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(interp->result, "%g", value.doubleValue); data/micropolis-activity-0.0.20071228/src/tcl/tclget.c:139: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 lowerCase[10]; data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:226: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 static1[STATIC_SIZE]; data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:271: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 static1[STATIC_SIZE], static2[STATIC_SIZE]; data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:360: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 static1[STATIC_SIZE]; data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:414: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. static char staticBuf[STATIC_BUF_SIZE]; data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:459: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((VOID *) curBuf, (VOID *) (name+1), length); data/micropolis-activity-0.0.20071228/src/tcl/tclhash.c:346: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(result, "%d entries in table, %d buckets\n", data/micropolis-activity-0.0.20071228/src/tcl/tclhash.c:350: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(p, "number of buckets with %d entries: %d\n", data/micropolis-activity-0.0.20071228/src/tcl/tclhash.c:354: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, "number of buckets with more %d or more entries: %d\n", data/micropolis-activity-0.0.20071228/src/tcl/tclhash.c:357: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, "average search distance for entry: %.1f", average); data/micropolis-activity-0.0.20071228/src/tcl/tclhash.h:48: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 string[4]; /* String for key. The actual size data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:353: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 serial[20]; data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:362: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(serial, "%6d ", iPtr->curEventNum + 1 - (count - i)); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:458: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(iPtr->result, "%d", iPtr->curEventNum+1); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:674:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *argv[2]; data/micropolis-activity-0.0.20071228/src/tcl/tclint.h:173: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 string[4]; /* String value of variable. The actual data/micropolis-activity-0.0.20071228/src/tcl/tclint.h:240: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[4]; /* Name of argument starts here. The name data/micropolis-activity-0.0.20071228/src/tcl/tclint.h:504: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 *patterns[NUM_REGEXPS];/* Strings corresponding to compiled data/micropolis-activity-0.0.20071228/src/tcl/tclint.h:533: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 resultSpace[TCL_RESULT_SIZE+1]; data/micropolis-activity-0.0.20071228/src/tcl/tclparse.c:351: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(interp->result, "missing %c", termChar); data/micropolis-activity-0.0.20071228/src/tcl/tclparse.c:845: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((VOID *) new, (VOID *) pvPtr->buffer, pvPtr->next - pvPtr->buffer); data/micropolis-activity-0.0.20071228/src/tcl/tclparse.c:1082: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 copyStorage[NUM_CHARS]; data/micropolis-activity-0.0.20071228/src/tcl/tclparse.c:1145: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 msg[100]; data/micropolis-activity-0.0.20071228/src/tcl/tclparse.c:1146: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(msg, "\n (parsing index for array \"%.*s\")", data/micropolis-activity-0.0.20071228/src/tcl/tclproc.c:72:25: [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. procPtr->command = (char *) ckalloc((unsigned) strlen(argv[3]) + 1); data/micropolis-activity-0.0.20071228/src/tcl/tclproc.c:318: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 msg[60]; data/micropolis-activity-0.0.20071228/src/tcl/tclproc.c:319: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(msg, "\n (\"uplevel\" body line %d)", interp->errorLine); data/micropolis-activity-0.0.20071228/src/tcl/tclproc.c:503: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 msg[100]; data/micropolis-activity-0.0.20071228/src/tcl/tclproc.c:509: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(msg, "\n (procedure \"%.50s\" line %d)", argv[0], data/micropolis-activity-0.0.20071228/src/tcl/tcltest.c:32: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 dumpFile[100]; data/micropolis-activity-0.0.20071228/src/tcl/tcltest.c:91: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[1000], *cmd; data/micropolis-activity-0.0.20071228/src/tcl/tclunix.h:316:12: [2] (misc) open: 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). extern int open _ANSI_ARGS_((CONST char *path, int flags, ...)); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:282: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 buffer[BUFFER_SIZE+1]; data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:547: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(interp->result, "%ld", statBuf.st_atime); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:584: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(interp->result, "%ld", statBuf.st_mtime); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:599: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 linkValue[MAXPATHLEN+1]; data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:625: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(interp->result, "%ld", statBuf.st_size); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:716: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 string[30]; data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:718: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(string, "%d", statPtr->st_dev); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:723: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(string, "%d", statPtr->st_ino); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:728: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(string, "%d", statPtr->st_mode); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:733: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(string, "%d", statPtr->st_nlink); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:738: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(string, "%d", statPtr->st_uid); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:743: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(string, "%d", statPtr->st_gid); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:748: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(string, "%ld", statPtr->st_size); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:753: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(string, "%ld", statPtr->st_atime); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:758: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(string, "%ld", statPtr->st_mtime); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:763: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(string, "%ld", statPtr->st_ctime); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:894: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 buffer[BUF_SIZE+1]; data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:963: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(interp->result, "%d", totalCount); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1063: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). filePtr->f = fopen(fileName, access); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1122: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(interp->result, "file%d", fd); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1168: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 buffer[MAXPATHLEN+1]; data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1294: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 buffer[READ_BUF_SIZE+1]; data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1502: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(interp->result, "%d", ftell(filePtr->f)); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1562: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 msg[60]; data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1563: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(msg, "\n (\"time\" body line %d)", data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1580: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(interp->result, "%.0f microseconds per iteration", timePer/count); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1635: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 msg1[20], msg2[20]; data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1638: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(msg1, "%d", pid); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1640: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(msg2, "%d", WEXITSTATUS(waitStatus)); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1678: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 buffer[BUFFER_SIZE+1]; data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:104:14: [2] (misc) open: 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). fileId = open(fileName, O_RDONLY, 0); data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:139: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 msg[200]; data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:145: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(msg, "\n (file \"%.150s\" line %d)", fileName, data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:208: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((VOID *) newWaitTable, (VOID *) waitTable, data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:577: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 inName[sizeof(TMP_STDIN_NAME) + 1]; data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:581:6: [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). mkstemp(inName); data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:582:16: [2] (misc) open: 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). inputId = open(inName, O_RDWR|O_CREAT|O_TRUNC, 0600); data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:611:16: [2] (misc) open: 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). inputId = open(input, O_RDONLY, 0); data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:641:17: [2] (misc) open: 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). lastOutputId = open(output, O_WRONLY|O_CREAT|O_TRUNC, 0666); data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:675: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 errName[sizeof(TMP_STDERR_NAME) + 1]; data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:678:2: [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). mkstemp(errName); data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:679:12: [2] (misc) open: 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). errorId = open(errName, O_WRONLY|O_CREAT|O_TRUNC, 0600); data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:687:16: [2] (misc) open: 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). *errFilePtr = open(errName, O_RDONLY, 0); data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:733: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 errSpace[200]; data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:748: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(errSpace, "couldn't find \"%.150s\" to execute\n", data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:941: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((VOID *) newPtrArray, (VOID *) iPtr->filePtrArray, data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:178: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(interp->result, data/micropolis-activity-0.0.20071228/src/tcl/tclvar.c:1602: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(interp->result, "%d", size); data/micropolis-activity-0.0.20071228/src/tcl/tclvar.c:1617: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 string[20]; data/micropolis-activity-0.0.20071228/src/tcl/tclvar.c:1620: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(string, "%d", searchPtr->id); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:44: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 *tzname[2]; data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:59: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 tbuf[100]; data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:144: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(tbuf, "%02d", timeptr->tm_mday); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:148: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(tbuf, "%02d", timeptr->tm_hour); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:157: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(tbuf, "%02d", i); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:161: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(tbuf, "%03d", timeptr->tm_yday + 1); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:165: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(tbuf, "%02d", timeptr->tm_mon + 1); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:169: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(tbuf, "%02d", timeptr->tm_min); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:180: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(tbuf, "%02d", timeptr->tm_sec); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:184: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(tbuf, "%d", weeknumber(timeptr, 0)); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:188: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(tbuf, "%d", timeptr->tm_wday); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:192: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(tbuf, "%d", weeknumber(timeptr, 1)); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:204: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(tbuf, "%02d:%02d:%02d", data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:212: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(tbuf, "%d", i); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:216: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(tbuf, "%d", 1900 + timeptr->tm_year); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:245: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(tbuf, "%2d", timeptr->tm_mday); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxbsrc.c:107: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 *cmdArgv [3]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxcclk.c:89: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 (interp->result, "%ld", clockVal); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxclck.c:46: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 (interp->result, "%ld", time ((long *) NULL)); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxclp.c:234: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 inputBuf[256]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxdebg.c:256: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. sprintf(interp->result, "%d", infoPtr->depth); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxdup.c:68:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (interp->result, "file%d", newFileId); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:77: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 fHandle [12]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:96: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. sprintf (interp->result, "file%d file%d", fileIds [0], fileIds [1]); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:98: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. sprintf (fHandle, "file%d", fileIds [0]); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:102: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. sprintf (fHandle, "file%d", fileIds [1]); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:135: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 transferBuffer [2048]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:242: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 statList [200]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:244: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 (statList, data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:282: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 numBuf [30]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:284: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 (numBuf, "%d", statBufPtr->st_dev); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:289: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 (numBuf, "%d", statBufPtr->st_ino); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:294: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 (numBuf, "%d", statBufPtr->st_mode); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:299: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 (numBuf, "%d", statBufPtr->st_nlink); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:304: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 (numBuf, "%d", statBufPtr->st_uid); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:309: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 (numBuf, "%d", statBufPtr->st_gid); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:314: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 (numBuf, "%d", statBufPtr->st_size); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:319: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 (numBuf, "%d", statBufPtr->st_atime); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:324: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 (numBuf, "%d", statBufPtr->st_mtime); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:329: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 (numBuf, "%d", statBufPtr->st_ctime); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:371: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. sprintf (interp->result, "%d", statBufPtr->st_dev); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:373: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. sprintf (interp->result, "%d", statBufPtr->st_ino); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:375: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. sprintf (interp->result, "%d", statBufPtr->st_mode); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:377: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. sprintf (interp->result, "%d", statBufPtr->st_nlink); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:379: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. sprintf (interp->result, "%d", statBufPtr->st_uid); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:381: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. sprintf (interp->result, "%d", statBufPtr->st_gid); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:383: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. sprintf (interp->result, "%d", statBufPtr->st_size); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:385: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. sprintf (interp->result, "%d", statBufPtr->st_atime); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:387: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. sprintf (interp->result, "%d", statBufPtr->st_mtime); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:389: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. sprintf (interp->result, "%d", statBufPtr->st_ctime); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:561:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (interp->result, "%d", dynBuf.len); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfctl.c:94: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 attrNameUp [MAX_ATTR_NAME_LEN]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfsca.c:54: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 curName [16]; /* Current context name. */ data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfsca.c:355: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 numBuf [20]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfsca.c:361: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 (numBuf, "%ld", fileOffset); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfsca.c:366: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 (numBuf, "%ld", scanLineNum); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxgenl.c:88: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. char numBuf [32]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxgenl.c:89: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. sprintf (numBuf, "%d", tclxPatchlevel); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxgenl.c:131: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 itxt [12]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxgenl.c:155: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. sprintf (itxt,"%ld",i); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxgenl.c:167: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. char buf [64]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxgenl.c:169:17: [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, "\n (\"loop\" body line %d)", data/micropolis-activity-0.0.20071228/src/tclx/src/tclxgenl.c:181: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 (itxt,"%ld",i); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxhndl.c:44: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 handleBase [1]; /* Base handle name. MUST BE LAST FIELD! */ data/micropolis-activity-0.0.20071228/src/tclx/src/tclxhndl.c:146: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 (tblHdrPtr->bodyP, oldBodyP, newSize); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxid.c:83: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. char numBuf [32]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxid.c:85: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. sprintf (numBuf, "%d", userId); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxid.c:104: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 (interp->result, "%d", pw->pw_uid); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxid.c:115: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. char numBuf [32]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxid.c:117: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. sprintf (numBuf, "%d", groupId); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxid.c:136: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 (interp->result, "%d", grp->gr_gid); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxid.c:199:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (interp->result, "%d", geteuid ()); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxid.c:207:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (interp->result, "%d", getegid ()); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxid.c:219:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (interp->result, "%d", getpid ()); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxid.c:229:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (interp->result, "%d", getppid ()); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxid.c:234:17: [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 (interp->result, "%d", getpgrp ()); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxid.c:271:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (interp->result, "%d", getuid ()); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxid.c:297:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (interp->result, "%d", getgid ()); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxint.h:129: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 [INIT_DYN_BUFFER_SIZE]; /* Initial buffer area. */ data/micropolis-activity-0.0.20071228/src/tclx/src/tclxklst.c:441: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 *elemArgv [2]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxklst.c:538: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 *elemArgv [2]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:48: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. typedef char fileId_t [64]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:177:15: [2] (misc) open: 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). fileNum = open (fileName, O_RDONLY, 0); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:219: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. char buf [100]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:220: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. sprintf (buf, "\n (file \"%.50s\" line %d)", fileName, data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:263: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 curDir [MAXPATHLEN+1]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:334: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 (fileId, "@%d:%d", statInfo.st_dev, statInfo.st_ino); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:472: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 indexBuffer [64], *indexPtr; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:473: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 *pkgDataArgv [3], *dataStr, *setResult; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:481: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 (indexPtr, "PKG:"); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:533: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 indexBuffer [64], *indexPtr; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:543: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 (indexPtr, "PKG:"); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:620: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 indexBuffer [64], *indexPtr; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:621: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 *procDataArgv [2], *dataStr, *setResult; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:629: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 (indexPtr, "PROC:"); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:672: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 indexBuffer [64], *indexPtr; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:682: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 (indexPtr, "PROC:"); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:775:20: [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). indexFilePtr = fopen (tndxFilePath, "r"); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:936: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 *tndxFilePath, tndxPathBuf [64], *msg; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:978: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 (msg, "\n while loading Tcl package library index \""); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1014:20: [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). indexFilePtr = fopen (indexFilePath, "r"); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1093: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 (msg, "\n while loading Tcl procedure index \""); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1211: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 *dirName, dirNameBuf [64]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1275: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 type, *location, *filePath, *cmdPtr, cmdBuf [80]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1306:13: [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 (cmdPtr, "load "); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1366: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 *pathName, pathNameBuf [64]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1498: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 (msg, "\n while demand loading \""); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlist.c:43: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 *staticArgv [12]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlist.c:275: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 (interp->result, "%d", (*scanPtr == '\0')); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxmath.c:190: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. sprintf (interp->result, "%d", ReallyRandom (range)); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxmath.c:200: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. char buf [18]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxmath.c:202: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. sprintf (buf, "%d", (int)RANDOM_RANGE); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxproc.c:52: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 *staticArgv [STATIC_ARG_SIZE]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxproc.c:128: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(interp->result, "%d", pid); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxprof.c:36: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 procName [1]; /* Procedure name. MUST BE LAST! */ data/micropolis-activity-0.0.20071228/src/tclx/src/tclxprof.c:199: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 *stackArgv [MAX_NESTING_DEPTH]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxprof.c:507: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 *dataArgv [3], *dataListPtr; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxprof.c:508: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 countBuf [32], realTimeBuf [32], cpuTimeBuf [32]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxprof.c:521: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. sprintf (countBuf, "%ld", dataEntryPtr->count); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxprof.c:522: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. sprintf (realTimeBuf, "%ld", dataEntryPtr->realTime * MS_PER_TICK); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxprof.c:523: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. sprintf (cpuTimeBuf, "%ld", dataEntryPtr->cpuTime * MS_PER_TICK); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsel.c:253:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (fileHandleArgv [handleCnt], "file%d", fileNum); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsel.c:292: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 *retListArgv [3]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsel.c:391: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. ckfree ((char *) retListArgv [0]); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsel.c:392: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. ckfree ((char *) retListArgv [1]); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsel.c:393: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. ckfree ((char *) retListArgv [2]); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsig.c:131: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 *signalTrapCmds [MAXSIG]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsig.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 sigNameUp [SIG_NAME_MAX+1]; /* Upshifted signal name */ data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsig.c:453: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. char errorInfo [TCL_RESULT_SIZE]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsig.c:645:13: [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 numBuf [20]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsig.c:647:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (numBuf, "%d", signalNum); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsig.c:726: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 *stateKeyedList [MAXSIG]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsig.c:727: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 *sigState [3], *sigEntry [2]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstr.c:94: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 (interp->result, "%d", strlen (argv[1])); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstr.c:270: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 from [MAX_EXPANSION+1]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstr.c:271: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 to [MAX_EXPANSION+1]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstr.c:272: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 map [MAX_EXPANSION+1]; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstr.c:282:34: [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. if (!ExpandString ((unsigned char *) argv[1], from)) { data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstr.c:287:34: [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. if (!ExpandString ((unsigned char *) argv[2], to)) { data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstr.c:309:28: [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. for (s = t = (unsigned char *) argv[3]; *s != '\0'; s++) { data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstr.c:383: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. sprintf(interp->result, "%d", (int)(*argv[2])); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxunix.c:66: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 (interp->result, "%d", sleep (useconds)); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxunix.c:68:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (interp->result, "%d", alarm (useconds)); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxunix.c:102: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 (interp->result, "%g", seconds); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxunix.c:174: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 (interp->result, "%d", exitCode); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxunix.c:206: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(interp->result, "%ld %ld %ld %ld", data/micropolis-activity-0.0.20071228/src/tclx/src/tclxunix.c:251: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. sprintf (interp->result, "%o", mask); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxutil.c:282: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 (dynBufPtr->ptr, oldBufPtr, dynBufPtr->len + 1); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxutil.c:705: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 (interp->result, "%.0f", pow (2.0, (double) DSIGNIF)); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxutil.c:710: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 (interp->result, "%.*g", precision, number); data/micropolis-activity-0.0.20071228/src/tk/library/demos/tkSquare.c:352: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. (char *) squarePtr, argv[2], 0); data/micropolis-activity-0.0.20071228/src/tk/library/demos/tkSquare.c:370: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(interp->result, "%d %d", squarePtr->x, squarePtr->y); data/micropolis-activity-0.0.20071228/src/tk/library/demos/tkSquare.c:391: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(interp->result, "%d", squarePtr->size); data/micropolis-activity-0.0.20071228/src/tk/main.c:76: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[200]; data/micropolis-activity-0.0.20071228/src/tk/main.c:218: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[20]; data/micropolis-activity-0.0.20071228/src/tk/main.c:271: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, "%d", argc-1); data/micropolis-activity-0.0.20071228/src/tk/tkargv.c:294: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(interp->result, "bad argument type %d in Tk_ArgvInfo", data/micropolis-activity-0.0.20071228/src/tk/tkargv.c:355:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[30]; data/micropolis-activity-0.0.20071228/src/tk/tkargv.c:399:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%d", *((int *) infoPtr->dst)); data/micropolis-activity-0.0.20071228/src/tk/tkargv.c:405:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%lg", *((double *) infoPtr->dst)); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:752: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 string[200*EVENT_BUFFER_SIZE]; data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:809: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(p, "Triple-"); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:811: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(p, "Double-"); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:817: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(p, "Any-"); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:856: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. sprintf(p, "%.100s", kPtr->name); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:862: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(p, "%d", patPtr->detail); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:1001: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((VOID *) ringPtr, (VOID *) eventPtr, sizeof(XEvent)); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:1060: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 shortSpace[STATIC_SPACE]; data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:1148: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 field[FIELD_SIZE]; data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:1186: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 string[2]; data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:1199: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(interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:1408: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((VOID *) psPtr->pats, (VOID *) patPtr, sequenceSize); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:1833: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 numStorage[NUM_SIZE+1]; data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:1853:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((VOID *) newSpace, (VOID *) buffer, afterSize); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:2132: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(numStorage, "%d", number); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:2142: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((VOID *) newSpace, (VOID *) buffer, afterSize); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:2186:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *argv[2]; data/micropolis-activity-0.0.20071228/src/tk/tkbitmap.c:438: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 string[20]; data/micropolis-activity-0.0.20071228/src/tk/tkbitmap.c:452: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(string, "_tk%d", autoNumber); data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:385: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(interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:480: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(interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:491: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(interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:504: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. (char *) butPtr, (char *) NULL, configFlags[butPtr->type]); data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:504:25: [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 *) butPtr, (char *) NULL, configFlags[butPtr->type]); data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:507: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. (char *) butPtr, argv[2], data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:516: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(interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:529: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(interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:545: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(interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:565: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(interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:576: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(interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:585: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(interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:435: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(interp->result, "%d %d %d %d", x1, y1, x2, y2); data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:552: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(interp->result, "%g", GridAlign((double) x, grid)); data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:574: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(interp->result, "%g", GridAlign((double) y, grid)); data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:582: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. (char *) canvasPtr, argv[2], 0); data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:664: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(interp->result, "%d", itemPtr->id); data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:813:57: [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. result = FindItems(interp, canvasPtr, argc-2, argv+2, (char *) NULL, data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:826: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(interp->result, "%d", itemPtr->id); data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:890: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(interp->result, "%d", index); data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:944:36: [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. itemPtr->typePtr->configSpecs, (char *) itemPtr, data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:1054:49: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (SaveCanvas(interp, canvasPtr, argv[2], atol(argv[3]), data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:1055:7: [2] (integer) atol: 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). atol(argv[4]), atol(argv[5]), atol(argv[6]))) { data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:1055:22: [2] (integer) atol: 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). atol(argv[4]), atol(argv[5]), atol(argv[6]))) { data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:1055:37: [2] (integer) atol: 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). atol(argv[4]), atol(argv[5]), atol(argv[6]))) { data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:1223: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(interp->result, "%d", canvasPtr->selItemPtr->id); data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:2303: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 msg[30]; data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:2304: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(msg, "%d", itemPtr->id); data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:2327: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((VOID *) newTagPtr, (VOID *) itemPtr->tagPtr, data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:3386: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 args[200]; data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:3410: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(args, " %d %d %d %d", size, page, first, last); data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:3431: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(args, " %d %d %d %d", size, page, first, last); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:99:23: [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. afterPtr->command = (char *) ckalloc((unsigned) (strlen(argv[2]) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:548: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(interp->result, "%d", Tk_InternAtom(tkwin, argv[2])); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:621: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(interp->result, "%g", pixels); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:624: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(interp->result, "%dx%d+%d+%d", Tk_Width(window), data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:628: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(interp->result, "%d", Tk_Height(window)); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:631: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(interp->result, "0x%x", Tk_WindowId(window)); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:688: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(interp->result, "%d", pixels); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:692: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(interp->result, "%d", Tk_ReqHeight(window)); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:696: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(interp->result, "%d", Tk_ReqWidth(window)); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:702: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(interp->result, "%d", x); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:708: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(interp->result, "%d", y); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:710: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 string[20]; data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:713: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(string, "%d", Tk_ScreenNumber(window)); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:719: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(interp->result, "%d", Tk_DefaultVisual(Tk_Screen(window))->map_entries); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:723: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(interp->result, "%d", Tk_DefaultDepth(Tk_Screen(window))); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:727: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(interp->result, "%d", HeightOfScreen(Tk_Screen(window))); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:731: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(interp->result, "%d", HeightMMOfScreen(Tk_Screen(window))); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:735: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(interp->result, "%d", WidthMMOfScreen(Tk_Screen(window))); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:751: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(interp->result, "%d", WidthOfScreen(Tk_Screen(window))); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:764: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(interp->result, "%d", Tk_Width(window)); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:767: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(interp->result, "%d", Tk_X(window)); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:770: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(interp->result, "%d", Tk_Y(window)); data/micropolis-activity-0.0.20071228/src/tk/tkcolor.c:303: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(interp->result, "couldn't allocate color"); data/micropolis-activity-0.0.20071228/src/tk/tkcolor.c:346: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. static char string[20]; data/micropolis-activity-0.0.20071228/src/tk/tkcolor.c:352: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(string, "#%4x%4x%4x", colorPtr->red, colorPtr->green, data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c:141: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 msg[100]; data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c:143: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(msg, "\n (processing \"%.40s\" option)", data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c:176: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 msg[200]; data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c:190: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 msg[200]; data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c:569: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(interp->result, "bad config table: unknown type %d", data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c:702:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *argv[6], *ptr, *result; data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c:703: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 buffer[200]; data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c:724: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(buffer, "%d", *((int *) ptr)); data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c:728: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(buffer, "%g", *((double *) ptr)); data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c:802: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(buffer, "%d", *((int *) ptr)); data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c:806: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(buffer, "%gm", *((int *) ptr)); data/micropolis-activity-0.0.20071228/src/tk/tkconfig.h:117:13: [2] (misc) open: 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). extern int open _ANSI_ARGS_((CONST char *path, int flags, ...)); data/micropolis-activity-0.0.20071228/src/tk/tkcursor.c:559: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. static char string[20]; data/micropolis-activity-0.0.20071228/src/tk/tkcursor.c:563: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(string, "cursor id 0x%x", cursor); data/micropolis-activity-0.0.20071228/src/tk/tkcvarc.c:287: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 buffer[500]; data/micropolis-activity-0.0.20071228/src/tk/tkcvarc.c:290: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(buffer, "%g %g %g %g", arcPtr->bbox[0], data/micropolis-activity-0.0.20071228/src/tk/tkcvarc.c:307: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(canvasPtr->interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkcvbmap.c:218: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(canvasPtr->interp->result, "%g %g", bmapPtr->x, bmapPtr->y); data/micropolis-activity-0.0.20071228/src/tk/tkcvbmap.c:227: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(canvasPtr->interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkcvline.c:310: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 buffer[300]; data/micropolis-activity-0.0.20071228/src/tk/tkcvline.c:315: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(buffer, "%g", linePtr->coordPtr[i]); data/micropolis-activity-0.0.20071228/src/tk/tkcvline.c:1316: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(buffer, "%.5g %.5g %.5g", linePtr->arrowShapeA, data/micropolis-activity-0.0.20071228/src/tk/tkcvpoly.c:235: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 buffer[300]; data/micropolis-activity-0.0.20071228/src/tk/tkcvpoly.c:240: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(buffer, "%g", polyPtr->coordPtr[i]); data/micropolis-activity-0.0.20071228/src/tk/tkcvtext.c:278: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(canvasPtr->interp->result, "%g %g", textPtr->x, textPtr->y); data/micropolis-activity-0.0.20071228/src/tk/tkcvtext.c:287: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(canvasPtr->interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkcvtext.c:462: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 *lineStart[MAX_LINES]; data/micropolis-activity-0.0.20071228/src/tk/tkcvwind.c:219: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(canvasPtr->interp->result, "%g %g", winItemPtr->x, data/micropolis-activity-0.0.20071228/src/tk/tkcvwind.c:229: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(canvasPtr->interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:399: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. (char *) entryPtr, argv[2], 0); data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:458: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(interp->result, "%d", index); data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:1605: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 args[100]; data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:1631: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(args, " %d %d %d %d", entryPtr->numChars, charsInWindow, data/micropolis-activity-0.0.20071228/src/tk/tkevent.c:1442: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((VOID *) ready, (VOID *) masks, 3*MASK_SIZE*sizeof(int)); data/micropolis-activity-0.0.20071228/src/tk/tkevent.c:1506: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((VOID *) ready, (VOID *) masks, 3*MASK_SIZE*sizeof(int)); data/micropolis-activity-0.0.20071228/src/tk/tkfont.c:227: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. static char string[20]; data/micropolis-activity-0.0.20071228/src/tk/tkfont.c:231: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(string, "font id 0x%x", fontStructPtr->fid); data/micropolis-activity-0.0.20071228/src/tk/tkfont.c:620: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 replace[10]; data/micropolis-activity-0.0.20071228/src/tk/tkframe.c:270: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. (char *) framePtr, argv[2], 0); data/micropolis-activity-0.0.20071228/src/tk/tkgrab.c:220: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 msg[100]; data/micropolis-activity-0.0.20071228/src/tk/tkgrab.c:222:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(msg, "grab failed for unknown reason (code %d)", data/micropolis-activity-0.0.20071228/src/tk/tklist.c:39: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 text[4]; /* Characters of this element, NULL- data/micropolis-activity-0.0.20071228/src/tk/tklist.c:390: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. (char *) listPtr, argv[2], 0); data/micropolis-activity-0.0.20071228/src/tk/tklist.c:398: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 index[20]; data/micropolis-activity-0.0.20071228/src/tk/tklist.c:408: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(index, "%d", i); data/micropolis-activity-0.0.20071228/src/tk/tklist.c:484: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(interp->result, "%d", index); data/micropolis-activity-0.0.20071228/src/tk/tklist.c:563: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(interp->result, "%d", listPtr->numElements); data/micropolis-activity-0.0.20071228/src/tk/tklist.c:1572: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((VOID *) buffer, (VOID *) (selection + offset), count); data/micropolis-activity-0.0.20071228/src/tk/tklist.c:1671: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 string[60]; data/micropolis-activity-0.0.20071228/src/tk/tklist.c:1684: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(string, " %d %d %d %d", listPtr->numElements, listPtr->numLines, data/micropolis-activity-0.0.20071228/src/tk/tklist.c:1717: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 string[60]; data/micropolis-activity-0.0.20071228/src/tk/tklist.c:1732: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(string, " %d %d %d %d", totalUnits, windowUnits, first, last); data/micropolis-activity-0.0.20071228/src/tk/tkmenu.c:569: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((VOID *) newEntries, (VOID *) menuPtr->entries, data/micropolis-activity-0.0.20071228/src/tk/tkmenu.c:606: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. (char *) menuPtr, argv[2], 0); data/micropolis-activity-0.0.20071228/src/tk/tkmenu.c:702: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. (char *) mePtr, argv[3], COMMAND_MASK << mePtr->type); data/micropolis-activity-0.0.20071228/src/tk/tkmenu.c:723: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(interp->result, "%d", index); data/micropolis-activity-0.0.20071228/src/tk/tkmenu.c:1987: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 string[30]; data/micropolis-activity-0.0.20071228/src/tk/tkmenu.c:2007: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(string, "%d %d ", x, y); data/micropolis-activity-0.0.20071228/src/tk/tkmnbut.c:378: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. (char *) mbPtr, argv[2], 0); data/micropolis-activity-0.0.20071228/src/tk/tkmnbut.c:1080: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 string[50]; data/micropolis-activity-0.0.20071228/src/tk/tkmnbut.c:1088: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(string, "%d %d ", x, y); data/micropolis-activity-0.0.20071228/src/tk/tkmsg.c:277: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. (char *) msgPtr, argv[2], 0); data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:253:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[TMP_SIZE+1]; data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:746: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(interp->result, "missing colon on line %d", data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:779: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(interp->result, "missing value on line %d", lineNum); data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:791: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(interp->result, "missing newline on line %d", data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:856:14: [2] (misc) open: 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). fileId = open(realName, O_RDONLY | O_BINARY, 0); data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:858:14: [2] (misc) open: 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). fileId = open(realName, O_RDONLY, 0); data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:954: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((VOID *) newPtr->els, (VOID *) arrayPtr->els, data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:1076: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((VOID *) newLevels, (VOID *) levels, data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:1326: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(interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkpack.c:219: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 tmp[20]; data/micropolis-activity-0.0.20071228/src/tk/tkpack.c:240: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(tmp, "%d", packPtr->padX); data/micropolis-activity-0.0.20071228/src/tk/tkpack.c:244: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(tmp, "%d", packPtr->padY); data/micropolis-activity-0.0.20071228/src/tk/tkpixmap.c:520: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 string[20]; data/micropolis-activity-0.0.20071228/src/tk/tkpixmap.c:534: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(string, "_tk%d", autoNumber); data/micropolis-activity-0.0.20071228/src/tk/tkplace.c:256: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 buffer[50]; data/micropolis-activity-0.0.20071228/src/tk/tkplace.c:269: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(buffer, "-relx %.4g", slavePtr->relX); data/micropolis-activity-0.0.20071228/src/tk/tkplace.c:271: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(buffer, "-x %d", slavePtr->x); data/micropolis-activity-0.0.20071228/src/tk/tkplace.c:275: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(buffer, " -rely %.4g", slavePtr->relY); data/micropolis-activity-0.0.20071228/src/tk/tkplace.c:277: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(buffer, " -y %d", slavePtr->y); data/micropolis-activity-0.0.20071228/src/tk/tkplace.c:281: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(buffer, " -relwidth %.4g", slavePtr->relWidth); data/micropolis-activity-0.0.20071228/src/tk/tkplace.c:284: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(buffer, " -width %d", slavePtr->width); data/micropolis-activity-0.0.20071228/src/tk/tkplace.c:288: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(buffer, " -relheight %.4g", slavePtr->relHeight); data/micropolis-activity-0.0.20071228/src/tk/tkplace.c:291: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(buffer, " -height %d", slavePtr->height); data/micropolis-activity-0.0.20071228/src/tk/tkpresrv.c:103: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((VOID *) new, (VOID *) refArray, spaceAvl*sizeof(Reference)); data/micropolis-activity-0.0.20071228/src/tk/tkpresrv.c:169:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((VOID *) &refArray[i], (VOID *) &refArray[i+1], data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:184:7: [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). atoi(argv[3])==0?"any":argv[3]," using address \"", data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:194: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(interp->result, "file%d", fd); data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:197: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[50]; data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:202: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,"%d",errno); data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:204: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,"%d",(int)ntohs(sockaddr.sin_port)); data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:352: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[100]; data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:353: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 nm[10]; data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:359: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(nm,"file%d",fd); data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:368: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(interp->result, "file%d", fd); data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:473: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). servport = htons(atoi(service)); data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.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((char *)&(sockaddr.sin_addr.s_addr), data/micropolis-activity-0.0.20071228/src/tk/tkrectov.c:246: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 buffer[500]; data/micropolis-activity-0.0.20071228/src/tk/tkrectov.c:249: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(buffer, "%g %g %g %g", rectOvalPtr->bbox[0], data/micropolis-activity-0.0.20071228/src/tk/tkrectov.c:266: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(canvasPtr->interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:360: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. (char *) scalePtr, argv[2], 0); data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:371: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(interp->result, "%d", scalePtr->value); data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:605: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 valueString[30]; data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:647: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(valueString, "%d", scalePtr->fromValue); data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:651: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(valueString, "%d", scalePtr->toValue); data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:881: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 valueString[30]; data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:885: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(valueString, "%d", value); data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:1100: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 valueString[30]; data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:1105: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(valueString, "%d", value); data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:1359: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 string[20]; data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:1375: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(string, " %d", scalePtr->value); data/micropolis-activity-0.0.20071228/src/tk/tkscrbar.c:344: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. (char *) scrollPtr, argv[2], 0); data/micropolis-activity-0.0.20071228/src/tk/tkscrbar.c:355: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(interp->result, "%d %d %d %d", scrollPtr->totalUnits, data/micropolis-activity-0.0.20071228/src/tk/tkscrbar.c:372: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(interp->result, "illegal totalUnits %d", totalUnits); data/micropolis-activity-0.0.20071228/src/tk/tkscrbar.c:379: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(interp->result, "illegal windowUnits %d", windowUnits); data/micropolis-activity-0.0.20071228/src/tk/tkscrbar.c:390: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(interp->result, "illegal lastUnit %d", lastUnit); data/micropolis-activity-0.0.20071228/src/tk/tkscrbar.c:1064: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 string[20]; data/micropolis-activity-0.0.20071228/src/tk/tkscrbar.c:1070: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(string, " %d", unit); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:135: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 command[4]; /* Command to invoke. Actual space is data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:414: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 buffer[TK_SEL_BYTES_AT_ONCE+1]; data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:572: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(interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:607: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(interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:665: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(interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:851: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(retrPtr->interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:882: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(retrPtr->interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:956: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((VOID *) newString, (VOID *) getInfoPtr->string, data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1009: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 atomName[MAX_ATOM_NAME_LENGTH+1]; data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1135: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(result+curSize, "%#x", *propPtr); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1298: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 *) buffer)[numItems] = '\0'; data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1475: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(retrPtr->interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1491: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(retrPtr->interp->result, data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1592: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 *) buffer)[0] = 0; data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1604: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 *) buffer)[numItems] = '\0'; data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1677: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 staticSpace[MAX_STATIC_SIZE]; data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1716: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((VOID *) buffer, (VOID *) cmdInfoPtr->interp->result, length); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1859: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(buffer, "%#x", winPtr->dispPtr->selectionTime); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1872: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(buffer, "TARGETS MULTIPLE TIMESTAMP"); data/micropolis-activity-0.0.20071228/src/tk/tksend.c:180: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 propInfo[TCL_MAX_NAME_LENGTH + 20]; data/micropolis-activity-0.0.20071228/src/tk/tksend.c:216: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 *argv[3]; data/micropolis-activity-0.0.20071228/src/tk/tksend.c:240: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(propInfo, "%x %.*s", Tk_WindowId(dispPtr->commWindow), data/micropolis-activity-0.0.20071228/src/tk/tksend.c:301: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 *property, staticSpace[STATIC_PROP_SPACE]; data/micropolis-activity-0.0.20071228/src/tk/tksend.c:446: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(interp->result, "NoReturnValue"); data/micropolis-activity-0.0.20071228/src/tk/tksend.c:539: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(interp->result, "couldn't read intepreter registry property"); data/micropolis-activity-0.0.20071228/src/tk/tksend.c:552: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(interp->result, "intepreter registry property is badly formed"); data/micropolis-activity-0.0.20071228/src/tk/tksend.c:740: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((VOID *) entry, (VOID *) p, count); data/micropolis-activity-0.0.20071228/src/tk/tksend.c:830: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 errorMsg[100]; data/micropolis-activity-0.0.20071228/src/tk/tksend.c:832: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 staticSpace[STATIC_RESULT_SPACE]; data/micropolis-activity-0.0.20071228/src/tk/tksend.c:883: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(errorMsg, data/micropolis-activity-0.0.20071228/src/tk/tkshare.c:116: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((VOID *) (new+1), (VOID *) groupPtr->windows, data/micropolis-activity-0.0.20071228/src/tk/tkshare.c:189:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((VOID *) (groupPtr->windows + i), data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:136: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[ 16 ]; data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:166: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 [16]; data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:392: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 *argv[2]; data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:684: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 [20]; data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:699:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ((char *) &(sockaddr.sin_addr.s_addr), data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:744: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 (name, "tcp_connection_%d", f); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:969: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 (interp -> result, "%d", status); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1009: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 * nargv [3]; data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1062: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 (server -> name, "tcp_server_%d", server -> socketfd); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1180: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 (interp -> result, "%d", status); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1273: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 * nargv [3]; data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1326: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 (client -> name, "tcp_client_%d", client -> socketfd); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1460: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 (interp -> result, "%d", (int) ntohs (portaddr.sin_port)); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1737:23: [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. server -> command = (char *) malloc (strlen (argv [a]) + 1); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2396: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 localName [128]; data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2434: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 ((char *) &hostAddr, data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2460: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 ((char *) &hostAddr, data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2489: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 * argv [2]; data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2490: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 rint [16]; data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2497: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 (rint, "%d", status); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2628: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 [BUFSIZ+1]; data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2633: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 * argv [3]; data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2651: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[512]; data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2836: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 [BUFSIZ+1]; data/micropolis-activity-0.0.20071228/src/tk/tktext.c:378: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. (char *) textPtr, argv[2], 0); data/micropolis-activity-0.0.20071228/src/tk/tktext.c:1103: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((VOID *) buffer, (VOID *) (linePtr->bytes + textPtr->selCh), data/micropolis-activity-0.0.20071228/src/tk/tktext.h:48: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 bytes[4]; /* Contents of line, null-terminated. data/micropolis-activity-0.0.20071228/src/tk/tktxbtre.c:420: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((VOID *) newPtr->bytes, (VOID *) linePtr->bytes, data/micropolis-activity-0.0.20071228/src/tk/tktxbtre.c:424: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((VOID *) (newPtr->bytes + prefixLength), (VOID *) string, data/micropolis-activity-0.0.20071228/src/tk/tktxbtre.c:428: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((VOID *) (newPtr->bytes + prefixLength + newChunkLength), data/micropolis-activity-0.0.20071228/src/tk/tktxbtre.c:651: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((VOID *) linePtr->bytes, (VOID *) line1Ptr->bytes, ch1); data/micropolis-activity-0.0.20071228/src/tk/tktxbtre.c:2166: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((VOID *) newTags, (VOID *) tagInfoPtr->tagPtrs, data/micropolis-activity-0.0.20071228/src/tk/tktxbtre.c:2171: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((VOID *) newCounts, (VOID *) tagInfoPtr->counts, data/micropolis-activity-0.0.20071228/src/tk/tktxdisp.c:799: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((VOID *) newPtrs, (VOID *) tInfoPtr->tagPtrs, data/micropolis-activity-0.0.20071228/src/tk/tktxdisp.c:922: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 string[60]; data/micropolis-activity-0.0.20071228/src/tk/tktxdisp.c:952: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(string, " 0 0 0 0"); data/micropolis-activity-0.0.20071228/src/tk/tktxdisp.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(string, " %d %d %d %d", TkBTreeNumLines(textPtr->tree), data/micropolis-activity-0.0.20071228/src/tk/tktxidx.c:273: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(string, "%d.%d", line+1, ch); data/micropolis-activity-0.0.20071228/src/tk/tktxtag.c:232: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. (char *) tagPtr, argv[4], 0); data/micropolis-activity-0.0.20071228/src/tk/tktxtag.c:370: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 position[POS_CHARS]; data/micropolis-activity-0.0.20071228/src/tk/tktxtag.c:456: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 position[POS_CHARS]; data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:386: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(interp->result, "bad screen number \"%d\"", screenId); data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:477: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 staticSpace[FIXED_SIZE]; data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:613: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 newName[110]; data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:617: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(newName, "%.100s #%d", baseName, i); data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:707: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. char dsp[256]; data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:761: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 fixedSpace[FIXED_SPACE+1]; data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:551: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(interp->result, "%d %d %d %d", wmPtr->minAspect.x, data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:640: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 *names[MAX_ATOMS]; data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:695: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(interp->result, "%dx%d%c%d%c%d", width, height, data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:717: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(interp->result, "%d %d %d %d", wmPtr->reqGridWidth, data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:906: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(interp->result, "%d %d", wmPtr->hints.icon_x, data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:963: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(interp->result, "%d %d", wmPtr->maxWidth, data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:991: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(interp->result, "%d %d", wmPtr->minWidth, data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:500:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). CityFileName = (char *)ckalloc(strlen(filename) + 1); data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:513: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). filename = (char *)ckalloc(strlen(cp) + 1); data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:599:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). CityFileName = (char *)ckalloc(strlen(filename) + 1); data/micropolis-activity-0.0.20071228/src/sim/s_fileio.c:613: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). filename = (char *)ckalloc(strlen(cp) + 1); data/micropolis-activity-0.0.20071228/src/sim/sim.c:123: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). TO = ckalloc(strlen(FROM) + 1); \ data/micropolis-activity-0.0.20071228/src/sim/sim.c:734: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). Displays = malloc(strlen(optarg) + 3); data/micropolis-activity-0.0.20071228/src/sim/sim.c:738: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). FirstDisplay = malloc(strlen(optarg) + 1); data/micropolis-activity-0.0.20071228/src/sim/sim.c:741: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). FirstDisplay = malloc(strlen(optarg) + 3); data/micropolis-activity-0.0.20071228/src/sim/sim.c:747: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). Displays = malloc(strlen(Displays) + strlen(optarg) + 4); data/micropolis-activity-0.0.20071228/src/sim/sim.c:747: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). Displays = malloc(strlen(Displays) + strlen(optarg) + 4); data/micropolis-activity-0.0.20071228/src/sim/sim.c:827: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). Displays = malloc(strlen(d) + 3); data/micropolis-activity-0.0.20071228/src/sim/sim.c:830: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). FirstDisplay = malloc(strlen(d) + 1); data/micropolis-activity-0.0.20071228/src/sim/sim.c:833: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). FirstDisplay = malloc(strlen(d) + 3); data/micropolis-activity-0.0.20071228/src/sim/terrain/terra.c:667:5: [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(dateBuffer) == 4) { /* if they entered a good date */ data/micropolis-activity-0.0.20071228/src/sim/w_cam.c:534: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). cam->name = (char *)malloc(strlen(name) + 1); data/micropolis-activity-0.0.20071228/src/sim/w_date.c:218: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). int maxStringLength = strlen(maxString); data/micropolis-activity-0.0.20071228/src/sim/w_date.c:676: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). strlen(dateStr[date->month])); data/micropolis-activity-0.0.20071228/src/sim/w_date.c:697: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). strlen(yearString)); data/micropolis-activity-0.0.20071228/src/sim/w_date.c:712:3: [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). strlen(dateString)); data/micropolis-activity-0.0.20071228/src/sim/w_date.c:717:3: [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). strlen(dateStr[date->month])); data/micropolis-activity-0.0.20071228/src/sim/w_date.c:727:3: [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). strlen(yearString)); data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:827: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). HistName[i], strlen(HistName[i])); data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:830: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). HistName[i], strlen(HistName[i])); data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:835: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). HistName[i], strlen(HistName[i])); data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:840: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). HistName[i], strlen(HistName[i])); data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:864: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). xx, yy, buf, strlen(buf)); data/micropolis-activity-0.0.20071228/src/sim/w_graph.c:886: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). xx, yy, buf, strlen(buf)); data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:423: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:598: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). length = strlen(intervalPtr->orientUid); data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:636: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). intervalPtr->commandLength = strlen(intervalPtr->command); data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:642: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). intervalPtr->labelLength = strlen(intervalPtr->label); data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:741:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). XTextExtents(intervalPtr->fontPtr, valueString, strlen(valueString), data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:745:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). XTextExtents(intervalPtr->fontPtr, valueString, strlen(valueString), data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:973: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). length = strlen(valueString); data/micropolis-activity-0.0.20071228/src/sim/w_inter.c:1186: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). length = strlen(valueString); data/micropolis-activity-0.0.20071228/src/sim/w_net.c:143: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). cp = cmd + strlen(cmd); data/micropolis-activity-0.0.20071228/src/sim/w_net.c:148:5: [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(cp, "}"); data/micropolis-activity-0.0.20071228/src/sim/w_piem.c:532: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/sim/w_piem.c:590:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(argv[2]); data/micropolis-activity-0.0.20071228/src/sim/w_piem.c:1108: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). menuPtr->titleLength = strlen(menuPtr->title); data/micropolis-activity-0.0.20071228/src/sim/w_piem.c:1222: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). mePtr->labelLength = strlen(mePtr->label); data/micropolis-activity-0.0.20071228/src/sim/w_resrc.c:198: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). buf += strlen(buf) + 1; data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:209: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). CityFileName = (char *)ckalloc(strlen(argv[0]) + 1); data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1357: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). (strlen(argv[2]) > 255)) { data/micropolis-activity-0.0.20071228/src/sim/w_sim.c:1382: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). (strlen(argv[2]) > 255)) { data/micropolis-activity-0.0.20071228/src/sim/w_sprite.c:278:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sprite->name = (char *)ckalloc(strlen(name) + 1); data/micropolis-activity-0.0.20071228/src/sim/w_util.c:80: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). numOfDigits = strlen(numStr); data/micropolis-activity-0.0.20071228/src/sim/w_x.c:304:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). xd->display = (char *)ckalloc(strlen(display) + 1); data/micropolis-activity-0.0.20071228/src/sim/w_x.c:516: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). t = (char *)ckalloc(strlen(title) + 1); data/micropolis-activity-0.0.20071228/src/tcl/compat/opendir.c:73:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dirp->dd_size = read(dirp->dd_fd, dirp->dd_buf, data/micropolis-activity-0.0.20071228/src/tcl/compat/opendir.c:87:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dir.d_name, dp->od_name, ODIRSIZ); data/micropolis-activity-0.0.20071228/src/tcl/compat/opendir.c:89: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). dir.d_namlen = strlen(dir.d_name); data/micropolis-activity-0.0.20071228/src/tcl/compat/string.h:42: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). extern int strlen _ANSI_ARGS_((char *string)); data/micropolis-activity-0.0.20071228/src/tcl/compat/string.h:45:16: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. extern char * strncat _ANSI_ARGS_((char *dst, char *src, data/micropolis-activity-0.0.20071228/src/tcl/compat/string.h:48:16: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). extern char * strncpy _ANSI_ARGS_((char *dst, char *src, data/micropolis-activity-0.0.20071228/src/tcl/regexp.c:263: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 (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= len) { data/micropolis-activity-0.0.20071228/src/tcl/regexp.c:265: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). len = strlen(OPERAND(scan)); data/micropolis-activity-0.0.20071228/src/tcl/regexp.c:855: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(opnd); data/micropolis-activity-0.0.20071228/src/tcl/regexp.c:1019: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). count = strlen(scan); data/micropolis-activity-0.0.20071228/src/tcl/regexp.c:1130:9: [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. (void) strcpy(buf, ":"); data/micropolis-activity-0.0.20071228/src/tcl/regexp.c:1172: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), "OPEN%d", OP(op)-OPEN); data/micropolis-activity-0.0.20071228/src/tcl/regexp.c:1184: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), "CLOSE%d", OP(op)-CLOSE); data/micropolis-activity-0.0.20071228/src/tcl/tclassem.c:153: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). length = strlen(string); data/micropolis-activity-0.0.20071228/src/tcl/tclassem.c:165: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). length = strlen(string); data/micropolis-activity-0.0.20071228/src/tcl/tclbasic.c:1003:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(string); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:820: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). size = strlen(*curArg); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdah.c:894: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). dstSize += strlen(dst+dstSize); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c:77:52: [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 ((**argv == 't') && (strncmp(*argv, "then", strlen(*argv)) == 0)) { data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c:90:49: [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 ((**argv == 'e') && (strncmp(*argv, "else", strlen(*argv)) == 0)) { data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c:233: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdil.c:874:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((*argv[3] == 'e') && (strncmp(argv[3], "end", strlen(argv[3])) == 0)) { data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:117:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). string = (char *) ckalloc((unsigned) (strlen(argPtr[1]) + 1)); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:256:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). string = (char *) ckalloc((unsigned) (strlen(argPtr[1]) + 1)); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:579: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). arg1Length = (strlen(argv[1]) + 4) & ~03; data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:859: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:886:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(argv[2]); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:911: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 ((index >= 0) && (index < strlen(argv[2]))) { data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:932: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). sprintf(interp->result, "%d", strlen(argv[2])); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:954: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). stringLength = strlen(argv[2]); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:959: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). && (strncmp(argv[4], "end", strlen(argv[4])) == 0)) { data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:1050: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). p = interp->result + strlen(interp->result) - 1; data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:1116: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:1145:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(argv[4]); data/micropolis-activity-0.0.20071228/src/tcl/tclcmdmz.c:1192:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(argv[4]); data/micropolis-activity-0.0.20071228/src/tcl/tclenv.c:237: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). nameLength = strlen(name); data/micropolis-activity-0.0.20071228/src/tcl/tclenv.c:247:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p = (char *) ckalloc((unsigned) (nameLength + strlen(value) + 2)); data/micropolis-activity-0.0.20071228/src/tcl/tclenv.c:430:47: [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). newEnviron[i] = (char *) ckalloc((unsigned) (strlen(environ[i]) + 1)); data/micropolis-activity-0.0.20071228/src/tcl/tclexpr.c:252:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(string); data/micropolis-activity-0.0.20071228/src/tcl/tclget.c:158: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). length = strlen(lowerCase); data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:117: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). p = (char *) ckalloc((unsigned) (strlen(dir) + strlen(separator) data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:117:52: [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 *) ckalloc((unsigned) (strlen(dir) + strlen(separator) data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:234: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). remLength = strlen(rem) + 1; data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:241:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(newRem, rem, l1); data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:249:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(newRem+l1, element, l2); data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:296: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). l1 = strlen(dir); data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:303:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pattern, rem, l2); data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:321:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int nameLength = strlen(entryPtr->d_name); data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:362: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). l1 = strlen(dir); data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:429:9: [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(dir,"/"); data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:478: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). length = strlen(dir) + strlen(p); data/micropolis-activity-0.0.20071228/src/tcl/tclglob.c:478: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). length = strlen(dir) + strlen(p); data/micropolis-activity-0.0.20071228/src/tcl/tclhash.c:348: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). p = result + strlen(result); data/micropolis-activity-0.0.20071228/src/tcl/tclhash.c:352: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). p += strlen(p); data/micropolis-activity-0.0.20071228/src/tcl/tclhash.c:356: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/micropolis-activity-0.0.20071228/src/tcl/tclhash.c:518: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). (sizeof(Tcl_HashEntry) + strlen(key) - (sizeof(hPtr->key) -1))); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:207: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). length = strlen(cmd); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:212:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(eventPtr->command, cmd, length); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:273: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:282:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(argv[3], "exec", strlen(argv[3])) != 0) { data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:313: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). MakeSpace(eventPtr, strlen(argv[2]) + 1); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:642: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). revPtr->newSize = strlen(string); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:711: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). revPtr->newSize = strlen(revPtr->newBytes); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:754: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). size = strlen(eventPtr->command) + 1; data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:768:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(p, eventPtr->command + bytesSeen, count); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:771:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(p, revPtr->newBytes, revPtr->newSize); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:778: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). if (&p[strlen(&eventPtr->command[bytesSeen]) + 1] > data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:857: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). length = strlen(string); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:913: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). oldLength = strlen(old); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:914: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). newLength = strlen(new); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:930: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). length = strlen(cmd) + count*(newLength - oldLength); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:944:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dst, cmd, src-cmd); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:1040:43: [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). result = (char *) ckalloc((unsigned) (strlen(command) + 1)); data/micropolis-activity-0.0.20071228/src/tcl/tclhist.c:1072:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dst, start, (end-start)); data/micropolis-activity-0.0.20071228/src/tcl/tclparse.c:319: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). length = strlen(value); data/micropolis-activity-0.0.20071228/src/tcl/tclparse.c:415: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). length = strlen(iPtr->result); data/micropolis-activity-0.0.20071228/src/tcl/tclparse.c:656: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). length = strlen(value); data/micropolis-activity-0.0.20071228/src/tcl/tclproc.c:72:52: [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). procPtr->command = (char *) ckalloc((unsigned) strlen(argv[3]) + 1); data/micropolis-activity-0.0.20071228/src/tcl/tclproc.c:114: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). nameLength = strlen(fieldValues[0]) + 1; data/micropolis-activity-0.0.20071228/src/tcl/tclproc.c:116: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). valueLength = strlen(fieldValues[1]) + 1; data/micropolis-activity-0.0.20071228/src/tcl/tclunix.h:318:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). extern int read _ANSI_ARGS_((int fd, char *buf, int numBytes)); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:285:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). count = read(outputId, buffer, BUFFER_SIZE); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:392: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:927:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(f); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1194: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). currentDir = (char *) ckalloc((unsigned) (strlen(buffer) + 1)); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1230:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(argv[3], "nonewline", strlen(argv[3])) != 0) { data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1324:40: [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 (strncmp(argv[2], "nonewline", strlen(argv[2])) == 0) { data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1410:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(argv[3]); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1681:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). count = read(errorId, buffer, BUFFER_SIZE); data/micropolis-activity-0.0.20071228/src/tcl/tclunxaz.c:1703: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). length = strlen(interp->result); data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:119:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fileId, cmdBuffer, (int) statBuf.st_size) < 0) { data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:121:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fileId, cmdBuffer, (int) statBuf.st_size) != statBuf.st_size) { data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:589: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). length = strlen(input); data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:740: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). write(errorId < 0 ? 2 : errorId, err, strlen(err)); data/micropolis-activity-0.0.20071228/src/tcl/tclunxut.c:750: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). write(2, errSpace, strlen(errSpace)); data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:398:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(p, element, elSize); data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:744: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). totalSize += strlen(argv[i]) + 1; data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:765: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). for (length = strlen(element); data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:773:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy(p, element, length); data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:957:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(string); data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:1021: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). newSpace += strlen(string); data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:1047: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). iPtr->appendUsed += strlen(string); data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:1156: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). iPtr->appendUsed = strlen(iPtr->result); data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:1298: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). } else if (strncmp(string, "end", strlen(string)) == 0) { data/micropolis-activity-0.0.20071228/src/tcl/tclutil.c:1342: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). length = strlen(string); data/micropolis-activity-0.0.20071228/src/tcl/tclvar.c:410:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(newValue); data/micropolis-activity-0.0.20071228/src/tcl/tclvar.c:1477: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:85: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 (strchr(format, '%') == NULL && strlen(format) + 1 >= maxsize) data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:105:5: [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(tbuf, "?"); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:112:5: [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(tbuf, "?"); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:120:5: [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(tbuf, "?"); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:127:5: [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(tbuf, "?"); data/micropolis-activity-0.0.20071228/src/tclx/ossupp/strftime.c:266: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). i = strlen(tbuf); data/micropolis-activity-0.0.20071228/src/tclx/src/tclplus.cc:51: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). len += strlen (parmPtr); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxbsrc.c:124:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *oldResult = ckalloc (strlen (searchCBPtr->interp->result + 1)); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxbsrc.c:177:28: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (((recChar = getc (searchCBPtr->fileCBPtr)) != EOF) && data/micropolis-activity-0.0.20071228/src/tclx/src/tclxclp.c:320:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). oldHookPtr = ckalloc (strlen (hookValue) + 1); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxdebg.c:96: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 (numChars < strlen (string)) data/micropolis-activity-0.0.20071228/src/tclx/src/tclxdebg.c:119: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). argLen = strlen (argStr); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxdebg.c:166: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). cmdLen = printLen = strlen (command); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfcmd.c:515:18: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inChar = getc (filePtr->f); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfctl.c:99:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (attrName) >= MAX_ATTR_NAME_LEN) data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfsca.c:287:46: [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). contextPtr->defaultAction = ckalloc (strlen (argv [2]) + 1); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfsca.c:311:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newmatch->command = ckalloc (strlen (argv[firstArg + 2]) + 1); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxfsca.c:446: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). fileOffset += strlen(dynBuf.ptr) + 1; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxhndl.c:238: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). int baseLength = strlen ((char *) handleBase); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxklst.c:103: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). fieldNameSize = strlen ((char *) fieldName); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxklst.c:292:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (nextByte, keyPtr, keySize); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxklst.c:401:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (fieldValue, valuePtr, valueSize); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:196:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read (fileNum, cmdBuffer, length) != length) data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:271: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). pathLen = strlen (fileName); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:291: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). pathLen = strlen (curDir) + strlen (fileName) + 1; /* For `/' */ data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:291: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). pathLen = strlen (curDir) + strlen (fileName) + 1; /* For `/' */ data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:297: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 (pathName, "/"); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:475: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). nameLen = strlen (packageName) + 5; /* includes "PKG:" and '\0' */ data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:537: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). nameLen = strlen (packageName) + 5; /* includes "PKG:" and '\0' */ data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:564:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (pkgDataArgv [0]) >= sizeof (fileId_t)) data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:623: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). nameLen = strlen (procName) + 6; /* includes "PROC:" and '\0' */ data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:676: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). nameLen = strlen (procName) + 6; /* includes "PROC:" and '\0' */ data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:898: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). cmdPtr = ckalloc (strlen (initCmd) + strlen (tlibFilePath) + 1); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:898: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). cmdPtr = ckalloc (strlen (initCmd) + strlen (tlibFilePath) + 1); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:977: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). msg = ckalloc (strlen (tlibFilePath) + 60); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:980: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 (msg, "\""); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1042: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). filePathLen = strlen (lineArgv [1]) + dirLen + 1; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1047:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (filePath, indexFilePath, dirLen + 1); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1092: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). msg = ckalloc (strlen (indexFilePath) + 45); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1095: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 (msg, "\""); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1129: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). dirLen = strlen (dirName); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1139: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). nameLen = strlen (entryPtr->d_name); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1301: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). cmdLen = strlen (location) + 5; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1388: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). pathLen = strlen (pathName); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1497: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). msg = ckalloc (strlen (argv [1]) + 35); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxlib.c:1500: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 (msg, "\""); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxprof.c:161:46: [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). strlen (procName)); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxrexp.c:196:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)cp+sizeof(struct compiled_search_struct), pat, patlen); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxrexp.c:368: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). expBuf = ckalloc (strlen (expression) + 1); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxrexp.c:379:63: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). regExpPtr->boyerMoorePtr = BoyerMooreCompile (expBuf, strlen (expBuf)); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxrexp.c:453: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). matchStr = ckalloc (strlen (matchStrIn) + 1); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxrexp.c:469:49: [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). startPtr = BoyerMooreExecute (matchStr, strlen (matchStr), data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsig.c:208:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (sigName) > SIG_NAME_MAX) data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsig.c:536: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). savedResult = ckalloc (strlen (interp->result) + 1); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxsig.c:811: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). commandLen = strlen (command); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstr.c:59:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (index >= strlen (argv [1])) data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstr.c:94:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sprintf (interp->result, "%d", strlen (argv[1])); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstr.c:135: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). fullLen = strlen (argv [1]); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstr.c:203: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). newLen = strlen (srcPtr) * repCount; data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstr.c:377: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). if (strlen (argv [2]) != 1) { data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstup.c:126: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). programNameLen = strlen (programName); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstup.c:350:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). defaultFilePath = ckalloc (strlen (TCL_DEFAULT) + data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstup.c:351:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen (TCL_VERSION) + data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstup.c:352:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen (TCL_EXTD_VERSION_SUFFIX) + 1); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstup.c:381: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). tclxVersion = ckalloc (strlen (TCL_VERSION) + data/micropolis-activity-0.0.20071228/src/tclx/src/tclxstup.c:382: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). strlen (TCL_EXTD_VERSION_SUFFIX) + 1); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxunix.c:249:16: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mask = umask (0); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxunix.c:250:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask ((unsigned short) mask); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxunix.c:259:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask ((unsigned short) mask); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxunix.c:307: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). srcpath = ckalloc (strlen (tmppath) + 1); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxutil.c:208: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). targetStr = ckalloc (strlen ((char *) sourceStr) + 1); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxutil.c:245: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). targetStr = ckalloc (strlen ((char *) sourceStr) + 1); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxutil.c:364: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). newLen = strlen (newStr); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxutil.c:403:19: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). readVal = getc (filePtr); data/micropolis-activity-0.0.20071228/src/tclx/src/tclxutil.c:706: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). precision = strlen (interp->result); data/micropolis-activity-0.0.20071228/src/tk/library/demos/tkSquare.c:345: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tk3d.c:490: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). length = strlen(name); data/micropolis-activity-0.0.20071228/src/tk/tkargv.c:112:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(curArg); data/micropolis-activity-0.0.20071228/src/tk/tkargv.c:370: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). length = strlen(infoPtr->key); data/micropolis-activity-0.0.20071228/src/tk/tkargv.c:386: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). numSpaces = width + 1 - strlen(infoPtr->key); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:568:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(psPtr->command) + strlen(command) + 3; data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:568:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(psPtr->command) + strlen(command) + 3; data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:578:48: [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). psPtr->command = (char *) ckalloc((unsigned) (strlen(command) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:813: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). p += strlen(p); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:818: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). p += strlen(p); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:826: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). p += strlen(p); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:839: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). p += strlen(p); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:857: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). p += strlen(p); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:863: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). p += strlen(p); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:2192: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). error = (char *) ckalloc((unsigned) (strlen(interp->result) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tkbind.c:2198:43: [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). errorInfo = (char *) ckalloc((unsigned) (strlen(tmp) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:487: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:880: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). (strlen(Tk_Name(butPtr->tkwin)) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:885: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). (strlen(Tk_Name(butPtr->tkwin)) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:929: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). butPtr->text = ckalloc((unsigned) (strlen(value) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:1309: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). butPtr->textLength = strlen(butPtr->text); data/micropolis-activity-0.0.20071228/src/tk/tkbutton.c:1525:40: [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). butPtr->text = ckalloc((unsigned) (strlen(value) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:385: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:622:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(argv[2]); data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:1104: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). && (strncmp(argv[2], "mark", strlen(argv[2])) == 0)) { data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:1110:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && (strncmp(argv[2], "dragto", strlen(argv[2])) == 0)) { data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:1175:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(argv[2]); data/micropolis-activity-0.0.20071228/src/tk/tkcanvas.c:2401: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). length = strlen(argv[0]); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:99:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). afterPtr->command = (char *) ckalloc((unsigned) (strlen(argv[2]) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:353:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(argv[1], "idletasks", strlen(argv[1])) != 0) { data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:425: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkcmds.c:541: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c:244: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). length = strlen(argvName); data/micropolis-activity-0.0.20071228/src/tk/tkconfig.c:367: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). new = (char *) ckalloc((unsigned) (strlen(value) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tkconfig.h:121:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). extern int read _ANSI_ARGS_((int fd, void *buf, unsigned int numBytes)); data/micropolis-activity-0.0.20071228/src/tk/tkcvtext.c:337: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). textPtr->numChars = strlen(textPtr->text); data/micropolis-activity-0.0.20071228/src/tk/tkcvtext.c:824: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). length = strlen(string); data/micropolis-activity-0.0.20071228/src/tk/tkcvtext.c:836:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(new, textPtr->text, beforeThis); data/micropolis-activity-0.0.20071228/src/tk/tkcvtext.c:908:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(new, textPtr->text, first); data/micropolis-activity-0.0.20071228/src/tk/tkcvtext.c:1200: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). length = strlen(string); data/micropolis-activity-0.0.20071228/src/tk/tkcvtext.c:1366:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer, textPtr->text + canvasPtr->selectFirst + offset, count); data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:391: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:488: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). && (strncmp(argv[2], "mark", strlen(argv[2])) == 0)) { data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:492:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && (strncmp(argv[2], "dragto", strlen(argv[2])) == 0)) { data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:508:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(argv[2]); data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:1033: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). length = strlen(string); data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:1038:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(new, entryPtr->string, index); data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:1108:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(new, entryPtr->string, index); data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:1195: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). entryPtr->numChars = strlen(value); data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:1279: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). length = strlen(string); data/micropolis-activity-0.0.20071228/src/tk/tkentry.c:1506:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer, entryPtr->string + entryPtr->selectFirst + offset, count); data/micropolis-activity-0.0.20071228/src/tk/tkevent.c:1703: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). switchLength = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkframe.c:164:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && (strncmp(argv[src], "-class", strlen(argv[src])) == 0)) { data/micropolis-activity-0.0.20071228/src/tk/tkframe.c:167: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). && (strncmp(argv[src], "-screen", strlen(argv[src])) == 0)) { data/micropolis-activity-0.0.20071228/src/tk/tkframe.c:263: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkget.c:101:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(string, "center", strlen(string)) == 0) { data/micropolis-activity-0.0.20071228/src/tk/tkget.c:181: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). length = strlen(string); data/micropolis-activity-0.0.20071228/src/tk/tkget.c:262: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). length = strlen(string); data/micropolis-activity-0.0.20071228/src/tk/tkget.c:343: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). length = strlen(string); data/micropolis-activity-0.0.20071228/src/tk/tkgrab.c:116:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkgrab.c:131:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). || (strncmp(window, "none", strlen(window)) == 0)) { data/micropolis-activity-0.0.20071228/src/tk/tklist.c:382: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tklist.c:499: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). && (strncmp(argv[2], "mark", strlen(argv[2])) == 0)) { data/micropolis-activity-0.0.20071228/src/tk/tklist.c:505:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && (strncmp(argv[2], "dragto", strlen(argv[2])) == 0)) { data/micropolis-activity-0.0.20071228/src/tk/tklist.c:521:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(argv[2]); data/micropolis-activity-0.0.20071228/src/tk/tklist.c:933:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(*argv); data/micropolis-activity-0.0.20071228/src/tk/tklist.c:1157:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(string, "end", strlen(string)) != 0) { data/micropolis-activity-0.0.20071228/src/tk/tklist.c:1563: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). length = strlen(selection); data/micropolis-activity-0.0.20071228/src/tk/tkmenu.c:499: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkmenu.c:537:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(argv[2]); data/micropolis-activity-0.0.20071228/src/tk/tkmenu.c:1197: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). mePtr->labelLength = strlen(mePtr->label); data/micropolis-activity-0.0.20071228/src/tk/tkmenu.c:1202: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). mePtr->accelLength = strlen(mePtr->accel); data/micropolis-activity-0.0.20071228/src/tk/tkmenu.c:1280:40: [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). mePtr->name = ckalloc((unsigned) (strlen(mePtr->label) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tkmenu.c:1284:43: [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). mePtr->onValue = ckalloc((unsigned) (strlen(mePtr->label) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tkmnbut.c:360: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkmnbut.c:708:40: [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). mbPtr->text = ckalloc((unsigned) (strlen(value) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tkmnbut.c:993: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). mbPtr->textLength = strlen(mbPtr->text); data/micropolis-activity-0.0.20071228/src/tk/tkmnbut.c:1156: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). mbPtr->text = ckalloc((unsigned) (strlen(value) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tkmsg.c:270: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkmsg.c:405:43: [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). msgPtr->string = ckalloc((unsigned) (strlen(value) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tkmsg.c:419: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). msgPtr->numChars = strlen(msgPtr->string); data/micropolis-activity-0.0.20071228/src/tk/tkmsg.c:776: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). msgPtr->numChars = strlen(value); data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:302:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp, field, length); data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:487: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:641: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). length = strlen(string); data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:873:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fileId, buffer, (int) statBuf.st_size) < 0) { data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:875:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fileId, buffer, (int) statBuf.st_size) != statBuf.st_size) { data/micropolis-activity-0.0.20071228/src/tk/tkoption.c:1330:45: [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). fileName = (char *) ckalloc((unsigned) (strlen(home) + 20)); data/micropolis-activity-0.0.20071228/src/tk/tkpack.c:150: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkpack.c:797: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). length = strlen(curOpt); data/micropolis-activity-0.0.20071228/src/tk/tkplace.c:188: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkplace.c:487:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(argv[0]); data/micropolis-activity-0.0.20071228/src/tk/tkplace.c:497: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:185: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). strlen(argv[2])?argv[2]:"anywhere.","\": ", data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:402:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sockaddr.sun_path,path,sizeof(sockaddr.sun_path)-1); data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:457: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). if (server && !strlen(host)) data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:587: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). if (mask == 0 || (strlen(argv[2]) != strspn(argv[2], "rwe"))) { data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:598: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). cmdPtr->tclCmd = ckalloc(strlen(argv[3]) + 1); data/micropolis-activity-0.0.20071228/src/tk/tkrawtcp.c:600: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). cmdPtr->fileId = ckalloc(strlen(argv[1]) + 1); data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:353: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:505: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). length = strlen(scalePtr->orientUid); data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:543: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). scalePtr->commandLength = strlen(scalePtr->command); data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:549: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). scalePtr->labelLength = strlen(scalePtr->label); data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:648:50: [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). XTextExtents(scalePtr->fontPtr, valueString, strlen(valueString), data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:652:50: [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). XTextExtents(scalePtr->fontPtr, valueString, strlen(valueString), data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:886: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). length = strlen(valueString); data/micropolis-activity-0.0.20071228/src/tk/tkscale.c:1106: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). length = strlen(valueString); data/micropolis-activity-0.0.20071228/src/tk/tkscrbar.c:337: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkscrbar.c:505: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). length = strlen(scrollPtr->orientUid); data/micropolis-activity-0.0.20071228/src/tk/tkscrbar.c:517: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). scrollPtr->commandSize = strlen(scrollPtr->command); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:580: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). length = strlen(argv[0]); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:596: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). length = strlen(argv[0]); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:655: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). cmdLength = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:942: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). newLength = strlen(portion) + getInfoPtr->bytesUsed; data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1052:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(atomName, field, length); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1112: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). fieldSize = strlen(atomName) + 1; data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1137: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). curSize += strlen(result+curSize); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1703:4: [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). (strlen(cmdInfoPtr->interp->result) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1709:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(cmdInfoPtr->interp->result); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1861: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). return strlen(buffer); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1873:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(buffer); data/micropolis-activity-0.0.20071228/src/tk/tkselect.c:1877: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). atomLength = strlen(atomString) + 1; data/micropolis-activity-0.0.20071228/src/tk/tksend.c:245:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (unsigned char *) propInfo, strlen(propInfo)+1); data/micropolis-activity-0.0.20071228/src/tk/tksend.c:253:48: [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). riPtr->name = (char *) ckalloc((unsigned) (strlen(name) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tksend.c:322: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). (strncmp(argv[1], "-quick", strlen(argv[1])) == 0)) { data/micropolis-activity-0.0.20071228/src/tk/tksend.c:332: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). (strncmp(argv[1], "-server", strlen(argv[1])) == 0)) { data/micropolis-activity-0.0.20071228/src/tk/tksend.c:428: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). length = strlen(argv[1]) + strlen(cmd) + 30; data/micropolis-activity-0.0.20071228/src/tk/tksend.c:428: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). length = strlen(argv[1]) + strlen(cmd) + 30; data/micropolis-activity-0.0.20071228/src/tk/tksend.c:901: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). resultSize = strlen(resultString) + 30; data/micropolis-activity-0.0.20071228/src/tk/tksend.c:959: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). pcPtr->result = ckalloc((unsigned) (strlen(p) + 1)); data/micropolis-activity-0.0.20071228/src/tk/tksend.c:1014:47: [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). PropModeAppend, (unsigned char *) value, strlen(value)+1); data/micropolis-activity-0.0.20071228/src/tk/tksend.c:1043: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). pcPtr->result = ckalloc((unsigned) (strlen(pcPtr->target) + 50)); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:108:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). extern int read _ANSI_ARGS_((int, char *, int)); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:401: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). error = (char *) ckalloc (strlen (interp -> result) + 1); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:410:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). errorInfo = (char *) ckalloc (strlen (tmp) + 1); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:588: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). length = strlen (argv [1]); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:843:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). hostName = (char *) ckalloc (strlen (interp -> result) + 1); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1220: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). length = strlen (argv [1]); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1327: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). client -> command = malloc (strlen (server -> command) + 1); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1433: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). length = strlen (++arg); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1714: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). length = strlen (++arg); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1737: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). server -> command = (char *) malloc (strlen (argv [a]) + 1); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1840: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). length = strlen (argv [1]); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:1930: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). client -> command = malloc (strlen (argv [1]) + 1); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2201: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). length = strlen (arg); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2352:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). clientName = (char *) ckalloc (strlen (server -> interp -> result) + 1); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2501: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). length = strlen (result); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2504:3: [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 (client -> resultString + length, "\n"); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2540: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). length = strlen (client -> resultPointer); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2640:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). unixStatus = read (client -> socketfd, buffer, BUFSIZ); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2792: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). length = strlen (message); data/micropolis-activity-0.0.20071228/src/tk/tktcp.c:2881:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). unixStatus = read (s, buf, BUFSIZ); data/micropolis-activity-0.0.20071228/src/tk/tktext.c:311: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tktext.c:314:12: [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. int less, equal, greater, value; data/micropolis-activity-0.0.20071228/src/tk/tktext.c:347:19: [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. value = less || equal; data/micropolis-activity-0.0.20071228/src/tk/tktext.c:359:22: [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. value = greater || equal; data/micropolis-activity-0.0.20071228/src/tk/tktext.c:364: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. value = equal; data/micropolis-activity-0.0.20071228/src/tk/tktext.c:366:15: [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. value = !equal; data/micropolis-activity-0.0.20071228/src/tk/tktext.c:519: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). switchLength = strlen(argv[2]); data/micropolis-activity-0.0.20071228/src/tk/tktext.c:1214: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). length = strlen(argv[2]); data/micropolis-activity-0.0.20071228/src/tk/tktext.c:1482: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). length = strlen(argv[2]); data/micropolis-activity-0.0.20071228/src/tk/tktxtag.c:113: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). length = strlen(argv[2]); data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:316: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). length = strlen(screenName); data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:352:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dispPtr->name, screenName, length); data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:502: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). length1 = strlen(parentPtr->pathName); data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:503: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). length2 = strlen(name); data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:711: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). len = strlen(dsp); data/micropolis-activity-0.0.20071228/src/tk/tkwindow.c:791:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(p, pathName, numChars); data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:539: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). length = strlen(argv[1]); data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:602:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(argv[3]); data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:621:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(argv[3]); data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:1028: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). length = strlen(argv[3]); data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:1070: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). length = strlen(argv[3]); data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:2244: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). int x = strlen(Cmd) - strlen(argv[2]) - 1; data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:2244: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). int x = strlen(Cmd) - strlen(argv[2]) - 1; data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:2266: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). int x = strlen(argv[4]) + strlen(argv[2]) + 2; data/micropolis-activity-0.0.20071228/src/tk/tkwm.c:2266: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). int x = strlen(argv[4]) + strlen(argv[2]) + 2; ANALYSIS SUMMARY: Hits = 1577 Lines analyzed = 137563 in approximately 3.53 seconds (38952 lines/second) Physical Source Lines of Code (SLOC) = 84896 Hits@level = [0] 174 [1] 408 [2] 885 [3] 21 [4] 258 [5] 5 Hits@level+ = [0+] 1751 [1+] 1577 [2+] 1169 [3+] 284 [4+] 263 [5+] 5 Hits/KSLOC@level+ = [0+] 20.6252 [1+] 18.5757 [2+] 13.7698 [3+] 3.34527 [4+] 3.09791 [5+] 0.0588956 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.