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/naev-0.7.0/extras/macosx/SDLMain.h
Examining data/naev-0.7.0/lib/csparse/cs.h
Examining data/naev-0.7.0/lib/csparse/cs_add.c
Examining data/naev-0.7.0/lib/csparse/cs_amd.c
Examining data/naev-0.7.0/lib/csparse/cs_chol.c
Examining data/naev-0.7.0/lib/csparse/cs_cholsol.c
Examining data/naev-0.7.0/lib/csparse/cs_compress.c
Examining data/naev-0.7.0/lib/csparse/cs_counts.c
Examining data/naev-0.7.0/lib/csparse/cs_cumsum.c
Examining data/naev-0.7.0/lib/csparse/cs_dfs.c
Examining data/naev-0.7.0/lib/csparse/cs_dmperm.c
Examining data/naev-0.7.0/lib/csparse/cs_droptol.c
Examining data/naev-0.7.0/lib/csparse/cs_dropzeros.c
Examining data/naev-0.7.0/lib/csparse/cs_dupl.c
Examining data/naev-0.7.0/lib/csparse/cs_entry.c
Examining data/naev-0.7.0/lib/csparse/cs_ereach.c
Examining data/naev-0.7.0/lib/csparse/cs_etree.c
Examining data/naev-0.7.0/lib/csparse/cs_fkeep.c
Examining data/naev-0.7.0/lib/csparse/cs_gaxpy.c
Examining data/naev-0.7.0/lib/csparse/cs_happly.c
Examining data/naev-0.7.0/lib/csparse/cs_house.c
Examining data/naev-0.7.0/lib/csparse/cs_ipvec.c
Examining data/naev-0.7.0/lib/csparse/cs_leaf.c
Examining data/naev-0.7.0/lib/csparse/cs_load.c
Examining data/naev-0.7.0/lib/csparse/cs_lsolve.c
Examining data/naev-0.7.0/lib/csparse/cs_ltsolve.c
Examining data/naev-0.7.0/lib/csparse/cs_lu.c
Examining data/naev-0.7.0/lib/csparse/cs_lusol.c
Examining data/naev-0.7.0/lib/csparse/cs_malloc.c
Examining data/naev-0.7.0/lib/csparse/cs_maxtrans.c
Examining data/naev-0.7.0/lib/csparse/cs_multiply.c
Examining data/naev-0.7.0/lib/csparse/cs_norm.c
Examining data/naev-0.7.0/lib/csparse/cs_permute.c
Examining data/naev-0.7.0/lib/csparse/cs_pinv.c
Examining data/naev-0.7.0/lib/csparse/cs_post.c
Examining data/naev-0.7.0/lib/csparse/cs_print.c
Examining data/naev-0.7.0/lib/csparse/cs_pvec.c
Examining data/naev-0.7.0/lib/csparse/cs_qr.c
Examining data/naev-0.7.0/lib/csparse/cs_qrsol.c
Examining data/naev-0.7.0/lib/csparse/cs_randperm.c
Examining data/naev-0.7.0/lib/csparse/cs_reach.c
Examining data/naev-0.7.0/lib/csparse/cs_scatter.c
Examining data/naev-0.7.0/lib/csparse/cs_scc.c
Examining data/naev-0.7.0/lib/csparse/cs_schol.c
Examining data/naev-0.7.0/lib/csparse/cs_spsolve.c
Examining data/naev-0.7.0/lib/csparse/cs_sqr.c
Examining data/naev-0.7.0/lib/csparse/cs_symperm.c
Examining data/naev-0.7.0/lib/csparse/cs_tdfs.c
Examining data/naev-0.7.0/lib/csparse/cs_transpose.c
Examining data/naev-0.7.0/lib/csparse/cs_updown.c
Examining data/naev-0.7.0/lib/csparse/cs_usolve.c
Examining data/naev-0.7.0/lib/csparse/cs_util.c
Examining data/naev-0.7.0/lib/csparse/cs_utsolve.c
Examining data/naev-0.7.0/lib/lua/lapi.c
Examining data/naev-0.7.0/lib/lua/lapi.h
Examining data/naev-0.7.0/lib/lua/lauxlib.c
Examining data/naev-0.7.0/lib/lua/lauxlib.h
Examining data/naev-0.7.0/lib/lua/lbaselib.c
Examining data/naev-0.7.0/lib/lua/lcode.c
Examining data/naev-0.7.0/lib/lua/lcode.h
Examining data/naev-0.7.0/lib/lua/ldblib.c
Examining data/naev-0.7.0/lib/lua/ldebug.c
Examining data/naev-0.7.0/lib/lua/ldebug.h
Examining data/naev-0.7.0/lib/lua/ldo.c
Examining data/naev-0.7.0/lib/lua/ldo.h
Examining data/naev-0.7.0/lib/lua/ldump.c
Examining data/naev-0.7.0/lib/lua/lfunc.c
Examining data/naev-0.7.0/lib/lua/lfunc.h
Examining data/naev-0.7.0/lib/lua/lgc.c
Examining data/naev-0.7.0/lib/lua/lgc.h
Examining data/naev-0.7.0/lib/lua/linit.c
Examining data/naev-0.7.0/lib/lua/liolib.c
Examining data/naev-0.7.0/lib/lua/llex.c
Examining data/naev-0.7.0/lib/lua/llex.h
Examining data/naev-0.7.0/lib/lua/llimits.h
Examining data/naev-0.7.0/lib/lua/lmathlib.c
Examining data/naev-0.7.0/lib/lua/lmem.c
Examining data/naev-0.7.0/lib/lua/lmem.h
Examining data/naev-0.7.0/lib/lua/loadlib.c
Examining data/naev-0.7.0/lib/lua/lobject.c
Examining data/naev-0.7.0/lib/lua/lobject.h
Examining data/naev-0.7.0/lib/lua/lopcodes.c
Examining data/naev-0.7.0/lib/lua/lopcodes.h
Examining data/naev-0.7.0/lib/lua/loslib.c
Examining data/naev-0.7.0/lib/lua/lparser.c
Examining data/naev-0.7.0/lib/lua/lparser.h
Examining data/naev-0.7.0/lib/lua/lstate.c
Examining data/naev-0.7.0/lib/lua/lstate.h
Examining data/naev-0.7.0/lib/lua/lstring.c
Examining data/naev-0.7.0/lib/lua/lstring.h
Examining data/naev-0.7.0/lib/lua/lstrlib.c
Examining data/naev-0.7.0/lib/lua/ltable.c
Examining data/naev-0.7.0/lib/lua/ltable.h
Examining data/naev-0.7.0/lib/lua/ltablib.c
Examining data/naev-0.7.0/lib/lua/ltm.c
Examining data/naev-0.7.0/lib/lua/ltm.h
Examining data/naev-0.7.0/lib/lua/lua.c
Examining data/naev-0.7.0/lib/lua/lua.h
Examining data/naev-0.7.0/lib/lua/luac.c
Examining data/naev-0.7.0/lib/lua/luaconf.h
Examining data/naev-0.7.0/lib/lua/lualib.h
Examining data/naev-0.7.0/lib/lua/lundump.c
Examining data/naev-0.7.0/lib/lua/lundump.h
Examining data/naev-0.7.0/lib/lua/lvm.c
Examining data/naev-0.7.0/lib/lua/lvm.h
Examining data/naev-0.7.0/lib/lua/lzio.c
Examining data/naev-0.7.0/lib/lua/lzio.h
Examining data/naev-0.7.0/lib/lua/print.c
Examining data/naev-0.7.0/src/ai.c
Examining data/naev-0.7.0/src/ai.h
Examining data/naev-0.7.0/src/array.c
Examining data/naev-0.7.0/src/array.h
Examining data/naev-0.7.0/src/background.c
Examining data/naev-0.7.0/src/background.h
Examining data/naev-0.7.0/src/board.c
Examining data/naev-0.7.0/src/board.h
Examining data/naev-0.7.0/src/camera.c
Examining data/naev-0.7.0/src/camera.h
Examining data/naev-0.7.0/src/claim.c
Examining data/naev-0.7.0/src/claim.h
Examining data/naev-0.7.0/src/collision.c
Examining data/naev-0.7.0/src/collision.h
Examining data/naev-0.7.0/src/colour.c
Examining data/naev-0.7.0/src/colour.h
Examining data/naev-0.7.0/src/comm.c
Examining data/naev-0.7.0/src/comm.h
Examining data/naev-0.7.0/src/cond.c
Examining data/naev-0.7.0/src/cond.h
Examining data/naev-0.7.0/src/conf.c
Examining data/naev-0.7.0/src/conf.h
Examining data/naev-0.7.0/src/console.c
Examining data/naev-0.7.0/src/console.h
Examining data/naev-0.7.0/src/damagetype.c
Examining data/naev-0.7.0/src/damagetype.h
Examining data/naev-0.7.0/src/debris.c
Examining data/naev-0.7.0/src/debris.h
Examining data/naev-0.7.0/src/dev.c
Examining data/naev-0.7.0/src/dev.h
Examining data/naev-0.7.0/src/dev_outfit.c
Examining data/naev-0.7.0/src/dev_outfit.h
Examining data/naev-0.7.0/src/dev_planet.c
Examining data/naev-0.7.0/src/dev_planet.h
Examining data/naev-0.7.0/src/dev_ship.c
Examining data/naev-0.7.0/src/dev_ship.h
Examining data/naev-0.7.0/src/dev_sysedit.c
Examining data/naev-0.7.0/src/dev_sysedit.h
Examining data/naev-0.7.0/src/dev_system.c
Examining data/naev-0.7.0/src/dev_system.h
Examining data/naev-0.7.0/src/dev_uniedit.c
Examining data/naev-0.7.0/src/dev_uniedit.h
Examining data/naev-0.7.0/src/dialogue.c
Examining data/naev-0.7.0/src/dialogue.h
Examining data/naev-0.7.0/src/economy.c
Examining data/naev-0.7.0/src/economy.h
Examining data/naev-0.7.0/src/equipment.c
Examining data/naev-0.7.0/src/equipment.h
Examining data/naev-0.7.0/src/escort.c
Examining data/naev-0.7.0/src/escort.h
Examining data/naev-0.7.0/src/event.c
Examining data/naev-0.7.0/src/event.h
Examining data/naev-0.7.0/src/explosion.c
Examining data/naev-0.7.0/src/explosion.h
Examining data/naev-0.7.0/src/faction.c
Examining data/naev-0.7.0/src/faction.h
Examining data/naev-0.7.0/src/fleet.c
Examining data/naev-0.7.0/src/fleet.h
Examining data/naev-0.7.0/src/font.c
Examining data/naev-0.7.0/src/font.h
Examining data/naev-0.7.0/src/gui.c
Examining data/naev-0.7.0/src/gui.h
Examining data/naev-0.7.0/src/gui_omsg.c
Examining data/naev-0.7.0/src/gui_omsg.h
Examining data/naev-0.7.0/src/gui_osd.c
Examining data/naev-0.7.0/src/gui_osd.h
Examining data/naev-0.7.0/src/hook.c
Examining data/naev-0.7.0/src/hook.h
Examining data/naev-0.7.0/src/info.c
Examining data/naev-0.7.0/src/info.h
Examining data/naev-0.7.0/src/input.c
Examining data/naev-0.7.0/src/input.h
Examining data/naev-0.7.0/src/intro.c
Examining data/naev-0.7.0/src/intro.h
Examining data/naev-0.7.0/src/joystick.c
Examining data/naev-0.7.0/src/joystick.h
Examining data/naev-0.7.0/src/land.c
Examining data/naev-0.7.0/src/land.h
Examining data/naev-0.7.0/src/land_outfits.c
Examining data/naev-0.7.0/src/land_outfits.h
Examining data/naev-0.7.0/src/land_shipyard.c
Examining data/naev-0.7.0/src/land_shipyard.h
Examining data/naev-0.7.0/src/land_takeoff.h
Examining data/naev-0.7.0/src/land_trade.c
Examining data/naev-0.7.0/src/land_trade.h
Examining data/naev-0.7.0/src/load.c
Examining data/naev-0.7.0/src/load.h
Examining data/naev-0.7.0/src/log.c
Examining data/naev-0.7.0/src/log.h
Examining data/naev-0.7.0/src/map.c
Examining data/naev-0.7.0/src/map.h
Examining data/naev-0.7.0/src/mapData.h
Examining data/naev-0.7.0/src/map_find.c
Examining data/naev-0.7.0/src/map_find.h
Examining data/naev-0.7.0/src/map_overlay.c
Examining data/naev-0.7.0/src/map_overlay.h
Examining data/naev-0.7.0/src/md5.c
Examining data/naev-0.7.0/src/md5.h
Examining data/naev-0.7.0/src/menu.c
Examining data/naev-0.7.0/src/menu.h
Examining data/naev-0.7.0/src/mission.c
Examining data/naev-0.7.0/src/mission.h
Examining data/naev-0.7.0/src/music.c
Examining data/naev-0.7.0/src/music.h
Examining data/naev-0.7.0/src/music_openal.c
Examining data/naev-0.7.0/src/music_openal.h
Examining data/naev-0.7.0/src/music_sdlmix.c
Examining data/naev-0.7.0/src/music_sdlmix.h
Examining data/naev-0.7.0/src/naev.c
Examining data/naev-0.7.0/src/naev.h
Examining data/naev-0.7.0/src/ncompat.h
Examining data/naev-0.7.0/src/ndata.c
Examining data/naev-0.7.0/src/ndata.h
Examining data/naev-0.7.0/src/nebula.c
Examining data/naev-0.7.0/src/nebula.h
Examining data/naev-0.7.0/src/news.c
Examining data/naev-0.7.0/src/news.h
Examining data/naev-0.7.0/src/nfile.c
Examining data/naev-0.7.0/src/nfile.h
Examining data/naev-0.7.0/src/nlua.c
Examining data/naev-0.7.0/src/nlua.h
Examining data/naev-0.7.0/src/nlua_bkg.c
Examining data/naev-0.7.0/src/nlua_bkg.h
Examining data/naev-0.7.0/src/nlua_camera.c
Examining data/naev-0.7.0/src/nlua_camera.h
Examining data/naev-0.7.0/src/nlua_cli.c
Examining data/naev-0.7.0/src/nlua_cli.h
Examining data/naev-0.7.0/src/nlua_col.c
Examining data/naev-0.7.0/src/nlua_col.h
Examining data/naev-0.7.0/src/nlua_commodity.c
Examining data/naev-0.7.0/src/nlua_commodity.h
Examining data/naev-0.7.0/src/nlua_diff.c
Examining data/naev-0.7.0/src/nlua_diff.h
Examining data/naev-0.7.0/src/nlua_evt.c
Examining data/naev-0.7.0/src/nlua_evt.h
Examining data/naev-0.7.0/src/nlua_faction.c
Examining data/naev-0.7.0/src/nlua_faction.h
Examining data/naev-0.7.0/src/nlua_gfx.c
Examining data/naev-0.7.0/src/nlua_gfx.h
Examining data/naev-0.7.0/src/nlua_gui.c
Examining data/naev-0.7.0/src/nlua_gui.h
Examining data/naev-0.7.0/src/nlua_hook.c
Examining data/naev-0.7.0/src/nlua_hook.h
Examining data/naev-0.7.0/src/nlua_jump.c
Examining data/naev-0.7.0/src/nlua_jump.h
Examining data/naev-0.7.0/src/nlua_misn.c
Examining data/naev-0.7.0/src/nlua_misn.h
Examining data/naev-0.7.0/src/nlua_music.c
Examining data/naev-0.7.0/src/nlua_music.h
Examining data/naev-0.7.0/src/nlua_naev.c
Examining data/naev-0.7.0/src/nlua_naev.h
Examining data/naev-0.7.0/src/nlua_news.c
Examining data/naev-0.7.0/src/nlua_news.h
Examining data/naev-0.7.0/src/nlua_outfit.c
Examining data/naev-0.7.0/src/nlua_outfit.h
Examining data/naev-0.7.0/src/nlua_pilot.c
Examining data/naev-0.7.0/src/nlua_pilot.h
Examining data/naev-0.7.0/src/nlua_planet.c
Examining data/naev-0.7.0/src/nlua_planet.h
Examining data/naev-0.7.0/src/nlua_player.c
Examining data/naev-0.7.0/src/nlua_player.h
Examining data/naev-0.7.0/src/nlua_rnd.c
Examining data/naev-0.7.0/src/nlua_rnd.h
Examining data/naev-0.7.0/src/nlua_ship.c
Examining data/naev-0.7.0/src/nlua_ship.h
Examining data/naev-0.7.0/src/nlua_system.c
Examining data/naev-0.7.0/src/nlua_system.h
Examining data/naev-0.7.0/src/nlua_tex.c
Examining data/naev-0.7.0/src/nlua_tex.h
Examining data/naev-0.7.0/src/nlua_time.c
Examining data/naev-0.7.0/src/nlua_time.h
Examining data/naev-0.7.0/src/nlua_tk.c
Examining data/naev-0.7.0/src/nlua_tk.h
Examining data/naev-0.7.0/src/nlua_tut.c
Examining data/naev-0.7.0/src/nlua_tut.h
Examining data/naev-0.7.0/src/nlua_var.c
Examining data/naev-0.7.0/src/nlua_var.h
Examining data/naev-0.7.0/src/nlua_vec2.c
Examining data/naev-0.7.0/src/nlua_vec2.h
Examining data/naev-0.7.0/src/nluadef.h
Examining data/naev-0.7.0/src/nmath.c
Examining data/naev-0.7.0/src/nmath.h
Examining data/naev-0.7.0/src/nondata.c
Examining data/naev-0.7.0/src/nopenal.h
Examining data/naev-0.7.0/src/npc.c
Examining data/naev-0.7.0/src/npc.h
Examining data/naev-0.7.0/src/npng.c
Examining data/naev-0.7.0/src/npng.h
Examining data/naev-0.7.0/src/nstd.h
Examining data/naev-0.7.0/src/nstring.c
Examining data/naev-0.7.0/src/nstring.h
Examining data/naev-0.7.0/src/ntime.c
Examining data/naev-0.7.0/src/ntime.h
Examining data/naev-0.7.0/src/nxml.c
Examining data/naev-0.7.0/src/nxml.h
Examining data/naev-0.7.0/src/nxml_lua.c
Examining data/naev-0.7.0/src/nxml_lua.h
Examining data/naev-0.7.0/src/nzip.c
Examining data/naev-0.7.0/src/nzip.h
Examining data/naev-0.7.0/src/opengl.c
Examining data/naev-0.7.0/src/opengl.h
Examining data/naev-0.7.0/src/opengl_ext.c
Examining data/naev-0.7.0/src/opengl_ext.h
Examining data/naev-0.7.0/src/opengl_matrix.c
Examining data/naev-0.7.0/src/opengl_matrix.h
Examining data/naev-0.7.0/src/opengl_render.c
Examining data/naev-0.7.0/src/opengl_render.h
Examining data/naev-0.7.0/src/opengl_tex.c
Examining data/naev-0.7.0/src/opengl_tex.h
Examining data/naev-0.7.0/src/opengl_vbo.c
Examining data/naev-0.7.0/src/opengl_vbo.h
Examining data/naev-0.7.0/src/options.c
Examining data/naev-0.7.0/src/options.h
Examining data/naev-0.7.0/src/outfit.c
Examining data/naev-0.7.0/src/outfit.h
Examining data/naev-0.7.0/src/pause.c
Examining data/naev-0.7.0/src/pause.h
Examining data/naev-0.7.0/src/perlin.c
Examining data/naev-0.7.0/src/perlin.h
Examining data/naev-0.7.0/src/physics.c
Examining data/naev-0.7.0/src/physics.h
Examining data/naev-0.7.0/src/pilot.c
Examining data/naev-0.7.0/src/pilot.h
Examining data/naev-0.7.0/src/pilot_cargo.c
Examining data/naev-0.7.0/src/pilot_cargo.h
Examining data/naev-0.7.0/src/pilot_ew.c
Examining data/naev-0.7.0/src/pilot_ew.h
Examining data/naev-0.7.0/src/pilot_heat.c
Examining data/naev-0.7.0/src/pilot_heat.h
Examining data/naev-0.7.0/src/pilot_hook.c
Examining data/naev-0.7.0/src/pilot_hook.h
Examining data/naev-0.7.0/src/pilot_outfit.c
Examining data/naev-0.7.0/src/pilot_outfit.h
Examining data/naev-0.7.0/src/pilot_weapon.c
Examining data/naev-0.7.0/src/pilot_weapon.h
Examining data/naev-0.7.0/src/plasmaf.c
Examining data/naev-0.7.0/src/plasmaf.h
Examining data/naev-0.7.0/src/player.c
Examining data/naev-0.7.0/src/player.h
Examining data/naev-0.7.0/src/player_autonav.c
Examining data/naev-0.7.0/src/player_autonav.h
Examining data/naev-0.7.0/src/player_gui.c
Examining data/naev-0.7.0/src/player_gui.h
Examining data/naev-0.7.0/src/queue.c
Examining data/naev-0.7.0/src/queue.h
Examining data/naev-0.7.0/src/rng.c
Examining data/naev-0.7.0/src/rng.h
Examining data/naev-0.7.0/src/save.c
Examining data/naev-0.7.0/src/save.h
Examining data/naev-0.7.0/src/ship.c
Examining data/naev-0.7.0/src/ship.h
Examining data/naev-0.7.0/src/shipstats.c
Examining data/naev-0.7.0/src/shipstats.h
Examining data/naev-0.7.0/src/slots.c
Examining data/naev-0.7.0/src/slots.h
Examining data/naev-0.7.0/src/sound.c
Examining data/naev-0.7.0/src/sound.h
Examining data/naev-0.7.0/src/sound_openal.c
Examining data/naev-0.7.0/src/sound_openal.h
Examining data/naev-0.7.0/src/sound_priv.h
Examining data/naev-0.7.0/src/sound_sdlmix.c
Examining data/naev-0.7.0/src/sound_sdlmix.h
Examining data/naev-0.7.0/src/space.c
Examining data/naev-0.7.0/src/space.h
Examining data/naev-0.7.0/src/spfx.c
Examining data/naev-0.7.0/src/spfx.h
Examining data/naev-0.7.0/src/start.c
Examining data/naev-0.7.0/src/start.h
Examining data/naev-0.7.0/src/tech.c
Examining data/naev-0.7.0/src/tech.h
Examining data/naev-0.7.0/src/threadpool.c
Examining data/naev-0.7.0/src/threadpool.h
Examining data/naev-0.7.0/src/tk/toolkit_priv.h
Examining data/naev-0.7.0/src/tk/widget.h
Examining data/naev-0.7.0/src/tk/widget/button.c
Examining data/naev-0.7.0/src/tk/widget/button.h
Examining data/naev-0.7.0/src/tk/widget/checkbox.c
Examining data/naev-0.7.0/src/tk/widget/checkbox.h
Examining data/naev-0.7.0/src/tk/widget/cust.c
Examining data/naev-0.7.0/src/tk/widget/cust.h
Examining data/naev-0.7.0/src/tk/widget/fader.c
Examining data/naev-0.7.0/src/tk/widget/fader.h
Examining data/naev-0.7.0/src/tk/widget/image.c
Examining data/naev-0.7.0/src/tk/widget/image.h
Examining data/naev-0.7.0/src/tk/widget/imagearray.c
Examining data/naev-0.7.0/src/tk/widget/imagearray.h
Examining data/naev-0.7.0/src/tk/widget/input.c
Examining data/naev-0.7.0/src/tk/widget/input.h
Examining data/naev-0.7.0/src/tk/widget/list.c
Examining data/naev-0.7.0/src/tk/widget/list.h
Examining data/naev-0.7.0/src/tk/widget/rect.c
Examining data/naev-0.7.0/src/tk/widget/rect.h
Examining data/naev-0.7.0/src/tk/widget/tabwin.c
Examining data/naev-0.7.0/src/tk/widget/tabwin.h
Examining data/naev-0.7.0/src/tk/widget/text.c
Examining data/naev-0.7.0/src/tk/widget/text.h
Examining data/naev-0.7.0/src/toolkit.c
Examining data/naev-0.7.0/src/toolkit.h
Examining data/naev-0.7.0/src/unidiff.c
Examining data/naev-0.7.0/src/unidiff.h
Examining data/naev-0.7.0/src/weapon.c
Examining data/naev-0.7.0/src/weapon.h
Examining data/naev-0.7.0/utils/mkspr/main.c

FINAL RESULTS:

data/naev-0.7.0/src/ndata.c:423:30:  [5] (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. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
      else if (ndata_isndata(strncat(pathname, ".zip", PATH_MAX-1))) {
data/naev-0.7.0/lib/lua/liolib.c:275:7:  [4] (buffer) fscanf:
  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.
  if (fscanf(f, LUA_NUMBER_SCAN, &d) == 1) {
data/naev-0.7.0/lib/lua/liolib.c:420:11:  [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(f, LUA_NUMBER_FMT, lua_tonumber(L, arg)) > 0;
data/naev-0.7.0/lib/lua/lobject.c:198:7:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
      strcat(out, source);
data/naev-0.7.0/lib/lua/lobject.c:210: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(out, source);
data/naev-0.7.0/lib/lua/loslib.c:39:22:  [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.
  lua_pushinteger(L, system(luaL_optstring(L, 1, NULL)));
data/naev-0.7.0/lib/lua/lstrlib.c:750: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(form + l - 1, LUA_INTFRMLEN);
data/naev-0.7.0/lib/lua/lstrlib.c:777:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
          sprintf(buff, form, (int)luaL_checknumber(L, arg));
data/naev-0.7.0/lib/lua/lstrlib.c:782:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
          sprintf(buff, form, (LUA_INTFRM_T)luaL_checknumber(L, arg));
data/naev-0.7.0/lib/lua/lstrlib.c:787:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
          sprintf(buff, form, (unsigned LUA_INTFRM_T)luaL_checknumber(L, arg));
data/naev-0.7.0/lib/lua/lstrlib.c:792:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
          sprintf(buff, form, (double)luaL_checknumber(L, arg));
data/naev-0.7.0/lib/lua/lstrlib.c:810:13:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
            sprintf(buff, form, s);
data/naev-0.7.0/lib/lua/luaconf.h:523:29:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define lua_number2str(s,n)	sprintf((s), LUA_NUMBER_FMT, (n))
data/naev-0.7.0/lib/lua/luaconf.h:670:50:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
#define lua_popen(L,c,m)	((void)L, fflush(NULL), popen(c,m))
data/naev-0.7.0/lib/lua/print.c:60:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(bvalue(o) ? "true" : "false");
data/naev-0.7.0/lib/lua/print.c:63:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(LUA_NUMBER_FMT,nvalue(o));
data/naev-0.7.0/src/console.c:389: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).
               strcpy(new, old);
data/naev-0.7.0/src/console.c:390: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).
               strcat(new, match + strlen(cur));
data/naev-0.7.0/src/dev_sysedit.c:1191:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
   sprintf(title, "Planet Property Editor - %s", p->name);
data/naev-0.7.0/src/dev_sysedit.c:1440:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
   sprintf(title, "Planet Information - %s", p->name);
data/naev-0.7.0/src/dialogue.c:134:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(msg, 512, fmt, ap);
data/naev-0.7.0/src/dialogue.c:222:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(msg, 4096, fmt, ap);
data/naev-0.7.0/src/dialogue.c:245:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(msg, 4096, fmt, ap);
data/naev-0.7.0/src/dialogue.c:351:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(msg, 4096, fmt, ap);
data/naev-0.7.0/src/dialogue.c:446:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(msg, 512, fmt, ap);
data/naev-0.7.0/src/dialogue.c:581:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(msg, 512, fmt, ap);
data/naev-0.7.0/src/dialogue.c:632:4:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
   vsnprintf(msg, 512, fmt, ap);
data/naev-0.7.0/src/font.c:309:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(text, 256, fmt, ap);
data/naev-0.7.0/src/font.c:371:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(text, 256, fmt, ap);
data/naev-0.7.0/src/font.c:439:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(text, 256, fmt, ap);
data/naev-0.7.0/src/font.c:533:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(text, 4096, fmt, ap);
data/naev-0.7.0/src/font.c:591:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(text, 256, fmt, ap);
data/naev-0.7.0/src/font.c:652:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(text, 1024, fmt, ap);
data/naev-0.7.0/src/gui.c:373:4:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
   vsnprintf( buf, sizeof(buf), fmt, ap );
data/naev-0.7.0/src/intro.c:110:15:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
           && sscanf( &intro_buf[p], "[fadein %s", img_src ) == 1 ) {
data/naev-0.7.0/src/land.c:251:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(errorreason, 512, fmt, ap);
data/naev-0.7.0/src/log.c:67:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf( &buf[2], sizeof(buf)-2, fmt, ap );
data/naev-0.7.0/src/mission.c:267:21:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
   if ((misn->avail.system != NULL) && (strcmp(misn->avail.system,sysname)!=0))
data/naev-0.7.0/src/mission.c:267:60:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
   if ((misn->avail.system != NULL) && (strcmp(misn->avail.system,sysname)!=0))
data/naev-0.7.0/src/mission.c:600:23:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
   if (mission->avail.system)
data/naev-0.7.0/src/mission.c:601:27:  [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.
      free(mission->avail.system);
data/naev-0.7.0/src/mission.c:857:48:  [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.
            xmlr_strd(cur,"system",temp->avail.system);
data/naev-0.7.0/src/mission.h:56:10:  [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.
   char *system; /**< System name. */
data/naev-0.7.0/src/naev.c:424:22:  [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.
               ret = system(script);
data/naev-0.7.0/src/naev.c:431:22:  [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.
               ret = system(script);
data/naev-0.7.0/src/naev.c:443:13:  [4] (shell) execv:
  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.
            execv(argv[0], argv);
data/naev-0.7.0/src/ndata.c:304:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(file, PATH_MAX, path, ap);
data/naev-0.7.0/src/nfile.c:342:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(file, PATH_MAX, path, ap);
data/naev-0.7.0/src/nfile.c:378:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(file, PATH_MAX, path, ap);
data/naev-0.7.0/src/nfile.c:405:4:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
   vsnprintf(file, PATH_MAX, path, ap);
data/naev-0.7.0/src/nfile.c:439:4:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
   vsnprintf(file, PATH_MAX, path, ap);
data/naev-0.7.0/src/nfile.c:533:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(base, PATH_MAX, path, ap);
data/naev-0.7.0/src/nfile.c:614:4:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
   vsnprintf( base, PATH_MAX, path, ap );
data/naev-0.7.0/src/nfile.c:684:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(base, PATH_MAX, path, ap);
data/naev-0.7.0/src/nfile.c:758:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(file, PATH_MAX, path, ap);
data/naev-0.7.0/src/nfile.c:794:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(base, PATH_MAX, path, ap);
data/naev-0.7.0/src/nstring.c:99:13:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
   retval = vsnprintf(text, maxlen, fmt, ap);
data/naev-0.7.0/src/nstring.h:19:25:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define nsnprintf       snprintf
data/naev-0.7.0/src/opengl_ext.h:25:54:  [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.
void* (APIENTRY *nglMapBuffer)(GLenum target, GLenum access);
data/naev-0.7.0/src/pilot_outfit.c:575:30:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
   if (pos < bufSize) pos += snprintf( &buf[pos], bufSize-pos, (msg) ); }
data/naev-0.7.0/src/space.c:146:46:  [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.
static StarSystem* system_parse( StarSystem *system, const xmlNodePtr parent );
data/naev-0.7.0/src/start.c:34:10:  [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.
   char *system; /**< Starting system. */
data/naev-0.7.0/src/start.c:110:54:  [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.
                  xmlr_strd( tmp, "name", start_data.system );
data/naev-0.7.0/src/start.c:198:21:  [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.
   free( start_data.system );
data/naev-0.7.0/src/start.c:264:22:  [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.
   return start_data.system;
data/naev-0.7.0/utils/mkspr/main.c:28:4:  [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(stdout,str"\n", ## args))
data/naev-0.7.0/lib/csparse/cs_randperm.c:13:5:  [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) ;			/* get new random number seed */
data/naev-0.7.0/lib/lua/lmathlib.c:210:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  srand(luaL_checkint(L, 1));
data/naev-0.7.0/lib/lua/loadlib.c:594: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.
  const char *path = getenv(envname);
data/naev-0.7.0/lib/lua/loslib.c:69: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.
  lua_pushstring(L, getenv(luaL_checkstring(L, 1)));  /* if NULL push nil */
data/naev-0.7.0/lib/lua/lua.c:324: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.
  const char *init = getenv(LUA_INIT);
data/naev-0.7.0/lib/lua/luaconf.h:657:33:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
#define lua_tmpnam(b,e)		{ e = (tmpnam(b) == NULL); }
data/naev-0.7.0/src/conf.c:576:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
   while ((c = getopt_long(argc, argv, "-:d:",
data/naev-0.7.0/src/conf.c:623:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
   while ((c = getopt_long(argc, argv,
data/naev-0.7.0/lib/lua/lauxlib.c:459: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(B->p, s, vl);  /* put it there */
data/naev-0.7.0/lib/lua/lauxlib.c:525: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 buff[LUAL_BUFFERSIZE];
data/naev-0.7.0/lib/lua/lauxlib.c:564: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).
    lf.f = fopen(filename, "r");
data/naev-0.7.0/lib/lua/lauxlib.h:133: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 buffer[LUAL_BUFFERSIZE];
data/naev-0.7.0/lib/lua/ldblib.c:285: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 buff[5];
data/naev-0.7.0/lib/lua/ldblib.c:304: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[250];
data/naev-0.7.0/lib/lua/ldebug.c:610: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 buff[LUA_IDSIZE];  /* add file:line information */
data/naev-0.7.0/lib/lua/ldump.c:145: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 h[LUAC_HEADERSIZE];
data/naev-0.7.0/lib/lua/liolib.c:165:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  *pf = fopen(filename, mode);
data/naev-0.7.0/lib/lua/liolib.c:185:9:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
  *pf = tmpfile();
data/naev-0.7.0/lib/lua/liolib.c:205: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).
      *pf = fopen(filename, mode);
data/naev-0.7.0/lib/lua/liolib.c:257:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    *pf = fopen(filename, "r");
data/naev-0.7.0/lib/lua/llex.c:103:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buff[MAXSRC];
data/naev-0.7.0/lib/lua/loadlib.c:98: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 buff[MAX_PATH + 1];
data/naev-0.7.0/lib/lua/loadlib.c:114: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 buffer[128];
data/naev-0.7.0/lib/lua/loadlib.c:333: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).
  FILE *f = fopen(filename, "r");  /* try to open file */
data/naev-0.7.0/lib/lua/lobject.c:127: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 buff[2];
data/naev-0.7.0/lib/lua/lobject.c:144: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 buff[4*sizeof(void *) + 8]; /* should be enough space for a `%p' */
data/naev-0.7.0/lib/lua/lobject.c:145: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(buff, "%p", va_arg(argp, void *));
data/naev-0.7.0/lib/lua/lobject.c:154: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 buff[3];
data/naev-0.7.0/lib/lua/lobject.c:196:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
        strcat(out, "...");
data/naev-0.7.0/lib/lua/lobject.c:204: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(out, "[string \"");
data/naev-0.7.0/lib/lua/lobject.c:207:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
        strcat(out, "...");
data/naev-0.7.0/lib/lua/lobject.c:211:7:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
      strcat(out, "\"]");
data/naev-0.7.0/lib/lua/lopcodes.c:16: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.
const char *const luaP_opnames[NUM_OPCODES+1] = {
data/naev-0.7.0/lib/lua/lopcodes.h:261: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.
LUAI_DATA const char *const luaP_opnames[NUM_OPCODES+1];  /* opcode names */
data/naev-0.7.0/lib/lua/loslib.c:58: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 buff[LUA_TMPNAMBUFSIZE];
data/naev-0.7.0/lib/lua/loslib.c:149: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 cc[3];
data/naev-0.7.0/lib/lua/loslib.c:158: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 buff[200];  /* should be big enough for any conversion result */
data/naev-0.7.0/lib/lua/lstring.c:62: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(ts+1, str, l*sizeof(char));
data/naev-0.7.0/lib/lua/lstrlib.c:770: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 form[MAX_FORMAT];  /* to store the format (`%...') */
data/naev-0.7.0/lib/lua/lstrlib.c:771: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 buff[MAX_ITEM];  /* to store the formatted item */
data/naev-0.7.0/lib/lua/lua.c:178: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 buffer[LUA_MAXINPUT];
data/naev-0.7.0/lib/lua/lua.h:356: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 short_src[LUA_IDSIZE]; /* (S) */
data/naev-0.7.0/lib/lua/luac.c:175:38:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE* D= (output==NULL) ? stdout : fopen(output,"wb");
data/naev-0.7.0/lib/lua/luaconf.h:650: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(b, "/tmp/lua_XXXXXX"); \
data/naev-0.7.0/lib/lua/luaconf.h:651: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).
	e = mkstemp(b); \
data/naev-0.7.0/lib/lua/lundump.c:185: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 h[LUAC_HEADERSIZE];
data/naev-0.7.0/lib/lua/lundump.c:186:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
 char s[LUAC_HEADERSIZE];
data/naev-0.7.0/lib/lua/lundump.c:217: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(h,LUA_SIGNATURE,sizeof(LUA_SIGNATURE)-1);
data/naev-0.7.0/lib/lua/lvm.c: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 s[LUAI_MAXNUMBER2STR];
data/naev-0.7.0/lib/lua/lvm.c:306:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buffer+tl, svalue(top-i), l);
data/naev-0.7.0/lib/lua/lzio.c:64: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(b, z->p, m);
data/naev-0.7.0/src/ai.c:337: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 aiL_distressmsg[PATH_MAX]; /**< Buffer to store distress message. */
data/naev-0.7.0/src/ai.c:458: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 buf[PATH_MAX];
data/naev-0.7.0/src/ai.c:554: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 path[PATH_MAX];
data/naev-0.7.0/src/array.h:58: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 _array[0];        /**< Begin of the array */
data/naev-0.7.0/src/background.c:425: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 path[PATH_MAX];
data/naev-0.7.0/src/board.c:472: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 str[PATH_MAX];
data/naev-0.7.0/src/board.c:473: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 cred[ECON_CRED_STRLEN];
data/naev-0.7.0/src/board.c:582: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 creds[ ECON_CRED_STRLEN ];
data/naev-0.7.0/src/conf.c:634:28:  [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).
            conf.fps_max = atoi(optarg);
data/naev-0.7.0/src/conf.c:640:33:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            conf.joystick_ind = atoi(optarg);
data/naev-0.7.0/src/conf.c:646:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            conf.width = atoi(optarg);
data/naev-0.7.0/src/conf.c:650:27:  [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).
            conf.height = atoi(optarg);
data/naev-0.7.0/src/conf.c:835: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 buf[32*1024];
data/naev-0.7.0/src/conf.c:838:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char keyname[17];
data/naev-0.7.0/src/conf.c:859:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy(buf, old, pos);
data/naev-0.7.0/src/conf.c:1182:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy(&buf[pos], oldfooter, oldsize);
data/naev-0.7.0/src/console.c:104: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 buf[CLI_MAX_INPUT];
data/naev-0.7.0/src/console.c:189: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 buf[PATH_MAX], *bbuf;
data/naev-0.7.0/src/console.c:477: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 buf[CLI_MAX_INPUT+7];
data/naev-0.7.0/src/console.c:576: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 buf[256];
data/naev-0.7.0/src/debris.c:45: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 buf[32];
data/naev-0.7.0/src/dev_outfit.c:31: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 buf[ 1024 ];
data/naev-0.7.0/src/dev_outfit.c:91: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 buf[ 1024 ];
data/naev-0.7.0/src/dev_outfit.c:148: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 buf[ 1024 ];
data/naev-0.7.0/src/dev_outfit.c:200: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 buf[ 1024 ];
data/naev-0.7.0/src/dev_outfit.c:271: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 buf[ 1024 ];
data/naev-0.7.0/src/dev_planet.c:36: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 file[PATH_MAX], *cleanName;
data/naev-0.7.0/src/dev_ship.c:30: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 buf[ 1024 ];
data/naev-0.7.0/src/dev_ship.c:90:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char buf[1024];
data/naev-0.7.0/src/dev_sysedit.c:161: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 buf[PATH_MAX];
data/naev-0.7.0/src/dev_sysedit.c:330:24:  [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).
   p->presenceRange  = atoi(window_getInput( sysedit_widEdit, "inpPresenceRange" ));
data/naev-0.7.0/src/dev_sysedit.c:539: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 buf[PATH_MAX];
data/naev-0.7.0/src/dev_sysedit.c:1185: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 buf[1024], *s, title[100];
data/naev-0.7.0/src/dev_sysedit.c:1344: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 buf[1024], *s;
data/naev-0.7.0/src/dev_sysedit.c:1435: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 *desc, *bardesc, title[100];
data/naev-0.7.0/src/dev_sysedit.c:1889: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 *path, buf[PATH_MAX];
data/naev-0.7.0/src/dev_sysedit.c:1969: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 *str, *path, buf[PATH_MAX];
data/naev-0.7.0/src/dev_system.c:84: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 file[PATH_MAX], *cleanName;
data/naev-0.7.0/src/dev_system.c:127: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( sorted_planets, sys->planets, sizeof(Planet*) * sys->nplanets );
data/naev-0.7.0/src/dev_system.c:239:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char file[PATH_MAX], *cleanName;
data/naev-0.7.0/src/dev_uniedit.c:966: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 buf[1024];
data/naev-0.7.0/src/dev_uniedit.c:1256: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 buf[128], *s;
data/naev-0.7.0/src/dev_uniedit.c:1432:27:  [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).
   sys->stars           = atoi(window_getInput( wid, "inpStars" ));
data/naev-0.7.0/src/dev_uniedit.c:1569: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 buf[128];
data/naev-0.7.0/src/dialogue.c:126: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[512];
data/naev-0.7.0/src/dialogue.c:216: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[4096];
data/naev-0.7.0/src/dialogue.c:239:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char msg[4096];
data/naev-0.7.0/src/dialogue.c:296:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char buf[PATH_MAX];
data/naev-0.7.0/src/dialogue.c:345: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[4096];
data/naev-0.7.0/src/dialogue.c:438: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[512];
data/naev-0.7.0/src/dialogue.c:573: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[512];
data/naev-0.7.0/src/dialogue.c:621: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[512];
data/naev-0.7.0/src/equipment.c:743: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 alt[512];
data/naev-0.7.0/src/equipment.c:1189: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 *s, selship[PATH_MAX];
data/naev-0.7.0/src/equipment.c:1647: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 buf[1024], sysname[128], buf2[ECON_CRED_STRLEN], buf3[ECON_CRED_STRLEN];
data/naev-0.7.0/src/equipment.c:1648: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 errorReport[256];
data/naev-0.7.0/src/equipment.c:1908: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 *shipname, buf[ECON_CRED_STRLEN];
data/naev-0.7.0/src/equipment.c:2029: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 *shipname, buf[ECON_CRED_STRLEN], *name;
data/naev-0.7.0/src/event.c:454: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 str[PATH_MAX] = "\0";
data/naev-0.7.0/src/event.c:860: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).
      id = atoi(buf);
data/naev-0.7.0/src/faction.c:1194: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 buf[PATH_MAX], *dat, *ctmp;
data/naev-0.7.0/src/font.c:303: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 text[256]; /* holds the string */
data/naev-0.7.0/src/font.c:365: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 text[256]; /* holds the string */
data/naev-0.7.0/src/font.c:433: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 text[256]; /* holds the string */
data/naev-0.7.0/src/font.c:527: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 text[4096]; /* holds the string */
data/naev-0.7.0/src/font.c:585: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 text[256]; /* holds the string */
data/naev-0.7.0/src/font.c:646: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 text[1024]; /* holds the string */
data/naev-0.7.0/src/font.c:689: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( c->data, bitmap.buffer, sizeof(GLubyte) * w*h );
data/naev-0.7.0/src/gui.c:152:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char str[MESG_SIZE_MAX]; /**< The message. */
data/naev-0.7.0/src/gui.c:361: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 buf[1024];
data/naev-0.7.0/src/gui.c:2128: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 *buf, path[PATH_MAX];
data/naev-0.7.0/src/info.c:52:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *info_names[INFO_WINDOWS] = {
data/naev-0.7.0/src/info.c:173: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 str[128], **buf, creds[ECON_CRED_STRLEN];
data/naev-0.7.0/src/info.c:419: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 buf[1024], *hyp_delay;
data/naev-0.7.0/src/info.c:514: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 **buf, tbuf[256];
data/naev-0.7.0/src/info.c:916: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 buf[128];
data/naev-0.7.0/src/input.c:174: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 *keyconv[INPUT_NUMKEYS]; /**< Key conversion table. */
data/naev-0.7.0/src/intro.c:84: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 img_src[128];     /* path to image to be displayed alongside text. */
data/naev-0.7.0/src/land.c:83:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *land_windowNames[LAND_NUMWINDOWS] = {
data/naev-0.7.0/src/land.c:117: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 errorlist[512];
data/naev-0.7.0/src/land.c:118: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 errorreason[512];
data/naev-0.7.0/src/land.c:716: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 txt[256], *buf;
data/naev-0.7.0/src/land.c:807: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 buf[ECON_CRED_STRLEN], cred[ECON_CRED_STRLEN];
data/naev-0.7.0/src/land.c:902: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.
   const char *names[LAND_NUMWINDOWS];
data/naev-0.7.0/src/land.c:1291: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 message[512];
data/naev-0.7.0/src/land_outfits.c:368: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 buf[PATH_MAX], buf2[ECON_CRED_STRLEN], buf3[ECON_CRED_STRLEN], buf4[PATH_MAX];
data/naev-0.7.0/src/land_outfits.c:588: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 buf[ECON_CRED_STRLEN];
data/naev-0.7.0/src/land_outfits.c:762: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 buf[8];
data/naev-0.7.0/src/land_shipyard.c:182: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 buf[PATH_MAX], buf2[ECON_CRED_STRLEN], buf3[ECON_CRED_STRLEN];
data/naev-0.7.0/src/land_shipyard.c:241:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy(license_text, ship->license, len - 8);
data/naev-0.7.0/src/land_shipyard.c:337: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 *shipname, buf[ECON_CRED_STRLEN];
data/naev-0.7.0/src/land_shipyard.c:387: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 buf[ECON_CRED_STRLEN];
data/naev-0.7.0/src/land_shipyard.c:453: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 buf[ECON_CRED_STRLEN];
data/naev-0.7.0/src/land_shipyard.c:472: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 *shipname, buf[ECON_CRED_STRLEN], buf2[ECON_CRED_STRLEN],
data/naev-0.7.0/src/land_trade.c:132: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 buf[PATH_MAX];
data/naev-0.7.0/src/land_trade.c:195: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 buf[ECON_CRED_STRLEN];
data/naev-0.7.0/src/land_trade.c:342: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 buf[8];
data/naev-0.7.0/src/load.c:178: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 **files, buf[PATH_MAX], *tmp;
data/naev-0.7.0/src/load.c:299: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, buf[PATH_MAX];
data/naev-0.7.0/src/load.c:371: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 buf[256], credits[ECON_CRED_STRLEN], date[64], version[256];
data/naev-0.7.0/src/load.c:418: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 version[64];
data/naev-0.7.0/src/log.c:61: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 buf[2048];
data/naev-0.7.0/src/log.c:102: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 timestr[20];
data/naev-0.7.0/src/map.c:300: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 buf[PATH_MAX];
data/naev-0.7.0/src/map.c:1044: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 buf[32];
data/naev-0.7.0/src/map.c:1633: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).
   SysNode *open,  *closed;
data/naev-0.7.0/src/map.c:1671:22:  [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).
   open     = A_add( open, cur ); /* Initial open node is the start system */
data/naev-0.7.0/src/map.c:1674:27:  [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).
   while ((cur = A_lowest(open))) {
data/naev-0.7.0/src/map.c:1685:22:  [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).
      open   = A_rm( open, cur->sys );
data/naev-0.7.0/src/map.c:1714:23:  [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).
         ocost = A_in(open, sys);
data/naev-0.7.0/src/map.c:1717:29:  [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).
               open = A_rm( open, sys ); /* New path is better */
data/naev-0.7.0/src/map.c:1726:37:  [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).
         open              = A_add( open, neighbour );
data/naev-0.7.0/src/map_find.c:700: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 buf[PATH_MAX], buf2[ECON_CRED_STRLEN], buf3[ECON_CRED_STRLEN];
data/naev-0.7.0/src/map_find.h:20: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 display[128];   /**< Name to display. */
data/naev-0.7.0/src/map_overlay.c:138:23:  [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).
void ovr_setOpen( int open )
data/naev-0.7.0/src/map_overlay.c:140:8:  [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 (open && !ovr_open) {
data/naev-0.7.0/src/map_overlay.h:15:23:  [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).
void ovr_setOpen( int open );
data/naev-0.7.0/src/md5.c:169: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(xbuf, data, 64);
data/naev-0.7.0/src/md5.c:343: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(pms->buf + offset, p, copy);
data/naev-0.7.0/src/md5.c:357: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(pms->buf, p, left);
data/naev-0.7.0/src/menu.c:560: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 path[PATH_MAX];
data/naev-0.7.0/src/mission.c:808: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 str[PATH_MAX] = "\0";
data/naev-0.7.0/src/mission.c:1134:21:  [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).
         misn->id = atol(buf);
data/naev-0.7.0/src/mission.c:1151:43:  [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).
                     id = (buf != NULL) ? atoi(buf) : -1;
data/naev-0.7.0/src/mission.c:1156:45:  [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).
                     type = (buf != NULL) ? atoi(buf) : -1;
data/naev-0.7.0/src/mission.c:1184:28:  [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).
                  nitems = atoi(buf);
data/naev-0.7.0/src/mission.c:1212:42:  [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).
                  osd_active( misn->osd, atoi(buf) );
data/naev-0.7.0/src/music.c:49:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char music_situation[PATH_MAX]; /**< What situation music is in. */
data/naev-0.7.0/src/music.c:105: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 buf[PATH_MAX];
data/naev-0.7.0/src/music.c:392: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 filename[PATH_MAX];
data/naev-0.7.0/src/music_openal.c:96: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 name[64]; /**< Song name. */
data/naev-0.7.0/src/naev.c:110: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 short_version[64]; /**< Contains version. */
data/naev-0.7.0/src/naev.c:111: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 human_version[256]; /**< Human readable version. */
data/naev-0.7.0/src/naev.c:175: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 buf[PATH_MAX];
data/naev-0.7.0/src/naev.c:265: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 *home, buf2[PATH_MAX];
data/naev-0.7.0/src/naev.c:405: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 path[PATH_MAX], *script, *home;
data/naev-0.7.0/src/naev.c:555: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 file_path[PATH_MAX];
data/naev-0.7.0/src/naev.c:1136: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 buf[PATH_MAX];
data/naev-0.7.0/src/naev.c:1228: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 cbuf[64];
data/naev-0.7.0/src/naev.c:1242:25:  [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).
         version[s++] = atoi(cbuf);
data/naev-0.7.0/src/naev.c:1252:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      version[s++] = atoi(cbuf);
data/naev-0.7.0/src/ndata.c:296:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char file[PATH_MAX];
data/naev-0.7.0/src/ndata.c:391: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 path[PATH_MAX], *buf;
data/naev-0.7.0/src/ndata.c:392: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 pathname[PATH_MAX];
data/naev-0.7.0/src/ndata.c:623: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 *buf, path[PATH_MAX];
data/naev-0.7.0/src/ndata.c:675: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 *buf, path[PATH_MAX];
data/naev-0.7.0/src/ndata.c:765: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 path[PATH_MAX], *tmp;
data/naev-0.7.0/src/ndata.c:930: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 **files, **tfiles, buf[PATH_MAX], *tmp;
data/naev-0.7.0/src/nebula.c:124: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 nebu_file[PATH_MAX];
data/naev-0.7.0/src/nebula.c:756: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 nebu_file[PATH_MAX];
data/naev-0.7.0/src/nebula.c:846: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 file_path[PATH_MAX];
data/naev-0.7.0/src/nebula.c:872: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 file_path[PATH_MAX];
data/naev-0.7.0/src/news.c:48:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char buf[NEWS_MAX_LENGTH];
data/naev-0.7.0/src/news.c:516:15:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
         j += sprintf( &new[j], "%.3d", unclean[i] )-1;
data/naev-0.7.0/src/news.c:686:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      next_id = atoi(buff);
data/naev-0.7.0/src/nfile.c:113:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( relhome, home, homelen );
data/naev-0.7.0/src/nfile.c:114:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( &relhome[ homelen ], relativefallback, fallbacklength + 1 );
data/naev-0.7.0/src/nfile.c:121: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 naev_dataPath[PATH_MAX] = "\0"; /**< Store Naev's data path. */
data/naev-0.7.0/src/nfile.c:165: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 naev_configPath[PATH_MAX] = "\0"; /**< Store Naev's config path. */
data/naev-0.7.0/src/nfile.c:209: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 naev_cachePath[PATH_MAX] = "\0"; /**< Store Naev's cache path. */
data/naev-0.7.0/src/nfile.c:254: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 dirname_buf[PATH_MAX];
data/naev-0.7.0/src/nfile.c:292: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 opath[PATH_MAX];
data/naev-0.7.0/src/nfile.c:335: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 file[PATH_MAX];
data/naev-0.7.0/src/nfile.c:370: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 file[PATH_MAX];
data/naev-0.7.0/src/nfile.c:398: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 file[PATH_MAX];
data/naev-0.7.0/src/nfile.c:431: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 file[PATH_MAX];
data/naev-0.7.0/src/nfile.c:432: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 backup[PATH_MAX];
data/naev-0.7.0/src/nfile.c:461: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 buf[ 8*1024 ];
data/naev-0.7.0/src/nfile.c:472: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).
   f_in  = fopen( file1, "rb" );
data/naev-0.7.0/src/nfile.c:473: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).
   f_out = fopen( file2, "wb" );
data/naev-0.7.0/src/nfile.c:523: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 file[PATH_MAX], base[PATH_MAX];
data/naev-0.7.0/src/nfile.c:609: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 **tfiles, **out, **cfiles, *buf, base[PATH_MAX];
data/naev-0.7.0/src/nfile.c:671: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 base[PATH_MAX];
data/naev-0.7.0/src/nfile.c:689:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   file = fopen( base, "rb" );
data/naev-0.7.0/src/nfile.c:750: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 file[PATH_MAX];
data/naev-0.7.0/src/nfile.c:763:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   f = fopen(file, "a+b");
data/naev-0.7.0/src/nfile.c:785: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 base[PATH_MAX];
data/naev-0.7.0/src/nfile.c:799:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   file = fopen( base, "wb" );
data/naev-0.7.0/src/nlua_evt.c:179: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 portrait[PATH_MAX];
data/naev-0.7.0/src/nlua_hook.c:699: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 buf[ PATH_MAX ];
data/naev-0.7.0/src/nlua_misn.c:512: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 buf[PATH_MAX];
data/naev-0.7.0/src/nlua_misn.c:882: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 portrait[PATH_MAX];
data/naev-0.7.0/src/nlua_naev.c:118: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 buf[128];
data/naev-0.7.0/src/nlua_pilot.c:1450: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( outfits, p->outfits, sizeof(PilotOutfitSlot*) * p->noutfits );
data/naev-0.7.0/src/nlua_planet.c:579: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 *name, lower[256];
data/naev-0.7.0/src/nlua_player.c:216: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 buf[ ECON_CRED_STRLEN ];
data/naev-0.7.0/src/nlua_time.c:359: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 nt[64];
data/naev-0.7.0/src/nstring.c:122:20:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   return (char *) memcpy (new, s, len);
data/naev-0.7.0/src/ntime.c:187: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 str[64];
data/naev-0.7.0/src/nxml.c:35: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 *buf, filename[PATH_MAX];
data/naev-0.7.0/src/nxml.c:47: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).
      sx = atoi(buf);
data/naev-0.7.0/src/nxml.c:54: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).
      sy = atoi(buf);
data/naev-0.7.0/src/nxml_lua.c:102: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 buf[PATH_MAX];
data/naev-0.7.0/src/opengl.c:915:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   if (!(fp = fopen(file_name, "wb"))) {
data/naev-0.7.0/src/opengl_render.c:1110: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 name[PATH_MAX];
data/naev-0.7.0/src/opengl_tex.c:102: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(tmpbuf, rowhi, surface->pitch);
data/naev-0.7.0/src/opengl_tex.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(rowhi, rowlo, surface->pitch);
data/naev-0.7.0/src/opengl_tex.c:104:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(rowlo, tmpbuf, surface->pitch);
data/naev-0.7.0/src/opengl_tex.c:404: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 digest[33];
data/naev-0.7.0/src/opengl_tex.c:667:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
   sx  = (len > 0) ? atoi(str) : 1;
data/naev-0.7.0/src/opengl_tex.c:669:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
   sy  = (len > 0) ? atoi(str) : 1;
data/naev-0.7.0/src/opengl_vbo.c:109:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy( vbo->data, data, size );
data/naev-0.7.0/src/opengl_vbo.c:151:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy( vbo->data, data, size );
data/naev-0.7.0/src/opengl_vbo.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( &vbo->data[offset], data, size );
data/naev-0.7.0/src/options.c:174: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 buf[16];
data/naev-0.7.0/src/options.c:192: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 buf[PATH_MAX];
data/naev-0.7.0/src/options.c:355:24:  [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).
   conf.mesg_visible = atoi(vmsg);
data/naev-0.7.0/src/options.c:356:28:  [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).
   conf.compression_mult = atoi(tmax);
data/naev-0.7.0/src/options.c:369: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 vmsg[16], tmax[16];
data/naev-0.7.0/src/options.c:394: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 vmsg[16], tmax[16];
data/naev-0.7.0/src/options.c:421: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 buf[PATH_MAX];
data/naev-0.7.0/src/options.c:502: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 **str, mod_text[64];
data/naev-0.7.0/src/options.c:591: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 buf[1024];
data/naev-0.7.0/src/options.c:592: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 binding[64];
data/naev-0.7.0/src/options.c:700: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 buf[32], *widget;
data/naev-0.7.0/src/options.c:1100: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 buf[16];
data/naev-0.7.0/src/options.c:1284: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 *inp, buf[16], width[16], height[16];
data/naev-0.7.0/src/options.c:1305:8:  [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).
   w = atoi(width);
data/naev-0.7.0/src/options.c:1306:8:  [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).
   h = atoi(height);
data/naev-0.7.0/src/options.c:1442: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).
   conf.fps_max = atoi(inp);
data/naev-0.7.0/src/options.c:1495: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 buf[16];
data/naev-0.7.0/src/outfit.c:2153:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            if ((int)atoi(prop))
data/naev-0.7.0/src/outfit.c:2161:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            group = atoi(prop);
data/naev-0.7.0/src/perlin.c:75: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.
   unsigned char map[256]; /**< Randomized map of indexes into buffer */
data/naev-0.7.0/src/pilot.c:1697: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 buf[16];
data/naev-0.7.0/src/pilot.c:2617:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy( dest->outfit_structure, src->outfit_structure,
data/naev-0.7.0/src/pilot.c:2621:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy( dest->outfit_utility, src->outfit_utility,
data/naev-0.7.0/src/pilot.c:2625:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy( dest->outfit_weapon, src->outfit_weapon,
data/naev-0.7.0/src/pilot.h:73:33:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define pilot_copyFlagsRaw(d,s) memcpy((d), (s), PILOT_FLAGS_MAX) /**< Copies the pilot flags from s to d. */
data/naev-0.7.0/src/pilot.h:130: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 PilotFlags[ PILOT_FLAGS_MAX ];
data/naev-0.7.0/src/pilot_hook.c:49: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( &hstaparam[n], param, sizeof(HookParam)*nparam );
data/naev-0.7.0/src/pilot_hook.c:59: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( &hdynparam[1], param, sizeof(HookParam)*nparam );
data/naev-0.7.0/src/player.c:1979: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 filename[PATH_MAX];
data/naev-0.7.0/src/player.c:3540:8:  [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).
   q = atoi(buf);
data/naev-0.7.0/src/player.c:3636:23:  [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).
                  n = atoi(q);
data/naev-0.7.0/src/player.c:3654:23:  [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).
                  n = atoi(q);
data/naev-0.7.0/src/player.c:3672:23:  [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).
                  n = atoi(q);
data/naev-0.7.0/src/player.c:3689:27:  [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).
               quantity = atoi(q);
data/naev-0.7.0/src/player.c:3690:37:  [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).
               i = (id==NULL) ? 0 : atoi(id);
data/naev-0.7.0/src/player.c:3757:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
         autoweap = atoi(id);
data/naev-0.7.0/src/player.c:3764:23:  [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).
         active_set = atoi(id);
data/naev-0.7.0/src/player.c:3788: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).
         i = atoi(id);
data/naev-0.7.0/src/player.c:3801:44:  [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).
            pilot_weapSetInrange( ship, i, atoi(id) );
data/naev-0.7.0/src/player.c:3814:38:  [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).
         pilot_weapSetType( ship, i, atoi(id) );
data/naev-0.7.0/src/player.c:3836:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            level = atoi(id);
data/naev-0.7.0/src/player.h:40: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 PlayerFlags[ PLAYER_FLAGS_MAX ];
data/naev-0.7.0/src/player_gui.c:65: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 buf[PATH_MAX];
data/naev-0.7.0/src/rng.c:68:9:  [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).
   fd = open("/dev/urandom", O_RDONLY); /* /dev/urandom is better than time seed */
data/naev-0.7.0/src/save.c:95: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 file[PATH_MAX];
data/naev-0.7.0/src/save.c:173: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 path[PATH_MAX];
data/naev-0.7.0/src/ship.c:347: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 buf[PATH_MAX];
data/naev-0.7.0/src/ship.c:474: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 base[PATH_MAX], str[PATH_MAX];
data/naev-0.7.0/src/ship.c:618:25:  [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).
      slot->exclusive = atoi( buf );
data/naev-0.7.0/src/ship.c:628:25:  [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).
      slot->required  = atoi( buf );
data/naev-0.7.0/src/ship.c:708: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).
            sx = atoi(stmp);
data/naev-0.7.0/src/ship.c:715: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).
            sy = atoi(stmp);
data/naev-0.7.0/src/sound.c:704: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 path[PATH_MAX];
data/naev-0.7.0/src/sound.c:705: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 tmp[64];
data/naev-0.7.0/src/sound_openal.c:339: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( source_total, source_stack, sizeof(ALuint) * source_mstack );
data/naev-0.7.0/src/sound_openal.c:343: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( source_all, source_stack, sizeof(ALuint) * source_mstack );
data/naev-0.7.0/src/sound_sdlmix.c:108: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 device[PATH_MAX];
data/naev-0.7.0/src/space.c:1789: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 str[PATH_MAX], *tmp;
data/naev-0.7.0/src/space.c:1996: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 *buf, path[PATH_MAX], str[PATH_MAX];
data/naev-0.7.0/src/space.c:2626:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      j->hide = atoi(buf);
data/naev-0.7.0/src/space.c:3029: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 **asteroid_files, file[PATH_MAX];
data/naev-0.7.0/src/space.c:3102: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 *buf, *str, file[PATH_MAX];
data/naev-0.7.0/src/tk/widget/button.c:233: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 buf[PATH_MAX], *display, target;
data/naev-0.7.0/src/tk/widget/input.c:95: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 buf[ 512 ], *str;
data/naev-0.7.0/src/toolkit.c:2079: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 buf[2];
data/naev-0.7.0/src/toolkit.c:2268: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 buf[2];
data/naev-0.7.0/utils/mkspr/main.c:56: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 file[8];
data/naev-0.7.0/utils/mkspr/main.c:64: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).
		ws = hs = atoi(argv[1]);
data/naev-0.7.0/utils/mkspr/main.c:66:8:  [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).
		ws = atoi(argv[1]);
data/naev-0.7.0/utils/mkspr/main.c:67:8:  [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).
		hs = atoi(argv[2]);
data/naev-0.7.0/utils/mkspr/main.c:89: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( file, "%d%d%d.png", i/100, (i%100)/10, i%10 );
data/naev-0.7.0/utils/mkspr/main.c:231: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(file_name, "wb")))
data/naev-0.7.0/lib/lua/lapi.c:458: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).
    lua_pushlstring(L, s, strlen(s));
data/naev-0.7.0/lib/lua/lauxlib.c:169: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).
      *len = (def ? strlen(def) : 0);
data/naev-0.7.0/lib/lua/lauxlib.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).
  size_t l = strlen(p);
data/naev-0.7.0/lib/lua/lauxlib.c:363: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 (e == NULL) e = fname + strlen(fname);
data/naev-0.7.0/lib/lua/lauxlib.c:443: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).
  luaL_addlstring(B, s, strlen(s));
data/naev-0.7.0/lib/lua/lauxlib.c:567:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  c = getc(lf.f);
data/naev-0.7.0/lib/lua/lauxlib.c:570:17:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((c = getc(lf.f)) != EOF && c != '\n') ;  /* skip first line */
data/naev-0.7.0/lib/lua/lauxlib.c:571:24:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (c == '\n') c = getc(lf.f);
data/naev-0.7.0/lib/lua/lauxlib.c:577:16:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   while ((c = getc(lf.f)) != EOF && c != LUA_SIGNATURE[0]) ;
data/naev-0.7.0/lib/lua/lauxlib.c:619: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).
  return luaL_loadbuffer(L, s, strlen(s), s);
data/naev-0.7.0/lib/lua/ldblib.c:309: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 (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") ||
data/naev-0.7.0/lib/lua/liolib.c:287:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int c = getc(f);
data/naev-0.7.0/lib/lua/liolib.c:304: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).
    l = strlen(p);
data/naev-0.7.0/lib/lua/llex.c:69: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).
    lua_assert(strlen(luaX_tokens[i])+1 <= TOKEN_LEN);
data/naev-0.7.0/lib/lua/loadlib.c:345: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 (l == NULL) l = path + strlen(path);
data/naev-0.7.0/lib/lua/lobject.c:184:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(out, source+1, bufflen);  /* remove first char */
data/naev-0.7.0/lib/lua/lobject.c:192: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).
      l = strlen(source);
data/naev-0.7.0/lib/lua/lobject.c:193:7:  [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(out, "");
data/naev-0.7.0/lib/lua/lobject.c:206:9:  [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.
        strncat(out, source, len);
data/naev-0.7.0/lib/lua/lstring.h:20: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).
#define luaS_new(L, s)	(luaS_newlstr(L, s, strlen(s)))
data/naev-0.7.0/lib/lua/lstrlib.c:740:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(form, strfrmt, p - strfrmt + 1);
data/naev-0.7.0/lib/lua/lstrlib.c:748: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).
  size_t l = strlen(form);
data/naev-0.7.0/lib/lua/lstrlib.c:819: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).
      luaL_addlstring(&b, buff, strlen(buff));
data/naev-0.7.0/lib/lua/lua.c:141: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).
  int status = luaL_loadbuffer(L, s, strlen(s), name) || docall(L, 0, 1);
data/naev-0.7.0/lib/lua/lua.c:184: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).
  l = strlen(b);
data/naev-0.7.0/lib/lua/lvm.c:212: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).
      size_t len = strlen(l);  /* index of first `\0' in both strings */
data/naev-0.7.0/src/ai.c:460:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
   strncpy(buf, ai, sizeof(buf));
data/naev-0.7.0/src/ai.c:562: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).
   suflen = strlen(AI_SUFFIX);
data/naev-0.7.0/src/ai.c:564: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).
      flen = strlen(files[i]);
data/naev-0.7.0/src/ai.c:642: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).
   len = strlen(filename)-strlen(AI_PATH)-strlen(AI_SUFFIX);
data/naev-0.7.0/src/ai.c:642: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).
   len = strlen(filename)-strlen(AI_PATH)-strlen(AI_SUFFIX);
data/naev-0.7.0/src/ai.c:642: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).
   len = strlen(filename)-strlen(AI_PATH)-strlen(AI_SUFFIX);
data/naev-0.7.0/src/ai.c:644:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
   strncpy( prof->name, &filename[strlen(AI_PATH)], len );
data/naev-0.7.0/src/ai.c:644: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).
   strncpy( prof->name, &filename[strlen(AI_PATH)], len );
data/naev-0.7.0/src/conf.c:865: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).
            oldfooter = tmp + strlen("-- "GENERATED_END_COMMENT"\n");
data/naev-0.7.0/src/console.c:270: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).
               str = nstrndup(cli_buffer[i]+5, strlen(cli_buffer[i])-7);
data/naev-0.7.0/src/console.c:295: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).
               str = nstrndup(cli_buffer[i]+5, strlen(cli_buffer[i])-7);
data/naev-0.7.0/src/console.c:382: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).
   if (strlen(cur) > 0) {
data/naev-0.7.0/src/console.c:387: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 (strncmp(cur, match, strlen(cur)) == 0) {
data/naev-0.7.0/src/console.c:388: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).
               new = malloc(strlen(old) + strlen(match) - strlen(cur) + 1);
data/naev-0.7.0/src/console.c:388: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).
               new = malloc(strlen(old) + strlen(match) - strlen(cur) + 1);
data/naev-0.7.0/src/console.c:388:59:  [1] (buffer) strlen:
  Does not handle 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 = malloc(strlen(old) + strlen(match) - strlen(cur) + 1);
data/naev-0.7.0/src/console.c:390: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).
               strcat(new, match + strlen(cur));
data/naev-0.7.0/src/dev_outfit.c:233: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).
      for (j=0; j<(int)strlen(ai); j++)
data/naev-0.7.0/src/dev_ship.c:100:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
   strncpy(buf, "name,", sizeof(buf));
data/naev-0.7.0/src/dev_sysedit.c:315: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).
   if ((inp == NULL) || (strlen(inp) == 0))
data/naev-0.7.0/src/dev_sysedit.c:324: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).
   if ((inp == NULL) || (strlen(inp) == 0))
data/naev-0.7.0/src/dev_sysedit.c:426: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).
         oldName = malloc(16 + strlen(filtered));
data/naev-0.7.0/src/dev_sysedit.c:427: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).
         nsnprintf(oldName, 16 + strlen(filtered), "dat/assets/%s.xml", filtered);
data/naev-0.7.0/src/dev_sysedit.c:431: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).
         newName = malloc(16 + strlen(filtered));
data/naev-0.7.0/src/dev_sysedit.c:432: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).
         nsnprintf(newName, 16 + strlen(filtered), "dat/assets/%s.xml", filtered);
data/naev-0.7.0/src/dev_sysedit.c:465: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).
            file = malloc(16 + strlen(filtered));
data/naev-0.7.0/src/dev_sysedit.c:466: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).
            nsnprintf(file, 16 + strlen(filtered), "dat/assets/%s.xml", filtered);
data/naev-0.7.0/src/dev_uniedit.c:682: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).
   out = calloc( 1, (strlen(name)+1)  );
data/naev-0.7.0/src/dev_uniedit.c:684: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).
   for (i=0; i<(int)strlen(name); i++) {
data/naev-0.7.0/src/dev_uniedit.c:726: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).
      oldName = malloc(14 + strlen(filtered));
data/naev-0.7.0/src/dev_uniedit.c:727: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).
      nsnprintf(oldName, 14 + strlen(filtered), "dat/ssys/%s.xml", filtered);
data/naev-0.7.0/src/dev_uniedit.c:731: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).
      newName = malloc(14 + strlen(filtered));
data/naev-0.7.0/src/dev_uniedit.c:732: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).
      nsnprintf(newName, 14 + strlen(filtered), "dat/ssys/%s.xml", filtered);
data/naev-0.7.0/src/dev_uniedit.c:1145:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(found[n].display, sys->name, sizeof(found[n].display));
data/naev-0.7.0/src/dialogue.c:492: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).
         ((int)strlen(input) < min))) { /* must be longer than min */
data/naev-0.7.0/src/equipment.c:1213:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy( selship, s, sizeof(selship) );
data/naev-0.7.0/src/equipment.c:1529:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (strlen(filtertext) == 0)
data/naev-0.7.0/src/equipment.c:1581: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).
         l = strlen(o->desc_short) + 128;
data/naev-0.7.0/src/font.c:557:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   for (n=0,i=0; i<(int)strlen(text); i++) {
data/naev-0.7.0/src/gui.c:320: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).
   l = strlen(str);
data/naev-0.7.0/src/gui_omsg.c:106: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).
   l  = strlen( msg );
data/naev-0.7.0/src/gui_osd.c:156: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).
      l = strlen(osd->msg[i]); /* Message length. */
data/naev-0.7.0/src/input.c:489: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).
   l = strlen(name);
data/naev-0.7.0/src/intro.c:115: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).
         length = strlen( img_src );
data/naev-0.7.0/src/intro.c:118:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
         strncpy( &intro_lines[n][1], img_src, length );
data/naev-0.7.0/src/intro.c:139:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
         strncpy( &intro_lines[n][1], &intro_buf[p], i );
data/naev-0.7.0/src/land_outfits.c:283:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (strlen(filtertext) == 0)
data/naev-0.7.0/src/land_outfits.c:426:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
      strncpy( buf4, "None", sizeof(buf4) );
data/naev-0.7.0/src/land_outfits.c:428:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy( buf4, outfit->license, sizeof(buf4) );
data/naev-0.7.0/src/land_shipyard.c:237: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).
      len = strlen(ship->license);
data/naev-0.7.0/src/load.c:162: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).
      naev_versionParse( save->version, version, strlen(version) );
data/naev-0.7.0/src/load.c:190: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).
      len = strlen(files[i]);
data/naev-0.7.0/src/load.c:208: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).
      len = strlen( files[i] );
data/naev-0.7.0/src/load.c:317: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).
         len      = strlen(ns->path);
data/naev-0.7.0/src/log.c:274: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).
   len = strlen(str);
data/naev-0.7.0/src/log.c:282:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy( &outcopy[noutcopy], str, len+1 );
data/naev-0.7.0/src/log.c:292:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy( &errcopy[nerrcopy], str, len+1 );
data/naev-0.7.0/src/map.c:490:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
      strncpy( buf, "None", PATH_MAX );
data/naev-0.7.0/src/music.c:124:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
   strncpy(buf, music_situation, PATH_MAX);
data/naev-0.7.0/src/music.c:319: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).
   suflen = strlen(MUSIC_SUFFIX);
data/naev-0.7.0/src/music.c:321: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).
      flen = strlen(files[i]);
data/naev-0.7.0/src/music.c:604:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
   strncpy(music_situation, situation, PATH_MAX);
data/naev-0.7.0/src/music.c:626:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
   strncpy(music_situation, "idle", PATH_MAX);
data/naev-0.7.0/src/music_openal.c:701:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
   strncpy( music_vorbis.name, name, 64 );
data/naev-0.7.0/src/ndata.c:132: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).
      len = strlen(path);
data/naev-0.7.0/src/ndata.c:351: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(NDATA_FILENAME);
data/naev-0.7.0/src/ndata.c:359: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).
         l           = strlen(files[i]) + strlen(path) + 2;
data/naev-0.7.0/src/ndata.c:359: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).
         l           = strlen(files[i]) + strlen(path) + 2;
data/naev-0.7.0/src/ndata.c:421:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
         strncpy(ndata_filename, pathname, PATH_MAX);
data/naev-0.7.0/src/ndata.c:425:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
         strncpy(ndata_filename, pathname, PATH_MAX);
data/naev-0.7.0/src/ndata.c:847: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).
   len = strlen( path );
data/naev-0.7.0/src/ndata.c:887: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).
   len = strlen( path );
data/naev-0.7.0/src/news.c:352:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy( news_lines[news_nlines], buf+p, i );
data/naev-0.7.0/src/news.c:511: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).
   new = malloc( 4*strlen(unclean)+1 );
data/naev-0.7.0/src/nfile.c:107: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).
        homelen = strlen(home);
data/naev-0.7.0/src/nfile.c:109: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).
        fallbacklength = strlen( relativefallback );
data/naev-0.7.0/src/nfile.c:265: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).
   for (i=strlen(path)-1; i>=0; i--)
data/naev-0.7.0/src/nfile.c:300:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
   strncpy( opath, path, sizeof(opath) );
data/naev-0.7.0/src/nfile.c:302: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).
   len = strlen(opath);
data/naev-0.7.0/src/nfile.c:623: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).
      ls  = strlen(base) + strlen(tfiles[i]) + 1;
data/naev-0.7.0/src/nfile.c:623: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).
      ls  = strlen(base) + strlen(tfiles[i]) + 1;
data/naev-0.7.0/src/nlua.c:328: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).
      len           = strlen(LUA_INCLUDE_PATH)+strlen(filename)+2;
data/naev-0.7.0/src/nlua.c:328: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).
      len           = strlen(LUA_INCLUDE_PATH)+strlen(filename)+2;
data/naev-0.7.0/src/nlua_planet.c:589: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(name) + 1;
data/naev-0.7.0/src/nstring.c:31: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).
   needlesize = strlen(needle);
data/naev-0.7.0/src/nstring.c:72: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).
   hay_len     = strlen(haystack);
data/naev-0.7.0/src/nstring.c:73: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).
   needle_len  = strlen(needle);
data/naev-0.7.0/src/nstring.c:117: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).
   size_t len = MIN( strlen(s), n );
data/naev-0.7.0/src/nzip.c:100:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   uint32_t read;
data/naev-0.7.0/src/nzip.c:129:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   if ( read < stats.size ) {
data/naev-0.7.0/src/nzip.c:178:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (stats.name[strlen(stats.name) - 1] != '/')
data/naev-0.7.0/src/opengl.c:282: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).
   len = strlen(name);
data/naev-0.7.0/src/opengl.c:283: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).
   end = p + strlen(p);
data/naev-0.7.0/src/outfit.c:2349: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).
      len  = strlen(MAP_DATA_PATH)+strlen(map_files[i])+2;
data/naev-0.7.0/src/outfit.c:2349: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).
      len  = strlen(MAP_DATA_PATH)+strlen(map_files[i])+2;
data/naev-0.7.0/src/player.c:462: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).
      len = strlen(def_name)+10;
data/naev-0.7.0/src/player.c:464:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy( ship_name, def_name, len );
data/naev-0.7.0/src/rng.c:71:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (read( fd, &MT, i ) == (ssize_t)i)
data/naev-0.7.0/src/save.c:194: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).
      len = strlen(files[i]);
data/naev-0.7.0/src/ship.c:929: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).
      sl   = strlen(SHIP_DATA_PATH)+strlen(ship_files[i])+1;
data/naev-0.7.0/src/ship.c:929: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).
      sl   = strlen(SHIP_DATA_PATH)+strlen(ship_files[i])+1;
data/naev-0.7.0/src/sound.c:717: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).
   suflen = strlen(SOUND_SUFFIX_WAV);
data/naev-0.7.0/src/sound.c:719: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).
      flen = strlen(files[i]);
data/naev-0.7.0/src/sound.c:743:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy( tmp, files[i], len );
data/naev-0.7.0/src/sound_sdlmix.c:116:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
   strncpy( device, drvname, PATH_MAX );
data/naev-0.7.0/src/space.c:1582: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(PLANET_DATA_PATH)+strlen(planet_files[i])+2);
data/naev-0.7.0/src/space.c:1582: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).
      len  = (strlen(PLANET_DATA_PATH)+strlen(planet_files[i])+2);
data/naev-0.7.0/src/space.c:2012:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy( str, buf, MIN( (unsigned int)nbuf, sizeof(str) ) );
data/naev-0.7.0/src/space.c:3053: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(PLANET_GFX_SPACE_PATH)+strlen(asteroid_files[i])+11);
data/naev-0.7.0/src/space.c:3053: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).
      len  = (strlen(PLANET_GFX_SPACE_PATH)+strlen(asteroid_files[i])+11);
data/naev-0.7.0/src/space.c:3150: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).
               len  = (strlen(PLANET_GFX_SPACE_PATH)+strlen(str)+14);
data/naev-0.7.0/src/space.c:3150:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
               len  = (strlen(PLANET_GFX_SPACE_PATH)+strlen(str)+14);
data/naev-0.7.0/src/space.c:3212: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).
      len  = strlen(SYSTEM_DATA_PATH)+strlen(system_files[i])+2;
data/naev-0.7.0/src/space.c:3212: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).
      len  = strlen(SYSTEM_DATA_PATH)+strlen(system_files[i])+2;
data/naev-0.7.0/src/space.c:3247: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).
      len  = strlen(SYSTEM_DATA_PATH)+strlen(system_files[i])+2;
data/naev-0.7.0/src/space.c:3247: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).
      len  = strlen(SYSTEM_DATA_PATH)+strlen(system_files[i])+2;
data/naev-0.7.0/src/tk/widget/button.c:239: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).
   if (strlen(keyname) != 1) /* Only interested in single chars. */
data/naev-0.7.0/src/tk/widget/button.c:250: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 (i=0; i<strlen(display); i++) {
data/naev-0.7.0/src/tk/widget/input.c:122:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
         strncpy( buf, &inp->dat.inp.input[ inp->dat.inp.view ], m );
data/naev-0.7.0/src/tk/widget/input.c:226: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).
   if (strlen(inp->dat.inp.input) >= (size_t)inp->dat.inp.max-1)
data/naev-0.7.0/src/tk/widget/input.c:257:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   for (i = 0; i < (int)strlen(breakers); i++) {
data/naev-0.7.0/src/tk/widget/input.c:309: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).
         len = (int)strlen(inp->dat.inp.input);
data/naev-0.7.0/src/tk/widget/input.c:382:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
         if (inp->dat.inp.pos == (int)strlen(inp->dat.inp.input))
data/naev-0.7.0/src/tk/widget/input.c:419:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
         inp->dat.inp.pos  = MIN(inp->dat.inp.pos, (int)strlen(inp->dat.inp.input));
data/naev-0.7.0/src/tk/widget/input.c:492: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).
      len = (int)strlen(inp->dat.inp.input);
data/naev-0.7.0/src/tk/widget/input.c:533: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).
      inp->dat.inp.pos = strlen(inp->dat.inp.input);
data/naev-0.7.0/src/tk/widget/input.c:663:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy( wgt->dat.inp.input, msg, wgt->dat.inp.max );
data/naev-0.7.0/src/tk/widget/input.c:665: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).
      wgt->dat.inp.pos = strlen( wgt->dat.inp.input );
data/naev-0.7.0/src/toolkit.c:1193:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
   strncpy(buf, alt, i);

ANALYSIS SUMMARY:

Hits = 548
Lines analyzed = 139310 in approximately 3.23 seconds (43139 lines/second)
Physical Source Lines of Code (SLOC) = 84028
Hits@level = [0]  94 [1] 155 [2] 319 [3]   8 [4]  65 [5]   1
Hits@level+ = [0+] 642 [1+] 548 [2+] 393 [3+]  74 [4+]  66 [5+]   1
Hits/KSLOC@level+ = [0+] 7.64031 [1+] 6.52164 [2+] 4.67701 [3+] 0.880659 [4+] 0.785452 [5+] 0.0119008
Dot directories skipped = 2 (--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.