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/crawl-0.25.1/source/store.cc
Examining data/crawl-0.25.1/source/fineff.h
Examining data/crawl-0.25.1/source/artefact-prop-type.h
Examining data/crawl-0.25.1/source/game-options.h
Examining data/crawl-0.25.1/source/l-dgntil.cc
Examining data/crawl-0.25.1/source/cio.h
Examining data/crawl-0.25.1/source/tilereg-map.cc
Examining data/crawl-0.25.1/source/spl-tornado.cc
Examining data/crawl-0.25.1/source/map-knowledge.cc
Examining data/crawl-0.25.1/source/god-item.h
Examining data/crawl-0.25.1/source/pattern.h
Examining data/crawl-0.25.1/source/spl-util.cc
Examining data/crawl-0.25.1/source/coord-circle.cc
Examining data/crawl-0.25.1/source/mutation.h
Examining data/crawl-0.25.1/source/wcwidth.cc
Examining data/crawl-0.25.1/source/tilereg-doll.cc
Examining data/crawl-0.25.1/source/mon-pick-data.h
Examining data/crawl-0.25.1/source/holy-word-source-type.h
Examining data/crawl-0.25.1/source/mutation-data.h
Examining data/crawl-0.25.1/source/threads.h
Examining data/crawl-0.25.1/source/tilereg-text.h
Examining data/crawl-0.25.1/source/mutant-beast.h
Examining data/crawl-0.25.1/source/tiledoll.h
Examining data/crawl-0.25.1/source/windowmanager-sdl.h
Examining data/crawl-0.25.1/source/spell-type.h
Examining data/crawl-0.25.1/source/describe-god.cc
Examining data/crawl-0.25.1/source/mon-data.h
Examining data/crawl-0.25.1/source/scroller.cc
Examining data/crawl-0.25.1/source/flang-t.h
Examining data/crawl-0.25.1/source/tilesdl.cc
Examining data/crawl-0.25.1/source/matrix.h
Examining data/crawl-0.25.1/source/dgn-shoals.cc
Examining data/crawl-0.25.1/source/butcher.h
Examining data/crawl-0.25.1/source/god-passive.h
Examining data/crawl-0.25.1/source/player-stats.cc
Examining data/crawl-0.25.1/source/terrain.cc
Examining data/crawl-0.25.1/source/startup.h
Examining data/crawl-0.25.1/source/bitary.h
Examining data/crawl-0.25.1/source/god-blessing.h
Examining data/crawl-0.25.1/source/tilemcache.h
Examining data/crawl-0.25.1/source/libw32c.cc
Examining data/crawl-0.25.1/source/wiz-fsim.cc
Examining data/crawl-0.25.1/source/describe-spells.h
Examining data/crawl-0.25.1/source/mon-act.h
Examining data/crawl-0.25.1/source/tilereg-grid.cc
Examining data/crawl-0.25.1/source/windowmanager.h
Examining data/crawl-0.25.1/source/evoke.h
Examining data/crawl-0.25.1/source/coordit.h
Examining data/crawl-0.25.1/source/god-companions.h
Examining data/crawl-0.25.1/source/outer-menu.h
Examining data/crawl-0.25.1/source/targ-mode-type.h
Examining data/crawl-0.25.1/source/losparam.cc
Examining data/crawl-0.25.1/source/pcg.cc
Examining data/crawl-0.25.1/source/spl-wpnench.h
Examining data/crawl-0.25.1/source/losparam.h
Examining data/crawl-0.25.1/source/wiz-you.h
Examining data/crawl-0.25.1/source/text-tag-type.h
Examining data/crawl-0.25.1/source/place-info.h
Examining data/crawl-0.25.1/source/AppHdr.h
Examining data/crawl-0.25.1/source/beam.cc
Examining data/crawl-0.25.1/source/l-you.cc
Examining data/crawl-0.25.1/source/enchant-type.h
Examining data/crawl-0.25.1/source/branch-data.h
Examining data/crawl-0.25.1/source/cluautil.cc
Examining data/crawl-0.25.1/source/spl-book.h
Examining data/crawl-0.25.1/source/wiz-dump.h
Examining data/crawl-0.25.1/source/playable.h
Examining data/crawl-0.25.1/source/sprint.cc
Examining data/crawl-0.25.1/source/l-crawl.cc
Examining data/crawl-0.25.1/source/terrain-change-type.h
Examining data/crawl-0.25.1/source/nearby-danger.cc
Examining data/crawl-0.25.1/source/wiz-dgn.h
Examining data/crawl-0.25.1/source/domino.cc
Examining data/crawl-0.25.1/source/god-passive.cc
Examining data/crawl-0.25.1/source/abyss.cc
Examining data/crawl-0.25.1/source/ouch.h
Examining data/crawl-0.25.1/source/cursor-type.h
Examining data/crawl-0.25.1/source/player-equip.h
Examining data/crawl-0.25.1/source/mon-project.cc
Examining data/crawl-0.25.1/source/spl-other.cc
Examining data/crawl-0.25.1/source/tilereg-cmd.cc
Examining data/crawl-0.25.1/source/l-mapgrd.cc
Examining data/crawl-0.25.1/source/tilereg-spl.h
Examining data/crawl-0.25.1/source/ng-init.cc
Examining data/crawl-0.25.1/source/mon-attitude-type.h
Examining data/crawl-0.25.1/source/worley.h
Examining data/crawl-0.25.1/source/player-reacts.h
Examining data/crawl-0.25.1/source/decks.cc
Examining data/crawl-0.25.1/source/tilereg-spl.cc
Examining data/crawl-0.25.1/source/form-data.h
Examining data/crawl-0.25.1/source/transform.cc
Examining data/crawl-0.25.1/source/pronoun-type.h
Examining data/crawl-0.25.1/source/mon-poly.cc
Examining data/crawl-0.25.1/source/random.cc
Examining data/crawl-0.25.1/source/ability.cc
Examining data/crawl-0.25.1/source/mon-tentacle.cc
Examining data/crawl-0.25.1/source/tilereg-map.h
Examining data/crawl-0.25.1/source/coord-circle.h
Examining data/crawl-0.25.1/source/god-type.h
Examining data/crawl-0.25.1/source/item-prop-enum.h
Examining data/crawl-0.25.1/source/place.h
Examining data/crawl-0.25.1/source/libunix.h
Examining data/crawl-0.25.1/source/feature.cc
Examining data/crawl-0.25.1/source/tilefont.cc
Examining data/crawl-0.25.1/source/viewchar.h
Examining data/crawl-0.25.1/source/glwrapper-ogl.cc
Examining data/crawl-0.25.1/source/dbg-util.h
Examining data/crawl-0.25.1/source/species-def.h
Examining data/crawl-0.25.1/source/teleport.h
Examining data/crawl-0.25.1/source/timed-effects.h
Examining data/crawl-0.25.1/source/tilemcache.cc
Examining data/crawl-0.25.1/source/spl-pick.cc
Examining data/crawl-0.25.1/source/species.cc
Examining data/crawl-0.25.1/source/tag-pref.h
Examining data/crawl-0.25.1/source/activity-interrupt-type.h
Examining data/crawl-0.25.1/source/spl-summoning.cc
Examining data/crawl-0.25.1/source/ng-restr.cc
Examining data/crawl-0.25.1/source/wizard.cc
Examining data/crawl-0.25.1/source/stairs.cc
Examining data/crawl-0.25.1/source/tilereg-dgn.cc
Examining data/crawl-0.25.1/source/xp-evoker-data.h
Examining data/crawl-0.25.1/source/religion.cc
Examining data/crawl-0.25.1/source/tiledoll.cc
Examining data/crawl-0.25.1/source/mapmark.cc
Examining data/crawl-0.25.1/source/format.h
Examining data/crawl-0.25.1/source/sense-type.h
Examining data/crawl-0.25.1/source/book-type.h
Examining data/crawl-0.25.1/source/ghost.cc
Examining data/crawl-0.25.1/source/shop-type.h
Examining data/crawl-0.25.1/source/kills.h
Examining data/crawl-0.25.1/source/map-feature.h
Examining data/crawl-0.25.1/source/view.h
Examining data/crawl-0.25.1/source/startup.cc
Examining data/crawl-0.25.1/source/unwind.h
Examining data/crawl-0.25.1/source/l-spells.cc
Examining data/crawl-0.25.1/source/lev-pand.cc
Examining data/crawl-0.25.1/source/tileweb-text.h
Examining data/crawl-0.25.1/source/coord.h
Examining data/crawl-0.25.1/source/format.cc
Examining data/crawl-0.25.1/source/mon-spell.h
Examining data/crawl-0.25.1/source/dgn-swamp.h
Examining data/crawl-0.25.1/source/lang-fake.cc
Examining data/crawl-0.25.1/source/jobs.h
Examining data/crawl-0.25.1/source/xom.h
Examining data/crawl-0.25.1/source/unicode.h
Examining data/crawl-0.25.1/source/tiledgnbuf.h
Examining data/crawl-0.25.1/source/l-dgnbld.cc
Examining data/crawl-0.25.1/source/ui-scissor.h
Examining data/crawl-0.25.1/source/tilereg-tab.cc
Examining data/crawl-0.25.1/source/tilereg-grid.h
Examining data/crawl-0.25.1/source/mon-speak.cc
Examining data/crawl-0.25.1/source/windowmanager-sdl.cc
Examining data/crawl-0.25.1/source/l-dgn.cc
Examining data/crawl-0.25.1/source/l-feat.cc
Examining data/crawl-0.25.1/source/fixedarray.h
Examining data/crawl-0.25.1/source/maybe-bool.h
Examining data/crawl-0.25.1/source/colour.h
Examining data/crawl-0.25.1/source/dgn-overview.cc
Examining data/crawl-0.25.1/source/wiz-item.h
Examining data/crawl-0.25.1/source/tilereg-mon.h
Examining data/crawl-0.25.1/source/map-marker-type.h
Examining data/crawl-0.25.1/source/command.h
Examining data/crawl-0.25.1/source/god-abil.h
Examining data/crawl-0.25.1/source/description-level-type.h
Examining data/crawl-0.25.1/source/mgen-data.h
Examining data/crawl-0.25.1/source/geom2d.cc
Examining data/crawl-0.25.1/source/clua.h
Examining data/crawl-0.25.1/source/libconsole.h
Examining data/crawl-0.25.1/source/operation-types.h
Examining data/crawl-0.25.1/source/l-los.cc
Examining data/crawl-0.25.1/source/stringutil.cc
Examining data/crawl-0.25.1/source/tileweb-text.cc
Examining data/crawl-0.25.1/source/potion-type.h
Examining data/crawl-0.25.1/source/libutil.cc
Examining data/crawl-0.25.1/source/art-func.h
Examining data/crawl-0.25.1/source/fontwrapper-ft.cc
Examining data/crawl-0.25.1/source/glwrapper.h
Examining data/crawl-0.25.1/source/wiz-fsim.h
Examining data/crawl-0.25.1/source/dgn-irregular-box.h
Examining data/crawl-0.25.1/source/tilereg-inv.h
Examining data/crawl-0.25.1/source/tilereg-cmd.h
Examining data/crawl-0.25.1/source/size-part-type.h
Examining data/crawl-0.25.1/source/message.cc
Examining data/crawl-0.25.1/source/unique-item-status-type.h
Examining data/crawl-0.25.1/source/crash.h
Examining data/crawl-0.25.1/source/cio.cc
Examining data/crawl-0.25.1/source/species.h
Examining data/crawl-0.25.1/source/god-companions.cc
Examining data/crawl-0.25.1/source/command.cc
Examining data/crawl-0.25.1/source/coord-def.h
Examining data/crawl-0.25.1/source/outer-menu.cc
Examining data/crawl-0.25.1/source/stash.h
Examining data/crawl-0.25.1/source/level-id.h
Examining data/crawl-0.25.1/source/tilereg-abl.cc
Examining data/crawl-0.25.1/source/ranged-attack.h
Examining data/crawl-0.25.1/source/arena.h
Examining data/crawl-0.25.1/source/files.h
Examining data/crawl-0.25.1/source/lookup-help.h
Examining data/crawl-0.25.1/source/item-use.h
Examining data/crawl-0.25.1/source/zap-data.h
Examining data/crawl-0.25.1/source/mon-abil.cc
Examining data/crawl-0.25.1/source/AppHdr.cc
Examining data/crawl-0.25.1/source/platform.h
Examining data/crawl-0.25.1/source/uncancel.cc
Examining data/crawl-0.25.1/source/mon-grow.h
Examining data/crawl-0.25.1/source/noise.h
Examining data/crawl-0.25.1/source/cloud-type.h
Examining data/crawl-0.25.1/source/tileweb.h
Examining data/crawl-0.25.1/source/ng-wanderer.h
Examining data/crawl-0.25.1/source/tileview.cc
Examining data/crawl-0.25.1/source/prebuilt/levcomp.tab.h
Examining data/crawl-0.25.1/source/prebuilt/levcomp.lex.cc
Examining data/crawl-0.25.1/source/prebuilt/levcomp.tab.cc
Examining data/crawl-0.25.1/source/dbg-maps.cc
Examining data/crawl-0.25.1/source/syscalls.cc
Examining data/crawl-0.25.1/source/lang-t.h
Examining data/crawl-0.25.1/source/tilereg-text.cc
Examining data/crawl-0.25.1/source/ng-init.h
Examining data/crawl-0.25.1/source/mon-pathfind.cc
Examining data/crawl-0.25.1/source/hunger-state-t.h
Examining data/crawl-0.25.1/source/perlin.h
Examining data/crawl-0.25.1/source/tags.cc
Examining data/crawl-0.25.1/source/clua.cc
Examining data/crawl-0.25.1/source/files.cc
Examining data/crawl-0.25.1/source/tileview.h
Examining data/crawl-0.25.1/source/l-debug.cc
Examining data/crawl-0.25.1/source/random.h
Examining data/crawl-0.25.1/source/ng-setup.cc
Examining data/crawl-0.25.1/source/eq-type-flags.h
Examining data/crawl-0.25.1/source/spl-zap.cc
Examining data/crawl-0.25.1/source/stat-type.h
Examining data/crawl-0.25.1/source/spl-damage.cc
Examining data/crawl-0.25.1/source/item-name.h
Examining data/crawl-0.25.1/source/dungeon-char-type.h
Examining data/crawl-0.25.1/source/l-libs.h
Examining data/crawl-0.25.1/source/mon-transit.h
Examining data/crawl-0.25.1/source/json-wrapper.h
Examining data/crawl-0.25.1/source/dbg-objstat.cc
Examining data/crawl-0.25.1/source/spl-transloc.h
Examining data/crawl-0.25.1/source/luaterp.cc
Examining data/crawl-0.25.1/source/evoke.cc
Examining data/crawl-0.25.1/source/recite-eligibility.h
Examining data/crawl-0.25.1/source/feature.h
Examining data/crawl-0.25.1/source/mon-behv.h
Examining data/crawl-0.25.1/source/mon-cast.cc
Examining data/crawl-0.25.1/source/target-compass.cc
Examining data/crawl-0.25.1/source/prompt.cc
Examining data/crawl-0.25.1/source/end.cc
Examining data/crawl-0.25.1/source/melee-attack.cc
Examining data/crawl-0.25.1/source/monster.h
Examining data/crawl-0.25.1/source/skill-menu.h
Examining data/crawl-0.25.1/source/mon-gear.cc
Examining data/crawl-0.25.1/source/wiz-you.cc
Examining data/crawl-0.25.1/source/dgn-event.cc
Examining data/crawl-0.25.1/source/makeitem.cc
Examining data/crawl-0.25.1/source/branch.h
Examining data/crawl-0.25.1/source/l-travel.cc
Examining data/crawl-0.25.1/source/object-class-type.h
Examining data/crawl-0.25.1/source/output.cc
Examining data/crawl-0.25.1/source/MSVC/stdint.h
Examining data/crawl-0.25.1/source/MSVC/include/unistd.h
Examining data/crawl-0.25.1/source/MSVC/include/stdint.h
Examining data/crawl-0.25.1/source/MSVC/include/dirent.h
Examining data/crawl-0.25.1/source/MSVC/include/getopt.h
Examining data/crawl-0.25.1/source/MSVC/include/sys/param.h
Examining data/crawl-0.25.1/source/MSVC/include/inttypes.h
Examining data/crawl-0.25.1/source/MSVC/inttypes.h
Examining data/crawl-0.25.1/source/orb.cc
Examining data/crawl-0.25.1/source/newgame.h
Examining data/crawl-0.25.1/source/tiles-build-specific.h
Examining data/crawl-0.25.1/source/tile-flags.h
Examining data/crawl-0.25.1/source/skill-focus-mode.h
Examining data/crawl-0.25.1/source/mon-ench.h
Examining data/crawl-0.25.1/source/hints.cc
Examining data/crawl-0.25.1/source/dbg-asrt.cc
Examining data/crawl-0.25.1/source/colour.cc
Examining data/crawl-0.25.1/source/mon-speak.h
Examining data/crawl-0.25.1/source/mon-pathfind.h
Examining data/crawl-0.25.1/source/gender-type.h
Examining data/crawl-0.25.1/source/viewgeom.cc
Examining data/crawl-0.25.1/source/acquire.cc
Examining data/crawl-0.25.1/source/game-exit-type.h
Examining data/crawl-0.25.1/source/known-items.h
Examining data/crawl-0.25.1/source/xom.cc
Examining data/crawl-0.25.1/source/los-def.cc
Examining data/crawl-0.25.1/source/item-type-id-state-type.h
Examining data/crawl-0.25.1/source/adjust.cc
Examining data/crawl-0.25.1/source/mon-enum.h
Examining data/crawl-0.25.1/source/fight.cc
Examining data/crawl-0.25.1/source/env.h
Examining data/crawl-0.25.1/source/ng-wanderer.cc
Examining data/crawl-0.25.1/source/shout.cc
Examining data/crawl-0.25.1/source/tilereg.h
Examining data/crawl-0.25.1/source/dgn-proclayouts.cc
Examining data/crawl-0.25.1/source/ghost.h
Examining data/crawl-0.25.1/source/mon-movetarget.h
Examining data/crawl-0.25.1/source/place-info.cc
Examining data/crawl-0.25.1/source/shout.h
Examining data/crawl-0.25.1/source/tilepick.cc
Examining data/crawl-0.25.1/source/describe-spells.cc
Examining data/crawl-0.25.1/source/tilereg-skl.cc
Examining data/crawl-0.25.1/source/props.h
Examining data/crawl-0.25.1/source/ray.cc
Examining data/crawl-0.25.1/source/tilecell.cc
Examining data/crawl-0.25.1/source/spl-goditem.cc
Examining data/crawl-0.25.1/source/losglobal.h
Examining data/crawl-0.25.1/source/kills.cc
Examining data/crawl-0.25.1/source/ctest.cc
Examining data/crawl-0.25.1/source/showsymb.h
Examining data/crawl-0.25.1/source/target.cc
Examining data/crawl-0.25.1/source/spl-summoning.h
Examining data/crawl-0.25.1/source/rot.h
Examining data/crawl-0.25.1/source/throw.cc
Examining data/crawl-0.25.1/source/l-moninf.cc
Examining data/crawl-0.25.1/source/message-stream.cc
Examining data/crawl-0.25.1/source/targeting-type.h
Examining data/crawl-0.25.1/source/mapdef.h
Examining data/crawl-0.25.1/source/tilecell.h
Examining data/crawl-0.25.1/source/xp-tracking-type.h
Examining data/crawl-0.25.1/source/mon-movetarget.cc
Examining data/crawl-0.25.1/source/confirm-prompt-type.h
Examining data/crawl-0.25.1/source/adjust.h
Examining data/crawl-0.25.1/source/stepdown.h
Examining data/crawl-0.25.1/source/macro.h
Examining data/crawl-0.25.1/source/equipment-type.h
Examining data/crawl-0.25.1/source/god-blessing.cc
Examining data/crawl-0.25.1/source/cluautil.h
Examining data/crawl-0.25.1/source/conduct-type.h
Examining data/crawl-0.25.1/source/transformation.h
Examining data/crawl-0.25.1/source/god-menu.cc
Examining data/crawl-0.25.1/source/dactions.cc
Examining data/crawl-0.25.1/source/spl-selfench.h
Examining data/crawl-0.25.1/source/tilereg-crt.h
Examining data/crawl-0.25.1/source/wizard-option-type.h
Examining data/crawl-0.25.1/source/kill-category.h
Examining data/crawl-0.25.1/source/melee-attack.h
Examining data/crawl-0.25.1/source/mon-death.cc
Examining data/crawl-0.25.1/source/filter-enum.h
Examining data/crawl-0.25.1/source/pattern.cc
Examining data/crawl-0.25.1/source/spl-book.cc
Examining data/crawl-0.25.1/source/initfile.cc
Examining data/crawl-0.25.1/source/playable.cc
Examining data/crawl-0.25.1/source/skill-menu-state.h
Examining data/crawl-0.25.1/source/dgn-proclayouts.h
Examining data/crawl-0.25.1/source/state.h
Examining data/crawl-0.25.1/source/mon-cast.h
Examining data/crawl-0.25.1/source/dgn-layouts.cc
Examining data/crawl-0.25.1/source/loading-screen.h
Examining data/crawl-0.25.1/source/god-conduct.cc
Examining data/crawl-0.25.1/source/ability-type.h
Examining data/crawl-0.25.1/source/wiz-mon.cc
Examining data/crawl-0.25.1/source/attribute-type.h
Examining data/crawl-0.25.1/source/randbook.cc
Examining data/crawl-0.25.1/source/acquire.h
Examining data/crawl-0.25.1/source/mon-poly.h
Examining data/crawl-0.25.1/source/mgen-enum.h
Examining data/crawl-0.25.1/source/artefact.cc
Examining data/crawl-0.25.1/source/message.h
Examining data/crawl-0.25.1/source/god-item.cc
Examining data/crawl-0.25.1/source/fight.h
Examining data/crawl-0.25.1/source/show.cc
Examining data/crawl-0.25.1/source/mutation.cc
Examining data/crawl-0.25.1/source/chardump.cc
Examining data/crawl-0.25.1/source/bitary.cc
Examining data/crawl-0.25.1/source/tilebuf.cc
Examining data/crawl-0.25.1/source/mon-abil.h
Examining data/crawl-0.25.1/source/l-mapmrk.cc
Examining data/crawl-0.25.1/source/player-stats.h
Examining data/crawl-0.25.1/source/l-item.cc
Examining data/crawl-0.25.1/source/invent.h
Examining data/crawl-0.25.1/source/seen-context-type.h
Examining data/crawl-0.25.1/source/job-type.h
Examining data/crawl-0.25.1/source/sound.h
Examining data/crawl-0.25.1/source/tilereg-msg.cc
Examining data/crawl-0.25.1/source/dbg-objstat.h
Examining data/crawl-0.25.1/source/tilereg-mem.h
Examining data/crawl-0.25.1/source/skills.cc
Examining data/crawl-0.25.1/source/tiletex.h
Examining data/crawl-0.25.1/source/spl-damage.h
Examining data/crawl-0.25.1/source/main.cc
Examining data/crawl-0.25.1/source/tilereg-stat.cc
Examining data/crawl-0.25.1/source/pcg.h
Examining data/crawl-0.25.1/source/l-dgnlvl.cc
Examining data/crawl-0.25.1/source/dbg-util.cc
Examining data/crawl-0.25.1/source/attitude-change.h
Examining data/crawl-0.25.1/source/ng-input.cc
Examining data/crawl-0.25.1/source/sacrifice-data.h
Examining data/crawl-0.25.1/source/l-defs.h
Examining data/crawl-0.25.1/source/chardump.h
Examining data/crawl-0.25.1/source/spl-miscast.cc
Examining data/crawl-0.25.1/source/actor.cc
Examining data/crawl-0.25.1/source/notes.h
Examining data/crawl-0.25.1/source/dungeon-feature-type.h
Examining data/crawl-0.25.1/source/zap-type.h
Examining data/crawl-0.25.1/source/item-status-flag-type.h
Examining data/crawl-0.25.1/source/tilereg-doll.h
Examining data/crawl-0.25.1/source/traps.h
Examining data/crawl-0.25.1/source/menu.h
Examining data/crawl-0.25.1/source/state.cc
Examining data/crawl-0.25.1/source/english.cc
Examining data/crawl-0.25.1/source/mon-transit.cc
Examining data/crawl-0.25.1/source/tilereg-mem.cc
Examining data/crawl-0.25.1/source/tiles.h
Examining data/crawl-0.25.1/source/ability.h
Examining data/crawl-0.25.1/source/decks.h
Examining data/crawl-0.25.1/source/jobs.cc
Examining data/crawl-0.25.1/source/notes.cc
Examining data/crawl-0.25.1/source/tilereg-inv.cc
Examining data/crawl-0.25.1/source/end.h
Examining data/crawl-0.25.1/source/duration-type.h
Examining data/crawl-0.25.1/source/mon-inv-type.h
Examining data/crawl-0.25.1/source/geom2d.h
Examining data/crawl-0.25.1/source/dgn-swamp.cc
Examining data/crawl-0.25.1/source/dgn-delve.cc
Examining data/crawl-0.25.1/source/canned-message-type.h
Examining data/crawl-0.25.1/source/act-iter.cc
Examining data/crawl-0.25.1/source/json.h
Examining data/crawl-0.25.1/source/describe.h
Examining data/crawl-0.25.1/source/mon-death.h
Examining data/crawl-0.25.1/source/version.cc
Examining data/crawl-0.25.1/source/dbg-maps.h
Examining data/crawl-0.25.1/source/mutation-type.h
Examining data/crawl-0.25.1/source/branch-data-json.cc
Examining data/crawl-0.25.1/source/areas.cc
Examining data/crawl-0.25.1/source/initfile.h
Examining data/crawl-0.25.1/source/timed-effects.cc
Examining data/crawl-0.25.1/source/fprop.h
Examining data/crawl-0.25.1/source/items.h
Examining data/crawl-0.25.1/source/makeitem.h
Examining data/crawl-0.25.1/source/dgn-overview.h
Examining data/crawl-0.25.1/source/ray.h
Examining data/crawl-0.25.1/source/branch-type.h
Examining data/crawl-0.25.1/source/l-food.cc
Examining data/crawl-0.25.1/source/spl-data.h
Examining data/crawl-0.25.1/source/tilereg-tab.h
Examining data/crawl-0.25.1/source/known-items.cc
Examining data/crawl-0.25.1/source/showsymb.cc
Examining data/crawl-0.25.1/source/l-dgngrd.cc
Examining data/crawl-0.25.1/source/reach-type.h
Examining data/crawl-0.25.1/source/monster-type.h
Examining data/crawl-0.25.1/source/json.cc
Examining data/crawl-0.25.1/source/tilereg-skl.h
Examining data/crawl-0.25.1/source/mon-pick.h
Examining data/crawl-0.25.1/source/luaterp.h
Examining data/crawl-0.25.1/source/dgn-event.h
Examining data/crawl-0.25.1/source/spl-monench.cc
Examining data/crawl-0.25.1/source/arena.cc
Examining data/crawl-0.25.1/source/god-abil.cc
Examining data/crawl-0.25.1/source/hiscores.cc
Examining data/crawl-0.25.1/source/spl-goditem.h
Examining data/crawl-0.25.1/source/player-equip.cc
Examining data/crawl-0.25.1/source/fprop.cc
Examining data/crawl-0.25.1/source/mon-act.cc
Examining data/crawl-0.25.1/source/god-prayer.cc
Examining data/crawl-0.25.1/source/dgn-irregular-box.cc
Examining data/crawl-0.25.1/source/spl-clouds.cc
Examining data/crawl-0.25.1/source/tilepick-p.cc
Examining data/crawl-0.25.1/source/sprint.h
Examining data/crawl-0.25.1/source/tilereg-dgn.h
Examining data/crawl-0.25.1/source/beh-type.h
Examining data/crawl-0.25.1/source/externs.h
Examining data/crawl-0.25.1/source/tileweb.cc
Examining data/crawl-0.25.1/source/death-curse.cc
Examining data/crawl-0.25.1/source/caction-type.h
Examining data/crawl-0.25.1/source/spl-wpnench.cc
Examining data/crawl-0.25.1/source/msvc.h
Examining data/crawl-0.25.1/source/dungeon.h
Examining data/crawl-0.25.1/source/hash.cc
Examining data/crawl-0.25.1/source/mon-place.cc
Examining data/crawl-0.25.1/source/act-iter.h
Examining data/crawl-0.25.1/source/tags.h
Examining data/crawl-0.25.1/source/quiver.h
Examining data/crawl-0.25.1/source/los.cc
Examining data/crawl-0.25.1/source/ui.cc
Examining data/crawl-0.25.1/source/enum.h
Examining data/crawl-0.25.1/source/libgui.cc
Examining data/crawl-0.25.1/source/coordit.cc
Examining data/crawl-0.25.1/source/KeymapContext.h
Examining data/crawl-0.25.1/source/ctest.h
Examining data/crawl-0.25.1/source/item-name.cc
Examining data/crawl-0.25.1/source/attack.cc
Examining data/crawl-0.25.1/source/throw.h
Examining data/crawl-0.25.1/source/version.h
Examining data/crawl-0.25.1/source/los-type.h
Examining data/crawl-0.25.1/source/bloodspatter.cc
Examining data/crawl-0.25.1/source/ng-init-branches.cc
Examining data/crawl-0.25.1/source/tag-version.h
Examining data/crawl-0.25.1/source/movement.h
Examining data/crawl-0.25.1/source/wiz-mon.h
Examining data/crawl-0.25.1/source/item-use.cc
Examining data/crawl-0.25.1/source/menu.cc
Examining data/crawl-0.25.1/source/mon-gear.h
Examining data/crawl-0.25.1/source/loading-screen.cc
Examining data/crawl-0.25.1/source/exercise.cc
Examining data/crawl-0.25.1/source/screen-mode.h
Examining data/crawl-0.25.1/source/cloud.h
Examining data/crawl-0.25.1/source/dgn-height.h
Examining data/crawl-0.25.1/source/describe.cc
Examining data/crawl-0.25.1/source/rot.cc
Examining data/crawl-0.25.1/source/hints.h
Examining data/crawl-0.25.1/source/trap-def.h
Examining data/crawl-0.25.1/source/perlin.cc
Examining data/crawl-0.25.1/source/newgame-def.h
Examining data/crawl-0.25.1/source/mon-flags.h
Examining data/crawl-0.25.1/source/ng-input.h
Examining data/crawl-0.25.1/source/spl-zap.h
Examining data/crawl-0.25.1/source/mon-tentacle.h
Examining data/crawl-0.25.1/source/nearby-danger.h
Examining data/crawl-0.25.1/source/tilereg-mon.cc
Examining data/crawl-0.25.1/source/attack.h
Examining data/crawl-0.25.1/source/errors.h
Examining data/crawl-0.25.1/source/random-var.cc
Examining data/crawl-0.25.1/source/sound.cc
Examining data/crawl-0.25.1/source/mon-util.cc
Examining data/crawl-0.25.1/source/orb-type.h
Examining data/crawl-0.25.1/source/ng-restr.h
Examining data/crawl-0.25.1/source/domino-data.h
Examining data/crawl-0.25.1/source/rltiles/tiledef-unrand.h
Examining data/crawl-0.25.1/source/rltiles/tool/tile.cc
Examining data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.h
Examining data/crawl-0.25.1/source/rltiles/tool/tile_colour.h
Examining data/crawl-0.25.1/source/rltiles/tool/tile_page.h
Examining data/crawl-0.25.1/source/rltiles/tool/main.cc
Examining data/crawl-0.25.1/source/rltiles/tool/tile_page.cc
Examining data/crawl-0.25.1/source/rltiles/tool/tile_colour.cc
Examining data/crawl-0.25.1/source/rltiles/tool/tile.h
Examining data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc
Examining data/crawl-0.25.1/source/rltiles/tiledef_defines.h
Examining data/crawl-0.25.1/source/spl-clouds.h
Examining data/crawl-0.25.1/source/timed-effect-type.h
Examining data/crawl-0.25.1/source/invent.cc
Examining data/crawl-0.25.1/source/job-data.h
Examining data/crawl-0.25.1/source/branch-data-json.h
Examining data/crawl-0.25.1/source/wiz-dump.cc
Examining data/crawl-0.25.1/source/lang-fake.h
Examining data/crawl-0.25.1/source/ac-type.h
Examining data/crawl-0.25.1/source/game-type.h
Examining data/crawl-0.25.1/source/viewmap.cc
Examining data/crawl-0.25.1/source/lev-pand.h
Examining data/crawl-0.25.1/source/tilepick.h
Examining data/crawl-0.25.1/source/undead-state-type.h
Examining data/crawl-0.25.1/source/book-data.h
Examining data/crawl-0.25.1/source/ng-init-branches.h
Examining data/crawl-0.25.1/source/mon-clone.h
Examining data/crawl-0.25.1/source/mapdef.cc
Examining data/crawl-0.25.1/source/deck-type.h
Examining data/crawl-0.25.1/source/spl-miscast.h
Examining data/crawl-0.25.1/source/viewmap.h
Examining data/crawl-0.25.1/source/tutorial.h
Examining data/crawl-0.25.1/source/los-def.h
Examining data/crawl-0.25.1/source/tilereg-abl.h
Examining data/crawl-0.25.1/source/spl-cast.cc
Examining data/crawl-0.25.1/source/mon-holy-type.h
Examining data/crawl-0.25.1/source/SDLMain.h
Examining data/crawl-0.25.1/source/l-mons.cc
Examining data/crawl-0.25.1/source/game-options.cc
Examining data/crawl-0.25.1/source/eq-type.h
Examining data/crawl-0.25.1/source/stairs.h
Examining data/crawl-0.25.1/source/branch.cc
Examining data/crawl-0.25.1/source/l-file.cc
Examining data/crawl-0.25.1/source/butcher.cc
Examining data/crawl-0.25.1/source/slot-select-mode.h
Examining data/crawl-0.25.1/source/hiscores.h
Examining data/crawl-0.25.1/source/areas.h
Examining data/crawl-0.25.1/source/tilereg-crt.cc
Examining data/crawl-0.25.1/source/skill-menu.cc
Examining data/crawl-0.25.1/source/precision-menu.cc
Examining data/crawl-0.25.1/source/tile-player-flag-cut.h
Examining data/crawl-0.25.1/source/orb.h
Examining data/crawl-0.25.1/source/level-state-type.h
Examining data/crawl-0.25.1/source/mon-clone.cc
Examining data/crawl-0.25.1/source/precision-menu.h
Examining data/crawl-0.25.1/source/beam.h
Examining data/crawl-0.25.1/source/map-knowledge.h
Examining data/crawl-0.25.1/source/game-chapter.h
Examining data/crawl-0.25.1/source/losglobal.cc
Examining data/crawl-0.25.1/source/potion.cc
Examining data/crawl-0.25.1/source/god-menu.h
Examining data/crawl-0.25.1/source/l-view.cc
Examining data/crawl-0.25.1/source/mon-place.h
Examining data/crawl-0.25.1/source/player-reacts.cc
Examining data/crawl-0.25.1/source/random-var.h
Examining data/crawl-0.25.1/source/cmd-keys.h
Examining data/crawl-0.25.1/source/traps.cc
Examining data/crawl-0.25.1/source/wu-jian-attack-type.h
Examining data/crawl-0.25.1/source/status.cc
Examining data/crawl-0.25.1/source/travel.cc
Examining data/crawl-0.25.1/source/tilereg-msg.h
Examining data/crawl-0.25.1/source/fake-main.hpp
Examining data/crawl-0.25.1/source/database.cc
Examining data/crawl-0.25.1/source/mon-info.h
Examining data/crawl-0.25.1/source/spl-monench.h
Examining data/crawl-0.25.1/source/describe-god.h
Examining data/crawl-0.25.1/source/dgn-delve.h
Examining data/crawl-0.25.1/source/delay.h
Examining data/crawl-0.25.1/source/directn.cc
Examining data/crawl-0.25.1/source/dbg-scan.cc
Examining data/crawl-0.25.1/source/player-save-info.h
Examining data/crawl-0.25.1/source/stash.cc
Examining data/crawl-0.25.1/source/actor-los.cc
Examining data/crawl-0.25.1/source/dgl-message.h
Examining data/crawl-0.25.1/source/mon-book.h
Examining data/crawl-0.25.1/source/target-compass.h
Examining data/crawl-0.25.1/source/glwrapper-ogl.h
Examining data/crawl-0.25.1/source/store.h
Examining data/crawl-0.25.1/source/unicode.cc
Examining data/crawl-0.25.1/source/religion-enum.h
Examining data/crawl-0.25.1/source/menu-type.h
Examining data/crawl-0.25.1/source/trap-type.h
Examining data/crawl-0.25.1/source/mon-info-flag-name.h
Examining data/crawl-0.25.1/source/fontwrapper-ft.h
Examining data/crawl-0.25.1/source/newgame.cc
Examining data/crawl-0.25.1/source/glwrapper.cc
Examining data/crawl-0.25.1/source/libunix.cc
Examining data/crawl-0.25.1/source/item-def.h
Examining data/crawl-0.25.1/source/tiledgnbuf.cc
Examining data/crawl-0.25.1/source/easy-confirm-type.h
Examining data/crawl-0.25.1/source/libutil.h
Examining data/crawl-0.25.1/source/mon-behv.cc
Examining data/crawl-0.25.1/source/god-wrath.h
Examining data/crawl-0.25.1/source/ui.h
Examining data/crawl-0.25.1/source/tutorial.cc
Examining data/crawl-0.25.1/source/command-type.h
Examining data/crawl-0.25.1/source/status.h
Examining data/crawl-0.25.1/source/defines.h
Examining data/crawl-0.25.1/source/libw32c.h
Examining data/crawl-0.25.1/source/fineff.cc
Examining data/crawl-0.25.1/source/l-colour.cc
Examining data/crawl-0.25.1/source/tile-player-flags.h
Examining data/crawl-0.25.1/source/recite-type.h
Examining data/crawl-0.25.1/source/beam-type.h
Examining data/crawl-0.25.1/source/dactions.h
Examining data/crawl-0.25.1/source/daction-type.h
Examining data/crawl-0.25.1/source/killer-type.h
Examining data/crawl-0.25.1/source/sqldbm.h
Examining data/crawl-0.25.1/source/food.cc
Examining data/crawl-0.25.1/source/los.h
Examining data/crawl-0.25.1/source/cleansing-flame-source-type.h
Examining data/crawl-0.25.1/source/dlua.h
Examining data/crawl-0.25.1/source/viewgeom.h
Examining data/crawl-0.25.1/source/cloud.cc
Examining data/crawl-0.25.1/source/ranged-attack.cc
Examining data/crawl-0.25.1/source/mon-ench.cc
Examining data/crawl-0.25.1/source/util/fake_pty.c
Examining data/crawl-0.25.1/source/util/monster/monster-main.cc
Examining data/crawl-0.25.1/source/mon-project.h
Examining data/crawl-0.25.1/source/transform.h
Examining data/crawl-0.25.1/source/l-dgnevt.cc
Examining data/crawl-0.25.1/source/religion.h
Examining data/crawl-0.25.1/source/crash.cc
Examining data/crawl-0.25.1/source/mpr.h
Examining data/crawl-0.25.1/source/dgn-height.cc
Examining data/crawl-0.25.1/source/l-subvault.cc
Examining data/crawl-0.25.1/source/mapmark.h
Examining data/crawl-0.25.1/source/fixedvector.h
Examining data/crawl-0.25.1/source/stringutil.h
Examining data/crawl-0.25.1/source/ouch.cc
Examining data/crawl-0.25.1/source/place.cc
Examining data/crawl-0.25.1/source/uncancellable-type.h
Examining data/crawl-0.25.1/source/disable-type.h
Examining data/crawl-0.25.1/source/dgn-layouts.h
Examining data/crawl-0.25.1/source/maps.h
Examining data/crawl-0.25.1/source/confirm-butcher-type.h
Examining data/crawl-0.25.1/source/bloodspatter.h
Examining data/crawl-0.25.1/source/mon-pick.cc
Examining data/crawl-0.25.1/source/monster.cc
Examining data/crawl-0.25.1/source/tilefont.h
Examining data/crawl-0.25.1/source/item-prop.h
Examining data/crawl-0.25.1/source/fearmonger.cc
Examining data/crawl-0.25.1/source/lookup-help.cc
Examining data/crawl-0.25.1/source/l-option.cc
Examining data/crawl-0.25.1/source/l-dgnit.cc
Examining data/crawl-0.25.1/source/tiletex.cc
Examining data/crawl-0.25.1/source/spl-selfench.cc
Examining data/crawl-0.25.1/source/misc.cc
Examining data/crawl-0.25.1/source/show.h
Examining data/crawl-0.25.1/source/spl-pick.h
Examining data/crawl-0.25.1/source/exercise.h
Examining data/crawl-0.25.1/source/torment-source-type.h
Examining data/crawl-0.25.1/source/package.h
Examining data/crawl-0.25.1/source/shopping.cc
Examining data/crawl-0.25.1/source/score-format-type.h
Examining data/crawl-0.25.1/source/god-conduct.h
Examining data/crawl-0.25.1/source/char-set-type.h
Examining data/crawl-0.25.1/source/god-prayer.h
Examining data/crawl-0.25.1/source/sqldbm.cc
Examining data/crawl-0.25.1/source/god-wrath.cc
Examining data/crawl-0.25.1/source/scroller.h
Examining data/crawl-0.25.1/source/behold.cc
Examining data/crawl-0.25.1/source/view.cc
Examining data/crawl-0.25.1/source/dungeon.cc
Examining data/crawl-0.25.1/source/viewchar.cc
Examining data/crawl-0.25.1/source/misc.h
Examining data/crawl-0.25.1/source/terrain.h
Examining data/crawl-0.25.1/source/player.cc
Examining data/crawl-0.25.1/source/tilereg-stat.h
Examining data/crawl-0.25.1/source/syscalls.h
Examining data/crawl-0.25.1/source/options.h
Examining data/crawl-0.25.1/source/skill-type.h
Examining data/crawl-0.25.1/source/errors.cc
Examining data/crawl-0.25.1/source/spl-cast.h
Examining data/crawl-0.25.1/source/output.h
Examining data/crawl-0.25.1/source/flood-find.h
Examining data/crawl-0.25.1/source/ng-setup.h
Examining data/crawl-0.25.1/source/duration-data.h
Examining data/crawl-0.25.1/source/delay.cc
Examining data/crawl-0.25.1/source/tilereg.cc
Examining data/crawl-0.25.1/source/macro.cc
Examining data/crawl-0.25.1/source/movement.cc
Examining data/crawl-0.25.1/source/tilesdl.h
Examining data/crawl-0.25.1/source/food.h
Examining data/crawl-0.25.1/source/maps.cc
Examining data/crawl-0.25.1/source/player.h
Examining data/crawl-0.25.1/source/skills.h
Examining data/crawl-0.25.1/source/attitude-change.cc
Examining data/crawl-0.25.1/source/target.h
Examining data/crawl-0.25.1/source/items.cc
Examining data/crawl-0.25.1/source/dgl-message.cc
Examining data/crawl-0.25.1/source/energy-use-type.h
Examining data/crawl-0.25.1/source/wizard.h
Examining data/crawl-0.25.1/source/l-dgnmon.cc
Examining data/crawl-0.25.1/source/catch2-tests/test_viewmap.cc
Examining data/crawl-0.25.1/source/catch2-tests/test_items.cc
Examining data/crawl-0.25.1/source/catch2-tests/test_main.cc
Examining data/crawl-0.25.1/source/catch2-tests/test_species.cc
Examining data/crawl-0.25.1/source/catch2-tests/test_player_fixture.h
Examining data/crawl-0.25.1/source/catch2-tests/test_ui.cc
Examining data/crawl-0.25.1/source/catch2-tests/test_player.cc
Examining data/crawl-0.25.1/source/catch2-tests/test_player_fixture.cc
Examining data/crawl-0.25.1/source/catch2-tests/catch.hpp
Examining data/crawl-0.25.1/source/catch2-tests/test_mon-util.cc
Examining data/crawl-0.25.1/source/catch2-tests/test_tags.cc
Examining data/crawl-0.25.1/source/catch2-tests/test_files.cc
Examining data/crawl-0.25.1/source/catch2-tests/test_randbook.cc
Examining data/crawl-0.25.1/source/catch2-tests/test_branch.cc
Examining data/crawl-0.25.1/source/catch2-tests/test_english.cc
Examining data/crawl-0.25.1/source/catch2-tests/test_ng-init-branches.cc
Examining data/crawl-0.25.1/source/dgn-shoals.h
Examining data/crawl-0.25.1/source/feature-data.h
Examining data/crawl-0.25.1/source/prompt.h
Examining data/crawl-0.25.1/source/dbg-scan.h
Examining data/crawl-0.25.1/source/random-pick.h
Examining data/crawl-0.25.1/source/hash.h
Examining data/crawl-0.25.1/source/wiz-item.cc
Examining data/crawl-0.25.1/source/montravel-target-type.h
Examining data/crawl-0.25.1/source/potion.h
Examining data/crawl-0.25.1/source/exclude.cc
Examining data/crawl-0.25.1/source/debug.h
Examining data/crawl-0.25.1/source/coord.cc
Examining data/crawl-0.25.1/source/endianness.h
Examining data/crawl-0.25.1/source/quiver.cc
Examining data/crawl-0.25.1/source/mon-info.cc
Examining data/crawl-0.25.1/source/shopping.h
Examining data/crawl-0.25.1/source/wiz-dgn.cc
Examining data/crawl-0.25.1/source/player-act.cc
Examining data/crawl-0.25.1/source/abyss.h
Examining data/crawl-0.25.1/source/rng-type.h
Examining data/crawl-0.25.1/source/package.cc
Examining data/crawl-0.25.1/source/uncancel.h
Examining data/crawl-0.25.1/source/artefact.h
Examining data/crawl-0.25.1/source/map-cell.h
Examining data/crawl-0.25.1/source/spl-other.h
Examining data/crawl-0.25.1/source/mon-util.h
Examining data/crawl-0.25.1/source/item-prop.cc
Examining data/crawl-0.25.1/source/death-curse.h
Examining data/crawl-0.25.1/source/size-type.h
Examining data/crawl-0.25.1/source/database.h
Examining data/crawl-0.25.1/source/teleport.cc
Examining data/crawl-0.25.1/source/travel.h
Examining data/crawl-0.25.1/source/stepdown.cc
Examining data/crawl-0.25.1/source/tile-inventory-flags.h
Examining data/crawl-0.25.1/source/domino.h
Examining data/crawl-0.25.1/source/randbook.h
Examining data/crawl-0.25.1/source/l-global.cc
Examining data/crawl-0.25.1/source/mon-grow.cc
Examining data/crawl-0.25.1/source/tilebuf.h
Examining data/crawl-0.25.1/source/tilepick-p.h
Examining data/crawl-0.25.1/source/directn.h
Examining data/crawl-0.25.1/source/l-wiz.cc
Examining data/crawl-0.25.1/source/english.h
Examining data/crawl-0.25.1/source/travel-defs.h
Examining data/crawl-0.25.1/source/actor.h
Examining data/crawl-0.25.1/source/spl-util.h
Examining data/crawl-0.25.1/source/exclude.h
Examining data/crawl-0.25.1/source/flush-reason-type.h
Examining data/crawl-0.25.1/source/worley.cc
Examining data/crawl-0.25.1/source/dlua.cc
Examining data/crawl-0.25.1/source/spl-transloc.cc

FINAL RESULTS:

data/crawl-0.25.1/source/initfile.cc:3968:9:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        readlink("/proc/self/exe", tempPath, sizeof(tempPath) - 1);
data/crawl-0.25.1/source/AppHdr.h:438:32:  [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.
#   define CRAWL_PRINTF_FORMAT printf
data/crawl-0.25.1/source/AppHdr.h:442:31:  [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.
#  define CRAWL_PRINTF_FORMAT printf
data/crawl-0.25.1/source/MSVC/include/unistd.h:20:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
#define access _access
data/crawl-0.25.1/source/crash.cc:429: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("/usr/bin/nice", (char* const*)argv);
data/crawl-0.25.1/source/database.cc:243:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(buf, sizeof(buf), ":%" PRId64, (int64_t)mtime);
data/crawl-0.25.1/source/database.cc:302:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(buf, sizeof(buf), ":%" PRId64, (int64_t)mtime);
data/crawl-0.25.1/source/dbg-asrt.cc:844:9:  [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(detail, sizeof(detail), text, args);
data/crawl-0.25.1/source/dbg-asrt.cc:869:5:  [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(tmp, sizeof(tmp), format, args);
data/crawl-0.25.1/source/dbg-asrt.cc:888:5:  [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(tmp, sizeof(tmp), format, args);
data/crawl-0.25.1/source/dbg-util.cc:524:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(debugf, format, args);
data/crawl-0.25.1/source/end.cc:177: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.
            vsnprintf(buffer, sizeof buffer, format, arg);
data/crawl-0.25.1/source/files.cc:2459:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(old_bonefile.c_str(), F_OK) == 0)
data/crawl-0.25.1/source/hiscores.cc:279:54:  [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.
            _hiscores_print_entry(se, entry, format, printf);
data/crawl-0.25.1/source/initfile.cc:3454:13:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
        if (sscanf(field.c_str(), "%" SCNu64, &tmp_seed))
data/crawl-0.25.1/source/initfile.cc:4059:24:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define FAIL(...) do { fprintf(stderr, __VA_ARGS__); return; } while (0)
data/crawl-0.25.1/source/initfile.cc:5077:18:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
            if (!sscanf(next_arg, "%" SCNu64, &Options.seed_from_rc))
data/crawl-0.25.1/source/json.cc:46:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(ret, str);
data/crawl-0.25.1/source/json.cc:1406:17:  [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.
                snprintf(errmsg, 256, __VA_ARGS__); \
data/crawl-0.25.1/source/l-debug.cc:409:14:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
        if (!sscanf(seed_string, "%" SCNu64, &tmp_seed))
data/crawl-0.25.1/source/libgui.cc:79:5:  [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(buffer, sizeof(buffer), format, argp);
data/crawl-0.25.1/source/libunix.cc:769:5:  [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(buffer, sizeof(buffer), format, argp);
data/crawl-0.25.1/source/libw32c.cc:680:5:  [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(buffer, sizeof(buffer), format, argp);
data/crawl-0.25.1/source/message.cc:1197:18:  [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.
    size_t len = vsnprintf(buff, sizeof(buff), format, argp);
data/crawl-0.25.1/source/message.cc:1203:9:  [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(heapbuf, len + 1, format, ap);
data/crawl-0.25.1/source/mon-pick-data.h:1097:9:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
    POP(crypt),
data/crawl-0.25.1/source/msvc.h:19:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/crawl-0.25.1/source/msvc.h:19:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/crawl-0.25.1/source/newgame.cc:765:30:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
            int clip_found = sscanf(clip.c_str(), "%" SCNu64, &clip_seed);
data/crawl-0.25.1/source/newgame.cc:956:17:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
    int found = sscanf(result.c_str(), "%" SCNu64, &tmp_seed);
data/crawl-0.25.1/source/package.cc:57:22:  [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.
#define dprintf(...) printf(__VA_ARGS__)
data/crawl-0.25.1/source/prebuilt/levcomp.lex.cc:1898:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(newbuf, yylval.text);
data/crawl-0.25.1/source/prebuilt/levcomp.lex.cc:1899: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(newbuf, yytext);
data/crawl-0.25.1/source/prebuilt/levcomp.tab.cc:878:21:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#  define YYFPRINTF fprintf
data/crawl-0.25.1/source/prompt.cc:33:5:  [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, args);
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:87:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(temp, "%s/%s%s", dirs[d], filename, ext[e]);
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:99:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(temp, "%s%s", filename, ext[e]);
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:506:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(temp, "tiledef-%s.h", m_args[1]);
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:595:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(temp, "tiledef-%s.h", m_args[2]);
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:868:9:  [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(fp, format, lc_enum[0].c_str());
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:893:9:  [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(fp, format, lc_enum[i].c_str());
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:935:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(filename, "%s.png", lcname.c_str());
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:945:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(filename, "%s.png", lcname.c_str());
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:966:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename, "tiledef-%s.h", lcname.c_str());
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:1123:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename, "tiledef-%s.cc", lcname.c_str());
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:1370:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename, "tiledef-%s.cc", lcname.c_str());
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:1459:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename, "tile-%s.html", lcname.c_str());
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:1539:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename, "%s.d", lcname.c_str());
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:1568:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename, "tileinfo-%s.js", lcname.c_str());
data/crawl-0.25.1/source/sound.cc:92:17:  [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.
                snprintf(command, sizeof command, HOLD_SOUND_PLAY_COMMAND, file);
data/crawl-0.25.1/source/sound.cc:95:17:  [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.
                snprintf(command, sizeof command, SOUND_PLAY_COMMAND, file);
data/crawl-0.25.1/source/sound.cc:97:13:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            system(OUTS(command));
data/crawl-0.25.1/source/state.cc:71:14:  [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.
    no_gdb = access(GDB_PATH, 1) ? "gdb not executable." : 0;
data/crawl-0.25.1/source/stringutil.cc:256:18:  [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.
    size_t len = vsnprintf(buf1, sizeof buf1, s, orig_args);
data/crawl-0.25.1/source/stringutil.cc:263:5:  [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(buf2, len + 1, s, orig_args);
data/crawl-0.25.1/source/tileweb.cc:134:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(addr.sun_path, m_sock_name.c_str());
data/crawl-0.25.1/source/tileweb.cc:173:16:  [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.
    if ((len = vsnprintf(buf, sizeof(buf), format, argp)) < 0)
data/crawl-0.25.1/source/tileweb.cc:283:16:  [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.
    if ((len = vsnprintf(buf, sizeof(buf), format, argp)) >= (int)sizeof(buf)
data/crawl-0.25.1/source/util/fake_pty.c:89:9:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        execvp(argv[1], argv + 1);
data/crawl-0.25.1/source/wiz-fsim.cc:138:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(o, CRAWL " version %s\n", Version::Long);
data/crawl-0.25.1/source/wiz-fsim.cc:653:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(o, Options.fsim_csv ? "\t" : "  ");
data/crawl-0.25.1/source/wiz-fsim.cc:655:9:  [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(o,Options.fsim_csv ? "%d\t" : "   %2d", y);
data/crawl-0.25.1/source/wiz-fsim.cc:662:9:  [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(o, Options.fsim_csv ? "%d\t" : "%2d", y);
data/crawl-0.25.1/source/wiz-fsim.cc:672:13:  [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(o,Options.fsim_csv ? "%.1f\t" : "%5.1f", fstats.av_eff_dam);
data/crawl-0.25.1/source/wiz-item.cc:1329:9:  [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(ostat, format_str, name.c_str(),
data/crawl-0.25.1/source/MSVC/include/getopt.h:151:12:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts);
data/crawl-0.25.1/source/MSVC/include/getopt.h:153:12:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
extern int getopt ();
data/crawl-0.25.1/source/MSVC/include/getopt.h:157:12:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
extern int getopt_long (int ___argc, char *const *___argv,
data/crawl-0.25.1/source/MSVC/include/getopt.h:171:12:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
extern int getopt ();
data/crawl-0.25.1/source/MSVC/include/getopt.h:173:12:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
extern int getopt_long ();
data/crawl-0.25.1/source/MSVC/include/unistd.h:14:9:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
#define srandom srand
data/crawl-0.25.1/source/MSVC/include/unistd.h:14:17:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
#define srandom srand
data/crawl-0.25.1/source/MSVC/include/unistd.h:15:9:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
#define random rand
data/crawl-0.25.1/source/arena.cc:753:38:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                           spschool::random, random_range(1, 9),
data/crawl-0.25.1/source/art-func.h:1077:34:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                       spschool::random, random_range(1, 9), dam,
data/crawl-0.25.1/source/attack.cc:150:30:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
int attack::calc_to_hit(bool random)
data/crawl-0.25.1/source/attack.cc:167:68:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        mhit += maybe_random_div(you.skill(SK_FIGHTING, 100), 100, random);
data/crawl-0.25.1/source/attack.cc:178:42:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                                         random);
data/crawl-0.25.1/source/attack.cc:182:71:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            mhit += maybe_random_div(you.experience_level * 100, 100, random);
data/crawl-0.25.1/source/attack.cc:190:38:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                                     random);
data/crawl-0.25.1/source/attack.cc:226:36:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        mhit = maybe_random2(mhit, random);
data/crawl-0.25.1/source/attack.h:96:34:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    virtual int calc_to_hit(bool random);
data/crawl-0.25.1/source/catch2-tests/catch.hpp:4592:1:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
random(T a, T b) {
data/crawl-0.25.1/source/catch2-tests/catch.hpp:4601:1:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
random(T a, T b) {
data/crawl-0.25.1/source/catch2-tests/catch.hpp:12921:18:  [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.
            std::srand(config.rngSeed());
data/crawl-0.25.1/source/cloud.cc:51:9:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    int random; ///< Damage rolled on hit.
data/crawl-0.25.1/source/cloud.cc:920:28:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    const int trials = dam.random/15 + 1;
data/crawl-0.25.1/source/cloud.cc:1515:61:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        const int base_damage = _cloud_damage_calc(dam_info.random,
data/crawl-0.25.1/source/cloud.cc:1516:68:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                                                   max(1, dam_info.random / 9),
data/crawl-0.25.1/source/initfile.cc:947:24:  [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 *home = getenv("HOME");
data/crawl-0.25.1/source/initfile.cc:1638:26:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
        char *resolved = realpath(absolute_crawl_rc.c_str(), NULL);
data/crawl-0.25.1/source/initfile.cc:3828:38:  [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.
    SysEnv.crawl_name = check_string(getenv("CRAWL_NAME"));
data/crawl-0.25.1/source/initfile.cc:3832:37:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    SysEnv.crawl_dir = check_string(getenv("CRAWL_DIR"));
data/crawl-0.25.1/source/initfile.cc:3849:30:  [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 *simplemail = getenv("SIMPLEMAIL");
data/crawl-0.25.1/source/initfile.cc:3852:28:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        const char *mail = getenv("MAIL");
data/crawl-0.25.1/source/initfile.cc:3858:36:  [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.
    SysEnv.crawl_rc = check_string(getenv("CRAWL_RC"));
data/crawl-0.25.1/source/initfile.cc:3862:32:  [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.
    SysEnv.home = check_string(getenv("HOME"));
data/crawl-0.25.1/source/melee-attack.cc:2297:36:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
int melee_attack::calc_to_hit(bool random)
data/crawl-0.25.1/source/melee-attack.cc:2299:36:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    int mhit = attack::calc_to_hit(random);
data/crawl-0.25.1/source/melee-attack.cc:2303:42:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        mhit += maybe_random2(you.dex(), random);
data/crawl-0.25.1/source/melee-attack.cc:2310:62:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        mhit += maybe_random2(get_form()->unarmed_hit_bonus, random);
data/crawl-0.25.1/source/mon-act.cc:421:58:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
static bool _mons_can_cast_dig(const monster* mons, bool random)
data/crawl-0.25.1/source/mon-act.cc:430:27:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                      && (random
data/crawl-0.25.1/source/mon-act.cc:434:28:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                      || (!random
data/crawl-0.25.1/source/mon-util.cc:1804:53:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                                               bool random)
data/crawl-0.25.1/source/mon-util.cc:1818:52:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    else if (mons.type == MONS_SPECTRAL_THING && (!random || coinflip()))
data/crawl-0.25.1/source/mon-util.cc:2114:57:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
int flavour_damage(attack_flavour flavour, int HD, bool random)
data/crawl-0.25.1/source/mon-util.cc:2119:17:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            if (random)
data/crawl-0.25.1/source/mon-util.cc:2123:17:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            if (random)
data/crawl-0.25.1/source/mon-util.cc:2127:17:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            if (random)
data/crawl-0.25.1/source/mon-util.cc:2131:17:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            if (random)
data/crawl-0.25.1/source/player.cc:1493:30:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
bool player_res_torment(bool random)
data/crawl-0.25.1/source/player.cc:1498:9:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    if (random
data/crawl-0.25.1/source/random.cc:257:45:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
int maybe_roll_dice(int num, int size, bool random)
data/crawl-0.25.1/source/random.cc:259:9:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    if (random)
data/crawl-0.25.1/source/random.h:81:45:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
int maybe_roll_dice(int num, int size, bool random);
data/crawl-0.25.1/source/ranged-attack.cc:67:37:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
int ranged_attack::calc_to_hit(bool random)
data/crawl-0.25.1/source/ranged-attack.cc:69:39:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    orig_to_hit = attack::calc_to_hit(random);
data/crawl-0.25.1/source/ranged-attack.cc:78:72:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            ? maybe_random2(you.attribute[ATTR_PORTAL_PROJECTILE] / 4, random)
data/crawl-0.25.1/source/ranged-attack.cc:85:13:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        if (random)
data/crawl-0.25.1/source/ranged-attack.h:17:26:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    int calc_to_hit(bool random) override;
data/crawl-0.25.1/source/spl-data.h:1672:39:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    spschool::conjuration | spschool::random,
data/crawl-0.25.1/source/spl-miscast.cc:655:29:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    if (school == spschool::random)
data/crawl-0.25.1/source/spl-util.cc:167:41:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    for (int i = 0; i <= (int)spschool::random; i++)
data/crawl-0.25.1/source/spl-util.cc:790:20:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    case spschool::random:
data/crawl-0.25.1/source/spl-util.cc:825:20:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    case spschool::random:
data/crawl-0.25.1/source/spl-util.cc:984:47:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
int spell_effect_noise(spell_type spell, bool random)
data/crawl-0.25.1/source/spl-util.cc:991:13:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        if (random)
data/crawl-0.25.1/source/terrain.cc:2302:67:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                          const vector<coord_def>* excluded, bool random)
data/crawl-0.25.1/source/terrain.cc:2310:30:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    const coord_def newpos = random ? targets[random2(targets.size())]
data/crawl-0.25.1/source/terrain.h:162:89:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
coord_def push_actor_from(const coord_def& pos, const vector<coord_def>* excluded, bool random);
data/crawl-0.25.1/source/threads.h:65:23:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
#define mutex_lock(x) EnterCriticalSection(&x)
data/crawl-0.25.1/source/threads.h:67:23:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
#define mutex_init(x) InitializeCriticalSection(&x);
data/crawl-0.25.1/source/view.cc:588:69:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
static const FixedArray<uint8_t, GXM, GYM>& _tile_difficulties(bool random)
data/crawl-0.25.1/source/view.cc:596:9:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    if (random)
data/crawl-0.25.1/source/MSVC/include/dirent.h:156: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 d_name[MAX_PATH + 1];                  /* File name */
data/crawl-0.25.1/source/MSVC/include/dirent.h:168: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             patt[MAX_PATH + 3];        /* Initial directory name */
data/crawl-0.25.1/source/arena.cc:1534:19:  [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).
    arena::file = fopen("arena.result", "w");
data/crawl-0.25.1/source/catch2-tests/catch.hpp:2128:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char timeStamp[timeStampSize];
data/crawl-0.25.1/source/catch2-tests/catch.hpp:4406:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        alignas(alignof(T)) char storage[sizeof(T)];
data/crawl-0.25.1/source/catch2-tests/catch.hpp:5898:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 line[CATCH_CONFIG_CONSOLE_WIDTH] = {0};
data/crawl-0.25.1/source/catch2-tests/catch.hpp:7504:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        void open();
data/crawl-0.25.1/source/catch2-tests/catch.hpp:11318:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(&i, &f, sizeof(f));
data/crawl-0.25.1/source/catch2-tests/catch.hpp:11325:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(&i, &d, sizeof(d));
data/crawl-0.25.1/source/catch2-tests/catch.hpp:11867: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 m_buffer[L_tmpnam] = { 0 };
data/crawl-0.25.1/source/catch2-tests/catch.hpp:11954:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buffer[100];
data/crawl-0.25.1/source/catch2-tests/catch.hpp:11963:23:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
        m_file = std::tmpfile();
data/crawl-0.25.1/source/catch2-tests/catch.hpp:11987: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 buffer[100] = {};
data/crawl-0.25.1/source/catch2-tests/catch.hpp:12450:30:  [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).
                    tracker->open();
data/crawl-0.25.1/source/catch2-tests/catch.hpp:13250:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char **utf8Argv = new char *[ argc ];
data/crawl-0.25.1/source/catch2-tests/catch.hpp:13409:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char data[bufferSize];
data/crawl-0.25.1/source/catch2-tests/catch.hpp:13458: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).
                m_ofs.open( filename.c_str() );
data/crawl-0.25.1/source/catch2-tests/catch.hpp:14161: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 TrackerBase::open() {
data/crawl-0.25.1/source/catch2-tests/catch.hpp:14261: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).
            open();
data/crawl-0.25.1/source/catch2-tests/catch.hpp:15445: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 buffer[maxDoubleSize];
data/crawl-0.25.1/source/catch2-tests/catch.hpp:15452:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        std::sprintf(buffer, "%.3f", duration);
data/crawl-0.25.1/source/catch2-tests/catch.hpp:16045:10:  [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 open() {
data/crawl-0.25.1/source/catch2-tests/catch.hpp:16079:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        tp.open();
data/crawl-0.25.1/source/catch2-tests/catch.hpp:16480:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char timeStamp[timeStampSize];
data/crawl-0.25.1/source/cio.cc:858:13:  [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, text->c_str(), length);
data/crawl-0.25.1/source/clua.cc:85:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char name[100];
data/crawl-0.25.1/source/command.cc:138:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[200];
data/crawl-0.25.1/source/command.cc:1140:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[200];
data/crawl-0.25.1/source/crash.cc:133: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 name[180];
data/crawl-0.25.1/source/crash.cc:402: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 attach_cmd[20] = {};
data/crawl-0.25.1/source/database.cc:242:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[20];
data/crawl-0.25.1/source/database.cc:300:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[20];
data/crawl-0.25.1/source/dbg-asrt.cc:630:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char name[180] = {};
data/crawl-0.25.1/source/dbg-asrt.cc:825: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 mesg[512];
data/crawl-0.25.1/source/dbg-asrt.cc:842: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 detail[512];
data/crawl-0.25.1/source/dbg-asrt.cc:847: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 final_mesg[1026];
data/crawl-0.25.1/source/dbg-asrt.cc:863:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp[2048] = {};
data/crawl-0.25.1/source/dbg-asrt.cc:864: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 mesg[2071] = {};
data/crawl-0.25.1/source/dbg-asrt.cc:882:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp[2048] = {};
data/crawl-0.25.1/source/dbg-asrt.cc:883: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 mesg[2055] = {};
data/crawl-0.25.1/source/dbg-maps.cc:164:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *fp = fopen("map.dump", "w");
data/crawl-0.25.1/source/dbg-maps.cc:336:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *outf = fopen(out_file, "w");
data/crawl-0.25.1/source/dbg-objstat.cc:1213: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).
    stat_fh = fopen(stat_file.c_str(), "w");
data/crawl-0.25.1/source/dbg-scan.cc:44:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char  name[256];
data/crawl-0.25.1/source/dbg-util.cc:29: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 specs[1024];
data/crawl-0.25.1/source/dbg-util.cc:430: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 specs[80];
data/crawl-0.25.1/source/dbg-util.cc:519:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        debugf = fopen("debuglog.txt", "w");
data/crawl-0.25.1/source/describe.cc:591:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[80];
data/crawl-0.25.1/source/describe.cc:622:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[80];
data/crawl-0.25.1/source/describe.cc:2891:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[79];
data/crawl-0.25.1/source/dgl-message.cc:67:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[120];
data/crawl-0.25.1/source/dgn-overview.cc:234:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[100];
data/crawl-0.25.1/source/dgn-overview.cc:302: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[100];
data/crawl-0.25.1/source/dgn-overview.cc:396: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[100];
data/crawl-0.25.1/source/dgn-overview.cc:1023:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[77];
data/crawl-0.25.1/source/dgn-shoals.cc:1120:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[80];
data/crawl-0.25.1/source/dgn-shoals.cc:1135: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).
            const int newgran = atoi(buf);
data/crawl-0.25.1/source/dlua.cc:261: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).
        const int lnum = atoi(line_num.c_str());
data/crawl-0.25.1/source/domino.cc:62:54:  [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).
bool Adjacency::adjacent(Direction d, set<uint32_t>& open)
data/crawl-0.25.1/source/domino.cc:64:18:  [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).
    intersection(open, permitted_[d]);
data/crawl-0.25.1/source/domino.cc:65: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).
    return !open.empty();
data/crawl-0.25.1/source/domino.h:181:56:  [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).
        bool adjacent(Direction d, std::set<uint32_t>& open);
data/crawl-0.25.1/source/dungeon.cc:3588:19:  [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 *ostat = fopen("unique_placement.log", "a");
data/crawl-0.25.1/source/dungeon.cc:7138:42:  [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).
    dprf(DIAG_DNGN, "Level density: %d", open);
data/crawl-0.25.1/source/dungeon.cc:7139:19:  [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).
    env.density = open;
data/crawl-0.25.1/source/end.cc:176:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buffer[1024];
data/crawl-0.25.1/source/errors.cc:66: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).
    FILE *f = fopen(outfile.c_str(), "w");
data/crawl-0.25.1/source/evoke.cc:578:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[40];
data/crawl-0.25.1/source/evoke.cc:579:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "%lu skills", (unsigned long) skills.size());
data/crawl-0.25.1/source/files.cc:713: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 fbuf[LINEMAX];
data/crawl-0.25.1/source/files.cc:2386:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *src = fopen(dist_full_path.c_str(), "rb");
data/crawl-0.25.1/source/files.cc:2404:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUFSIZ];
data/crawl-0.25.1/source/files.cc:2527:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUFSIZ];
data/crawl-0.25.1/source/game-options.cc:199:31:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        const int threshold = atoi(insplit[0].c_str());
data/crawl-0.25.1/source/god-abil.cc:5603:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[18];
data/crawl-0.25.1/source/god-menu.cc:46:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[300];
data/crawl-0.25.1/source/hints.cc:144: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 desc[100];
data/crawl-0.25.1/source/hints.cc:149:9:  [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(desc, "(Melee oriented character with divine support)");
data/crawl-0.25.1/source/hints.cc:152:9:  [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(desc, "(Magic oriented character)");
data/crawl-0.25.1/source/hints.cc:155:9:  [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(desc, "(Ranged fighter)");
data/crawl-0.25.1/source/hints.cc:158:9:  [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(desc, "(erroneous character)");
data/crawl-0.25.1/source/hiscores.cc:214:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[200];
data/crawl-0.25.1/source/hiscores.cc:349:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[200];
data/crawl-0.25.1/source/hiscores.cc:572:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char *mons[12] = { "Jan", "Feb", "Mar", "Apr", "May", "June",
data/crawl-0.25.1/source/hiscores.cc: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 inbuf[1300];
data/crawl-0.25.1/source/hiscores.cc:2902: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).
    return atoi(field.c_str());
data/crawl-0.25.1/source/initfile.cc:771:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        ret = atoi(field.c_str() + num_prefix.size());
data/crawl-0.25.1/source/initfile.cc:941:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t home[MAX_PATH];
data/crawl-0.25.1/source/initfile.cc:2914: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).
        int scrollmarg = atoi(field.c_str());
data/crawl-0.25.1/source/initfile.cc:3132: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).
            int num = atoi(thesplit[i].c_str());
data/crawl-0.25.1/source/initfile.cc:3960:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t tempPath[MAX_PATH];
data/crawl-0.25.1/source/initfile.cc:3966: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 tempPath[2048];
data/crawl-0.25.1/source/initfile.cc:4127:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[16384];
data/crawl-0.25.1/source/initfile.cc:4152:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[16384];
data/crawl-0.25.1/source/initfile.cc:4176:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char buf[16384];
data/crawl-0.25.1/source/initfile.cc:4203:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char buf[16384];
data/crawl-0.25.1/source/initfile.cc:4793: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).
                ecount = atoi(next_arg);
data/crawl-0.25.1/source/initfile.cc:4859:40:  [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).
                SysEnv.map_gen_iters = atoi(next_arg);
data/crawl-0.25.1/source/item-name.cc:2520: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).
    FILE *f = fopen(fname.c_str(), "w");
data/crawl-0.25.1/source/item-name.cc:2547: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).
    FILE *f = fopen(fname.c_str(), "w");
data/crawl-0.25.1/source/items.cc:4193: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 specs[80];
data/crawl-0.25.1/source/items.cc:4375: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).
            if (!(type_wanted = atoi(specs)))
data/crawl-0.25.1/source/items.cc:4395:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[80];
data/crawl-0.25.1/source/json.cc:93: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(sb->cur, bytes, count);
data/crawl-0.25.1/source/json.cc:853: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 throwaway_buffer[4];
data/crawl-0.25.1/source/json.cc:1250:21:  [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, "\\uFFFD");
data/crawl-0.25.1/source/json.cc:1319:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[64];
data/crawl-0.25.1/source/json.cc:1320:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buf, "%.16g", num);
data/crawl-0.25.1/source/json.cc:1402:39:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
bool json_check(const JsonNode *node, char errmsg[256])
data/crawl-0.25.1/source/json.h:121:39:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
bool json_check(const JsonNode *node, char errmsg[256]);
data/crawl-0.25.1/source/kills.cc: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 buf[200];
data/crawl-0.25.1/source/kills.cc:411:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[20];
data/crawl-0.25.1/source/kills.cc:424:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[50];
data/crawl-0.25.1/source/kills.cc:428:9:  [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(buf, " (once)");
data/crawl-0.25.1/source/kills.cc:431:9:  [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(buf, " (twice)");
data/crawl-0.25.1/source/kills.cc:434:9:  [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(buf, " (thrice)");
data/crawl-0.25.1/source/kills.cc:961:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[120];
data/crawl-0.25.1/source/l-crawl.cc:204: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 linebuf[500];
data/crawl-0.25.1/source/l-dgn.cc:335:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[2] = "";
data/crawl-0.25.1/source/l-dgn.cc:1085:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[80];
data/crawl-0.25.1/source/l-dgn.cc:1086:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "Point (%d,%d) isn't in bounds.", x, y);
data/crawl-0.25.1/source/l-dgn.cc:1136:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[80];
data/crawl-0.25.1/source/l-dgn.cc:1137:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "Point (%d,%d) isn't in bounds.", x, y);
data/crawl-0.25.1/source/l-dgn.cc:1236:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[80];
data/crawl-0.25.1/source/l-dgn.cc:1237:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "Point (%d,%d) isn't in bounds.", x, y);
data/crawl-0.25.1/source/l-dgnbld.cc:1512:19:  [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).
    TABLE_STR(ls, open, traversable_glyphs);
data/crawl-0.25.1/source/l-dgnbld.cc:1553:41:  [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).
                bool south     = strchr(open, lines(x,     y + 1));
data/crawl-0.25.1/source/l-dgnbld.cc:1554:41:  [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).
                bool north     = strchr(open, lines(x,     y - 1));
data/crawl-0.25.1/source/l-dgnbld.cc:1555:41:  [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).
                bool east      = strchr(open, lines(x + 1, y));
data/crawl-0.25.1/source/l-dgnbld.cc:1556:41:  [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).
                bool west      = strchr(open, lines(x - 1, y));
data/crawl-0.25.1/source/l-dgnbld.cc:1557:41:  [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).
                bool southeast = strchr(open, lines(x + 1, y + 1));
data/crawl-0.25.1/source/l-dgnbld.cc:1558:41:  [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).
                bool northwest = strchr(open, lines(x - 1, y - 1));
data/crawl-0.25.1/source/l-dgnbld.cc:1559:41:  [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).
                bool southwest = strchr(open, lines(x - 1, y + 1));
data/crawl-0.25.1/source/l-dgnbld.cc:1560:41:  [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).
                bool northeast = strchr(open, lines(x + 1, y - 1));
data/crawl-0.25.1/source/l-dgnbld.cc:1635:19:  [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).
    TABLE_STR(ls, open, traversable_glyphs);
data/crawl-0.25.1/source/l-dgnbld.cc:1657:46:  [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).
                bool south_open     = strchr(open, lines(x,     y + 1));
data/crawl-0.25.1/source/l-dgnbld.cc:1658:46:  [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).
                bool north_open     = strchr(open, lines(x,     y - 1));
data/crawl-0.25.1/source/l-dgnbld.cc:1659:46:  [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).
                bool east_open      = strchr(open, lines(x + 1, y));
data/crawl-0.25.1/source/l-dgnbld.cc:1660:46:  [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).
                bool west_open      = strchr(open, lines(x - 1, y));
data/crawl-0.25.1/source/l-dgnbld.cc:1661:46:  [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).
                bool southeast_open = strchr(open, lines(x + 1, y + 1));
data/crawl-0.25.1/source/l-dgnbld.cc:1662:46:  [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).
                bool northwest_open = strchr(open, lines(x - 1, y - 1));
data/crawl-0.25.1/source/l-dgnbld.cc:1663:46:  [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).
                bool southwest_open = strchr(open, lines(x - 1, y + 1));
data/crawl-0.25.1/source/l-dgnbld.cc:1664:46:  [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).
                bool northeast_open = strchr(open, lines(x + 1, y - 1));
data/crawl-0.25.1/source/l-item.cc:1231: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 sletter[2] = "?";
data/crawl-0.25.1/source/l-mapgrd.cc:60:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[2];
data/crawl-0.25.1/source/l-spells.cc:38:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[2];
data/crawl-0.25.1/source/l-you.cc:695:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[2];
data/crawl-0.25.1/source/l-you.cc:720:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[2];
data/crawl-0.25.1/source/l-you.cc:746:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[2];
data/crawl-0.25.1/source/l-you.cc:787:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[2];
data/crawl-0.25.1/source/l-you.cc:808:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[2];
data/crawl-0.25.1/source/lang-fake.cc:387:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[4];
data/crawl-0.25.1/source/libgui.cc:76:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[2048];          // One full screen if no control seq...
data/crawl-0.25.1/source/libunix.cc:405: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(&game_term, &def_term, sizeof(struct termios));
data/crawl-0.25.1/source/libunix.cc:764: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[2048];          // One full screen if no control seq...
data/crawl-0.25.1/source/libw32c.cc:72:1:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
wchar_t oldTitle[80];
data/crawl-0.25.1/source/libw32c.cc:676: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[4096]; // one could hope it's enough
data/crawl-0.25.1/source/lookup-help.cc:1300:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[80];
data/crawl-0.25.1/source/luaterp.cc:43:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[16384];
data/crawl-0.25.1/source/macro.cc:377:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char buff[20];
data/crawl-0.25.1/source/macro.cc:705:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[30] = "K:";
data/crawl-0.25.1/source/macro.cc:927: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[1024];
data/crawl-0.25.1/source/main.cc:2583:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[80];
data/crawl-0.25.1/source/main.cc:2595: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).
    int count = atoi(buf);
data/crawl-0.25.1/source/map-cell.h:72: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(this, &c, sizeof(map_cell));
data/crawl-0.25.1/source/map-cell.h:101: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(this, &c, sizeof(map_cell));
data/crawl-0.25.1/source/mapdef.cc:3749:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                const int freq = atoi(slot_vals[1].c_str());
data/crawl-0.25.1/source/mapdef.cc:3934:35:  [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).
                const int count = atoi(mcount.c_str()); // safe atoi()
data/crawl-0.25.1/source/mapdef.cc:4366: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).
    int nheads = atoi(prefix.c_str());
data/crawl-0.25.1/source/menu.cc:1189:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char linebuf[80] = "";
data/crawl-0.25.1/source/menu.cc:1332:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[100] = "";
data/crawl-0.25.1/source/menu.h:155:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[300];
data/crawl-0.25.1/source/message.cc:1196: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[200];
data/crawl-0.25.1/source/message.h:188: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 internal_buf[500]; // if your terminal is wider than this, too bad
data/crawl-0.25.1/source/mon-info.cc:1232: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 * const _monster_list_colour_names[_NUM_MLC] =
data/crawl-0.25.1/source/msvc.h:31:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   ((void) memcpy(&(dst), &(src), sizeof(va_list)))
data/crawl-0.25.1/source/newgame.cc:542:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[MAX_NAME_LENGTH + 1]; // FIXME: make line_reader handle widths
data/crawl-0.25.1/source/newgame.cc:862: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 timebuf[9];
data/crawl-0.25.1/source/ng-init.cc:127: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).
                        atoi(tag_without_prefix(tag,
data/crawl-0.25.1/source/notes.cc:524:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[400];
data/crawl-0.25.1/source/ouch.cc:348:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[200];
data/crawl-0.25.1/source/ouch.cc:349:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buf, "HP: %d/%d MP: %d/%d",
data/crawl-0.25.1/source/output.cc:1028:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 static_pos_buf[80];
data/crawl-0.25.1/source/output.cc:1033:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 static_hunger_buf[80];
data/crawl-0.25.1/source/package.cc:69: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 padding[3];
data/crawl-0.25.1/source/package.cc:143: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 file[7] = "XXXXXX";
data/crawl-0.25.1/source/package.cc:144:10:  [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).
    fd = mkstemp(file);
data/crawl-0.25.1/source/package.cc:516:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char name[sizeof(plen_t)];
data/crawl-0.25.1/source/player.cc:2601:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[200];
data/crawl-0.25.1/source/player.cc:2602:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buf, "HP: %d/%d MP: %d/%d",
data/crawl-0.25.1/source/prebuilt/levcomp.tab.cc:1124: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
data/crawl-0.25.1/source/prebuilt/levcomp.tab.cc:1311: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 yymsgbuf[128];
data/crawl-0.25.1/source/precision-menu.cc:747:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[80];
data/crawl-0.25.1/source/prompt.cc:30:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[200];
data/crawl-0.25.1/source/prompt.cc:310:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char specs[80];
data/crawl-0.25.1/source/prompt.cc:329: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 specs[80];
data/crawl-0.25.1/source/randbook.cc:614:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[80];
data/crawl-0.25.1/source/randbook.cc:622:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(buf, "No level %d spells can be cast by you", level);
data/crawl-0.25.1/source/randbook.cc:631:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(buf, "No level %d spells?!?!?!", level);
data/crawl-0.25.1/source/random.cc:413: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(&result, &value, sizeof(value));
data/crawl-0.25.1/source/religion.cc:3015:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char *messages[NUM_PIETY_GAIN] =
data/crawl-0.25.1/source/religion.cc:3022:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char *glowing_messages[NUM_PIETY_GAIN] =
data/crawl-0.25.1/source/religion.cc:3791: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 specs[80];
data/crawl-0.25.1/source/rltiles/tool/tile.cc:295: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(m_pixels, img.m_pixels, m_width * m_height * sizeof(tile_colour));
data/crawl-0.25.1/source/rltiles/tool/tile.cc:382:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE* fp = fopen(new_filename.c_str(), "rb");
data/crawl-0.25.1/source/rltiles/tool/tile.cc:477:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE* fp = fopen(new_filename.c_str(), "rb");
data/crawl-0.25.1/source/rltiles/tool/tile_colour.cc:244:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fp = fopen(filename, "wb");
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:66: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 temp[1024];
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:69:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char *ext[3] =
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:122: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 read_line[bufsize];
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:399:32:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            m_corpsify = (bool)atoi(m_args[1]);
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:505:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char temp[1024];
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:536: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).
            m_rim = (bool)atoi(m_args[1]);
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:551: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).
            int tmp = atoi(m_args[1]);
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:565: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).
            m_domino = atoi(m_args[1]);
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:570:30:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            m_shrink = (bool)atoi(m_args[1]);
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:594:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char temp[1024];
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:618:31:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                    int val = atoi(m_args[i]);
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:647:39:  [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).
            m_hues.push_back(int_pair(atoi(m_args[1]), atoi(m_args[2])));
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:647:56:  [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).
            m_hues.push_back(int_pair(atoi(m_args[1]), atoi(m_args[2])));
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:652:32:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            m_alpha = ((double)atoi(m_args[1]))/255.0;
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:668:31:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            m_desat.push_back(atoi(m_args[1]));
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:675: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).
            m_lum.push_back(int_pair(atoi(m_args[1]), atoi(m_args[2])));
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:675:55:  [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).
            m_lum.push_back(int_pair(atoi(m_args[1]), atoi(m_args[2])));
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:934:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char filename[1024];
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:944:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char filename[1024];
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:946:28:  [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 *fp = fopen(filename, "w");
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:965: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 filename[1024];
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:967:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *fp = fopen(filename, "w");
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:1122: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 filename[1024];
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:1124:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *fp = fopen(filename, "w");
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:1369: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 filename[1024];
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:1371:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *fp = fopen(filename, "w");
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:1458: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 filename[1024];
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:1460:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *fp = fopen(filename, "w");
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:1538: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 filename[1024];
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:1540:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *fp = fopen(filename, "w");
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:1567: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 filename[1024];
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:1569:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *fp = fopen(filename, "w");
data/crawl-0.25.1/source/shopping.cc:901: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 * const shopping_order_names[NUM_ORDERS] =
data/crawl-0.25.1/source/shout.cc:1344:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *outf = fopen(filename.c_str(), "w");
data/crawl-0.25.1/source/skills.cc:64: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 *skill_titles[NUM_SKILLS][6] =
data/crawl-0.25.1/source/skills.cc:113: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 *martial_arts_titles[6] =
data/crawl-0.25.1/source/skills.cc:115: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 *claw_and_tooth_titles[6] =
data/crawl-0.25.1/source/sound.cc:85: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 command[255];
data/crawl-0.25.1/source/spl-book.cc:650:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char linebuf[80] = "";
data/crawl-0.25.1/source/sqldbm.cc:55: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).
        open();
data/crawl-0.25.1/source/sqldbm.cc:80:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int SQL_DBM::open(const string &s)
data/crawl-0.25.1/source/sqldbm.cc:334:13:  [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(dptr, s.c_str(), dsize);
data/crawl-0.25.1/source/sqldbm.cc:378:17:  [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(dptr, d.dptr, dsize);
data/crawl-0.25.1/source/sqldbm.h:55: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).
    int open(const string &db = "");
data/crawl-0.25.1/source/stash.cc:436: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 additionals[50];
data/crawl-0.25.1/source/stash.cc:1422:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[400];
data/crawl-0.25.1/source/store.cc:1763: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).
    FILE *f = fopen("prop_accesses", "w");
data/crawl-0.25.1/source/stringutil.cc:45:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[4];
data/crawl-0.25.1/source/stringutil.cc:253:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf1[8000];
data/crawl-0.25.1/source/syscalls.cc:103:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE* seed_f = fopen("/dev/urandom", "rb");
data/crawl-0.25.1/source/syscalls.cc:105:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        seed_f = fopen("/dev/random", "rb");
data/crawl-0.25.1/source/syscalls.cc:107:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        seed_f = fopen("/dev/srandom", "rb");
data/crawl-0.25.1/source/syscalls.cc:109:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        seed_f = fopen("/dev/arandom", "rb");
data/crawl-0.25.1/source/syscalls.cc:175:5:  [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).
int mkstemp(char *dummy)
data/crawl-0.25.1/source/syscalls.cc:181:9:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        wchar_t filename[MAX_PATH];
data/crawl-0.25.1/source/syscalls.cc:514: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).
    return fopen(OUTS(path), mode);
data/crawl-0.25.1/source/syscalls.cc:533:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    return open(OUTS(pathname), flags, mode);
data/crawl-0.25.1/source/syscalls.h:21:5:  [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).
int mkstemp(char *dummy);
data/crawl-0.25.1/source/tags.cc:138: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 junk[128];
data/crawl-0.25.1/source/tags.cc:210:13:  [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(data, &(*_pbuf)[_read_offset], size);
data/crawl-0.25.1/source/tags.cc:835: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[SHRT_MAX]; // TODO: why doesn't this use int16_t?
data/crawl-0.25.1/source/tiledoll.cc:37: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(parts, _orig.parts, TILEP_PART_MAX * sizeof(tileidx_t));
data/crawl-0.25.1/source/tiledoll.cc:43: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(parts, other.parts, TILEP_PART_MAX * sizeof(tileidx_t));
data/crawl-0.25.1/source/tiledoll.cc:92: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 fbuf[80];
data/crawl-0.25.1/source/tiledoll.cc:109: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 fbuf[1024];
data/crawl-0.25.1/source/tiledoll.cc:546: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 fbuf[80];
data/crawl-0.25.1/source/tilepick-p.cc:1091: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).
    return atoi(str);
data/crawl-0.25.1/source/tilepick-p.cc:1122: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  ibuf[8];
data/crawl-0.25.1/source/tilereg-doll.cc:236:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char *mode_name[TILEP_MODE_MAX] =
data/crawl-0.25.1/source/tilereg-doll.cc:247:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char *cat_name[TILEP_PART_MAX] =
data/crawl-0.25.1/source/tiletex.cc:89: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 *_filenames[TEX_MAX] =
data/crawl-0.25.1/source/tileweb-text.cc:167:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[5];
data/crawl-0.25.1/source/tileweb.cc:168:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[2048];
data/crawl-0.25.1/source/tileweb.cc:278:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[2048];
data/crawl-0.25.1/source/tileweb.cc:325:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[4096]; // Should be enough for client->server messages
data/crawl-0.25.1/source/tileweb.cc:1329:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[5];
data/crawl-0.25.1/source/tileweb.cc:2195:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[7];
data/crawl-0.25.1/source/travel.cc:2487: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).
        result.id.depth = atoi(s.c_str());
data/crawl-0.25.1/source/travel.cc:2562:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[100];
data/crawl-0.25.1/source/travel.cc:3281: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).
                                   : atoi(brlev.c_str()));
data/crawl-0.25.1/source/travel.cc:3974: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 choice[50];
data/crawl-0.25.1/source/ui.h:1176: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 m_buffer[1024];
data/crawl-0.25.1/source/unicode.cc:162:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[4];
data/crawl-0.25.1/source/unicode.cc:186:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[MB_LEN_MAX];
data/crawl-0.25.1/source/unicode.cc:210:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[4];
data/crawl-0.25.1/source/unicode.cc:242:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[4];
data/crawl-0.25.1/source/unicode.cc:312:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[512];
data/crawl-0.25.1/source/unicode.cc:455:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[512];
data/crawl-0.25.1/source/unicode.cc:497: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 dummy[4];
data/crawl-0.25.1/source/util/fake_pty.c:36:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024];
data/crawl-0.25.1/source/view.cc:722: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).
        if (open)
data/crawl-0.25.1/source/viewchar.cc:153:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[5];
data/crawl-0.25.1/source/viewmap.cc:479:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[10];
data/crawl-0.25.1/source/windowmanager-sdl.cc:589: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 env_str[50];
data/crawl-0.25.1/source/windowmanager-sdl.cc:610: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(env_str, "SDL_VIDEO_WINDOW_POS=%d,%d", x, y);
data/crawl-0.25.1/source/windowmanager-sdl.cc:1051: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 acBuffer[512];
data/crawl-0.25.1/source/wiz-dgn.cc:172: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 specs[256];
data/crawl-0.25.1/source/wiz-dgn.cc:185: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).
    if (int feat_num = atoi(specs))
data/crawl-0.25.1/source/wiz-dgn.cc:369: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 requested_trap[80];
data/crawl-0.25.1/source/wiz-dgn.cc:456: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 requested_shop[80];
data/crawl-0.25.1/source/wiz-dgn.cc:612: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 what_to_make[100];
data/crawl-0.25.1/source/wiz-dgn.cc:734:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char num[20];
data/crawl-0.25.1/source/wiz-dgn.cc:735:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(num, "%d/", lv->daction_counters[j]);
data/crawl-0.25.1/source/wiz-dgn.cc:745: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 num[20];
data/crawl-0.25.1/source/wiz-dgn.cc:746: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(num, "%d/", query_daction_counter((daction_type)j));
data/crawl-0.25.1/source/wiz-dgn.cc:802: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 specs[256];
data/crawl-0.25.1/source/wiz-dgn.cc:808: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).
        const int speed = atoi(specs);
data/crawl-0.25.1/source/wiz-dump.cc:284:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        ret.plus = atoi(s.substr(1).c_str());
data/crawl-0.25.1/source/wiz-dump.cc:374:55:  [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).
            you.base_stats[STAT_STR] = debug_cap_stat(atoi(tokens[k+1].c_str()));
data/crawl-0.25.1/source/wiz-dump.cc:381:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            set_xl(atoi(tokens[k+1].c_str()), false);
data/crawl-0.25.1/source/wiz-dump.cc:401:55:  [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).
            you.base_stats[STAT_INT] = debug_cap_stat(atoi(tokens[k+1].c_str()));
data/crawl-0.25.1/source/wiz-dump.cc:445:55:  [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).
            you.base_stats[STAT_DEX] = debug_cap_stat(atoi(tokens[k+1].c_str()));
data/crawl-0.25.1/source/wiz-dump.cc:451: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).
            you.set_gold(atoi(tokens[k+1].c_str()));
data/crawl-0.25.1/source/wiz-dump.cc:622: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 filename[80];
data/crawl-0.25.1/source/wiz-fsim.cc:287:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char specs[100];
data/crawl-0.25.1/source/wiz-fsim.cc:537: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).
            divider = atoi(divider_str.c_str());
data/crawl-0.25.1/source/wiz-fsim.cc:697:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE * o = fopen(fightstat, "a");
data/crawl-0.25.1/source/wiz-item.cc:76:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024];
data/crawl-0.25.1/source/wiz-item.cc:95: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 specs[80];
data/crawl-0.25.1/source/wiz-item.cc:270:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[80];
data/crawl-0.25.1/source/wiz-item.cc:358: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 specs[80];
data/crawl-0.25.1/source/wiz-item.cc:391: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 specs[50];
data/crawl-0.25.1/source/wiz-item.cc:674:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char name[80];
data/crawl-0.25.1/source/wiz-item.cc:1314: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 format_str[80];
data/crawl-0.25.1/source/wiz-item.cc:1315:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(format_str, "%%%ds: %%6.2f\n", max_width);
data/crawl-0.25.1/source/wiz-item.cc:1594:19:  [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 *ostat = fopen("items.stat", "a");
data/crawl-0.25.1/source/wiz-item.cc:1621:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[80];
data/crawl-0.25.1/source/wiz-mon.cc:54:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char specs[1024];
data/crawl-0.25.1/source/wiz-mon.cc:150: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 input_str[80];
data/crawl-0.25.1/source/wiz-mon.cc:243:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[80];
data/crawl-0.25.1/source/wiz-mon.cc:275:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[80];
data/crawl-0.25.1/source/wiz-mon.cc: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 specs[256];
data/crawl-0.25.1/source/wiz-mon.cc:314:30:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            const int rate = atoi(specs);
data/crawl-0.25.1/source/wiz-mon.cc:343: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).
            const int num = min(atoi(specs), max_spawn);
data/crawl-0.25.1/source/wiz-mon.cc:595:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024] = "";
data/crawl-0.25.1/source/wiz-mon.cc:868:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char specs[80];
data/crawl-0.25.1/source/wiz-mon.cc:1036: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 specs[100];
data/crawl-0.25.1/source/wiz-mon.cc:1101: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).
        level  = atoi(nums[0].c_str());
data/crawl-0.25.1/source/wiz-mon.cc:1102:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        fail = atoi(nums[1].c_str());
data/crawl-0.25.1/source/wiz-mon.cc:1118: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).
        level = atoi(specs);
data/crawl-0.25.1/source/wiz-you.cc:107:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char specs[80];
data/crawl-0.25.1/source/wiz-you.cc:133: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 specs[80], *end;
data/crawl-0.25.1/source/wiz-you.cc:163: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 specs[80], *end;
data/crawl-0.25.1/source/wiz-you.cc:292:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[30];
data/crawl-0.25.1/source/wiz-you.cc:305: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).
            newinterest = atoi(buf);
data/crawl-0.25.1/source/wiz-you.cc:348:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[30];
data/crawl-0.25.1/source/wiz-you.cc:358: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).
        you.set_gold(max(atoi(buf), 0));
data/crawl-0.25.1/source/wiz-you.cc:380:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[30];
data/crawl-0.25.1/source/wiz-you.cc:387: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).
    wizard_set_piety_to(atoi(buf));
data/crawl-0.25.1/source/wiz-you.cc:483: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 specs[80];
data/crawl-0.25.1/source/wiz-you.cc:565:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[80];
data/crawl-0.25.1/source/wiz-you.cc:577:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[80];
data/crawl-0.25.1/source/wiz-you.cc:632:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[80];
data/crawl-0.25.1/source/wiz-you.cc:816:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[30];
data/crawl-0.25.1/source/wiz-you.cc:823: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).
    const int newxl = atoi(buf);
data/crawl-0.25.1/source/wiz-you.cc:992: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 specs[80];
data/crawl-0.25.1/source/xom.cc:119: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 *_xom_message_arrays[NUM_XOM_MESSAGE_TYPES][6] =
data/crawl-0.25.1/source/xom.cc:307:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char *message_array[6];
data/crawl-0.25.1/source/xom.cc:457: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).
        if (open)
data/crawl-0.25.1/source/xom.cc:653:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char gift_buf[100];
data/crawl-0.25.1/source/xom.cc:3192:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 xom_buf[100];
data/crawl-0.25.1/source/xom.cc:3645:19:  [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 *ostat = fopen("xom_debug.stat", "w");
data/crawl-0.25.1/source/MSVC/include/dirent.h:183:40:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
# define DIRENT_STRNCPY(dest,src,size) strncpy((dest),(src),(size))
data/crawl-0.25.1/source/MSVC/include/dirent.h:208: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 (dirname) + 3 >= MAX_PATH) {
data/crawl-0.25.1/source/MSVC/include/dirent.h:301:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   dirp->curentry.d_namlen = strlen (dirp->curentry.d_name);
data/crawl-0.25.1/source/MSVC/include/unistd.h:29:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
#define usleep(n) Sleep(n/1000)
data/crawl-0.25.1/source/catch2-tests/catch.hpp:3677:29:  [1] (buffer) is_permutation:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                return std::is_permutation(m_target.begin(), m_target.end(), vec.begin());
data/crawl-0.25.1/source/catch2-tests/catch.hpp:13279:36:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            static_cast<void>(std::getchar());
data/crawl-0.25.1/source/catch2-tests/catch.hpp:13284:36:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            static_cast<void>(std::getchar());
data/crawl-0.25.1/source/catch2-tests/catch.hpp:13581:50:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        return s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin());
data/crawl-0.25.1/source/catch2-tests/catch.hpp:13587:50:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        return s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin());
data/crawl-0.25.1/source/catch2-tests/catch.hpp:13675:67:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    : StringRef( rawChars, static_cast<StringRef::size_type>(std::strlen(rawChars) ) )
data/crawl-0.25.1/source/cio.cc:519:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    length = strlen(buffer);
data/crawl-0.25.1/source/cio.cc:593:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buffer, prefill.c_str(), bufsz);
data/crawl-0.25.1/source/cio.cc:646:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    tiles.json_write_int("size", (int) min(bufsz - 1, strlen(buffer) + 15));
data/crawl-0.25.1/source/cio.cc:761: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).
    memmove(word, cur, strlen(cur) + 1);
data/crawl-0.25.1/source/clua.cc:256: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).
    return loadbuffer(s, strlen(s), context);
data/crawl-0.25.1/source/clua.cc:512: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).
        return strlen(gs + 1);
data/crawl-0.25.1/source/clua.cc:1040: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).
                i += strlen(lop.token) - 1;
data/crawl-0.25.1/source/command.cc:143: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).
        for (int i = strlen(buf) - 1; i >= 0; i++)
data/crawl-0.25.1/source/dbg-asrt.cc:828: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).
    const char *fileName = file + strlen(file); // strip off path
data/crawl-0.25.1/source/describe-god.cc:453: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).
        width = max(width, strlen(branches[br].shortname));
data/crawl-0.25.1/source/describe.cc:2684:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    case CMD_READ:             read(&item);                         break;
data/crawl-0.25.1/source/dgl-message.cc:81: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).
        const int len = strlen(line);
data/crawl-0.25.1/source/dgn-overview.cc:290:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    : string(max<int>(width - strlen(buffer), 0), ' ');
data/crawl-0.25.1/source/dgn-overview.cc:354: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).
                        : string(20 + 21 - strlen(buffer), ' ');
data/crawl-0.25.1/source/dlua.cc:90:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void dlua_chunk::read(reader& inf)
data/crawl-0.25.1/source/dlua.h:72:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(reader&);
data/crawl-0.25.1/source/dungeon.cc:6438:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(reader &th)
data/crawl-0.25.1/source/dungeon.cc:6484:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            connectivity[i][e].read(th);
data/crawl-0.25.1/source/files.cc:154:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int off = name.length() - strlen(SAVE_SUFFIX);
data/crawl-0.25.1/source/files.cc:690:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (!rd.read(buf, 1))
data/crawl-0.25.1/source/files.cc:2577:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        inf.read(nullptr, 3*4);
data/crawl-0.25.1/source/files.cc:3189:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        inf.read(&buf[0], len);
data/crawl-0.25.1/source/files.cc:3195:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            th.read(&format, 1);
data/crawl-0.25.1/source/fontwrapper-ft.cc:619:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                for (unsigned i = 0; i < strlen(".."); i++)
data/crawl-0.25.1/source/hiscores.cc:1305: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).
        str.erase(0, pos + strlen(infix));
data/crawl-0.25.1/source/initfile.cc:4112: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).
            if (!*chunk || strlen(chunk) > MAX_CHUNK_NAME_LENGTH)
data/crawl-0.25.1/source/initfile.cc:4128:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            while (size_t s = inc.read(buf, sizeof(buf)))
data/crawl-0.25.1/source/initfile.cc:4139: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).
            if (!*chunk || strlen(chunk) > MAX_CHUNK_NAME_LENGTH)
data/crawl-0.25.1/source/initfile.cc:4164: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).
            if (!*chunk || strlen(chunk) > MAX_CHUNK_NAME_LENGTH)
data/crawl-0.25.1/source/initfile.cc:4181:38:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                while (plen_t s = in.read(buf, sizeof(buf)))
data/crawl-0.25.1/source/initfile.cc:4206:38:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                while (plen_t s = in.read(buf, sizeof(buf)))
data/crawl-0.25.1/source/initfile.cc:4778: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).
            && (next_arg[0] != '-' || strlen(next_arg) == 1))
data/crawl-0.25.1/source/item-use.cc:2937:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void read(item_def* scroll)
data/crawl-0.25.1/source/item-use.cc:3545:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                read(&you.inv[idx]);
data/crawl-0.25.1/source/item-use.h:36:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void read(item_def* scroll = nullptr);
data/crawl-0.25.1/source/items.cc:4197: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).
        strlcpy(specs, _specs, min(strlen(_specs) - strlen(" of zot") + 1,
data/crawl-0.25.1/source/items.cc:4197:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        strlcpy(specs, _specs, min(strlen(_specs) - strlen(" of zot") + 1,
data/crawl-0.25.1/source/items.cc:4203:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(specs) > 4)
data/crawl-0.25.1/source/json.cc:43: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).
    char *ret = (char*)malloc(strlen(str) + 1);
data/crawl-0.25.1/source/json.cc:106: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).
    sb_put(sb, str, strlen(str));
data/crawl-0.25.1/source/json.cc:113:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ASSERT(strlen(sb->start) == (size_t)(sb->cur - sb->start));
data/crawl-0.25.1/source/l-crawl.cc:433:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(keys) == 0)
data/crawl-0.25.1/source/l-crawl.cc:451: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).
    for (int i = 1, len = strlen(keys); i < len; i++)
data/crawl-0.25.1/source/l-crawl.cc:1328: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_loadbuffer(dlua, code, strlen(code), "call_dlua");
data/crawl-0.25.1/source/libunix.cc:693:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (write(1, KPADAPP, strlen(KPADAPP))) {};
data/crawl-0.25.1/source/libunix.cc:752:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (write(1, KPADCUR, strlen(KPADCUR))) {};
data/crawl-0.25.1/source/libunix.cc:1548:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(time * 1000);
data/crawl-0.25.1/source/lookup-help.cc:1307: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).
    const string regex = strlen(buf) == 1 ? buf : trimmed_string(buf);
data/crawl-0.25.1/source/luaterp.cc:49: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(b);
data/crawl-0.25.1/source/macro.cc:248: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).
        const int len = strlen(buff);
data/crawl-0.25.1/source/main.cc:1835:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    case CMD_READ:                 read();                   break;
data/crawl-0.25.1/source/main.cc:2589:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(buf) == 0)
data/crawl-0.25.1/source/main.cc:2661:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(500000);
data/crawl-0.25.1/source/mapdef.cc:264:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void level_range::read(reader& inf)
data/crawl-0.25.1/source/mapdef.cc:1880: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).
        const size_t len = strlen(str);
data/crawl-0.25.1/source/mapdef.cc:2124:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void map_chance::read(reader &inf)
data/crawl-0.25.1/source/mapdef.cc:2143:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void depth_ranges::read(reader &inf)
data/crawl-0.25.1/source/mapdef.cc:2150:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        lr.read(inf);
data/crawl-0.25.1/source/mapdef.cc:2410:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    prelude.read(inf);
data/crawl-0.25.1/source/mapdef.cc:2411:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    mapchunk.read(inf);
data/crawl-0.25.1/source/mapdef.cc:2412:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    main.read(inf);
data/crawl-0.25.1/source/mapdef.cc:2413:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    validate.read(inf);
data/crawl-0.25.1/source/mapdef.cc:2414:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    veto.read(inf);
data/crawl-0.25.1/source/mapdef.cc:2415:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    epilogue.read(inf);
data/crawl-0.25.1/source/mapdef.cc:2508:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    chance.read(th);
data/crawl-0.25.1/source/mapdef.cc:2549:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    _chance = range_chance_t::read(inf, _unmarshall_map_chance);
data/crawl-0.25.1/source/mapdef.cc:2550:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    _weight = range_weight_t::read(inf, unmarshallInt);
data/crawl-0.25.1/source/mapdef.cc:2555:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    place.read(inf);
data/crawl-0.25.1/source/mapdef.cc:2556:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    depths.read(inf);
data/crawl-0.25.1/source/mapdef.cc:2557:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    prelude.read(inf);
data/crawl-0.25.1/source/mapdef.cc:4326: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).
        s = s.substr(0, s.length() - strlen(zombie_types[mod - 1]));
data/crawl-0.25.1/source/mapdef.h:120:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(reader&);
data/crawl-0.25.1/source/mapdef.h:963:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(reader &);
data/crawl-0.25.1/source/mapdef.h:974:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(reader &);
data/crawl-0.25.1/source/mapdef.h:1001:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static depth_range_X read(reader &inf, reader_fn_type reader_fn)
data/crawl-0.25.1/source/mapdef.h:1004:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        range_x.depths.read(inf);
data/crawl-0.25.1/source/mapdef.h:1052:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static depth_ranges_X read(reader &inf, reader_fn_type reader_fn)
data/crawl-0.25.1/source/mapdef.h:1060:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                depth_range_X<X>::read(inf, reader_fn));
data/crawl-0.25.1/source/mapmark.cc:30:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    &map_feature_marker::read,
data/crawl-0.25.1/source/mapmark.cc:31:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    &map_lua_marker::read,
data/crawl-0.25.1/source/mapmark.cc:32:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    &map_corruption_marker::read,
data/crawl-0.25.1/source/mapmark.cc:33:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    &map_wiz_props_marker::read,
data/crawl-0.25.1/source/mapmark.cc:34:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    &map_tomb_marker::read,
data/crawl-0.25.1/source/mapmark.cc:35:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    &map_malign_gateway_marker::read,
data/crawl-0.25.1/source/mapmark.cc:37:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    &map_phoenix_marker::read,
data/crawl-0.25.1/source/mapmark.cc:39:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    &map_position_marker::read,
data/crawl-0.25.1/source/mapmark.cc:41:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    &map_door_seal_marker::read,
data/crawl-0.25.1/source/mapmark.cc:43:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    &map_terrain_change_marker::read,
data/crawl-0.25.1/source/mapmark.cc:44:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    &map_cloud_spreader_marker::read
data/crawl-0.25.1/source/mapmark.cc:79:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void map_marker::read(reader &inf)
data/crawl-0.25.1/source/mapmark.cc:134:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void map_feature_marker::read(reader &inf)
data/crawl-0.25.1/source/mapmark.cc:136:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    map_marker::read(inf);
data/crawl-0.25.1/source/mapmark.cc:145:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
map_marker *map_feature_marker::read(reader &inf, map_marker_type)
data/crawl-0.25.1/source/mapmark.cc:148:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    mapf->read(inf);
data/crawl-0.25.1/source/mapmark.cc:296:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void map_lua_marker::read(reader &inf)
data/crawl-0.25.1/source/mapmark.cc:298:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    map_marker::read(inf);
data/crawl-0.25.1/source/mapmark.cc:314:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
map_marker *map_lua_marker::read(reader &inf, map_marker_type)
data/crawl-0.25.1/source/mapmark.cc:317:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    marker->read(inf);
data/crawl-0.25.1/source/mapmark.cc:473:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void map_corruption_marker::read(reader &in)
data/crawl-0.25.1/source/mapmark.cc:475:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    map_marker::read(in);
data/crawl-0.25.1/source/mapmark.cc:479:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
map_marker *map_corruption_marker::read(reader &in, map_marker_type)
data/crawl-0.25.1/source/mapmark.cc:482:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    mc->read(in);
data/crawl-0.25.1/source/mapmark.cc:523:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void map_wiz_props_marker::read(reader &inf)
data/crawl-0.25.1/source/mapmark.cc:525:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    map_marker::read(inf);
data/crawl-0.25.1/source/mapmark.cc:557:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
map_marker *map_wiz_props_marker::read(reader &inf, map_marker_type)
data/crawl-0.25.1/source/mapmark.cc:560:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    mapf->read(inf);
data/crawl-0.25.1/source/mapmark.cc:591:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void map_tomb_marker::read(reader &in)
data/crawl-0.25.1/source/mapmark.cc:593:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    map_marker::read(in);
data/crawl-0.25.1/source/mapmark.cc:599:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
map_marker *map_tomb_marker::read(reader &in, map_marker_type)
data/crawl-0.25.1/source/mapmark.cc:602:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    mc->read(in);
data/crawl-0.25.1/source/mapmark.cc:642:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void map_malign_gateway_marker::read(reader &in)
data/crawl-0.25.1/source/mapmark.cc:644:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    map_marker::read(in);
data/crawl-0.25.1/source/mapmark.cc:656:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
map_marker *map_malign_gateway_marker::read(reader &in, map_marker_type)
data/crawl-0.25.1/source/mapmark.cc:659:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    mc->read(in);
data/crawl-0.25.1/source/mapmark.cc:699:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void map_phoenix_marker::read(reader &in)
data/crawl-0.25.1/source/mapmark.cc:701:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    map_marker::read(in);
data/crawl-0.25.1/source/mapmark.cc:711:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
map_marker *map_phoenix_marker::read(reader &in, map_marker_type)
data/crawl-0.25.1/source/mapmark.cc:714:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    mc->read(in);
data/crawl-0.25.1/source/mapmark.cc:748:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void map_door_seal_marker::read(reader &in)
data/crawl-0.25.1/source/mapmark.cc:750:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    map_marker::read(in);
data/crawl-0.25.1/source/mapmark.cc:757:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
map_marker *map_door_seal_marker::read(reader &in, map_marker_type)
data/crawl-0.25.1/source/mapmark.cc:760:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    mc->read(in);
data/crawl-0.25.1/source/mapmark.cc:799:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void map_terrain_change_marker::read(reader &in)
data/crawl-0.25.1/source/mapmark.cc:801:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    map_marker::read(in);
data/crawl-0.25.1/source/mapmark.cc:816:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
map_marker *map_terrain_change_marker::read(reader &in, map_marker_type)
data/crawl-0.25.1/source/mapmark.cc:819:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    mc->read(in);
data/crawl-0.25.1/source/mapmark.cc:874:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void map_cloud_spreader_marker::read(reader &in)
data/crawl-0.25.1/source/mapmark.cc:876:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    map_marker::read(in);
data/crawl-0.25.1/source/mapmark.cc:888:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
map_marker *map_cloud_spreader_marker::read(reader &in, map_marker_type)
data/crawl-0.25.1/source/mapmark.cc:891:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    mc->read(in);
data/crawl-0.25.1/source/mapmark.cc:934:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void map_position_marker::read(reader &inf)
data/crawl-0.25.1/source/mapmark.cc:936:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    map_marker::read(inf);
data/crawl-0.25.1/source/mapmark.cc:951:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
map_marker *map_position_marker::read(reader &inf, map_marker_type)
data/crawl-0.25.1/source/mapmark.cc:954:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    mapf->read(inf);
data/crawl-0.25.1/source/mapmark.cc:1233:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void map_markers::read(reader &inf)
data/crawl-0.25.1/source/mapmark.h:62:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    virtual void read(reader &);
data/crawl-0.25.1/source/mapmark.h:89:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(reader &) override;
data/crawl-0.25.1/source/mapmark.h:92:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static map_marker *read(reader &, map_marker_type);
data/crawl-0.25.1/source/mapmark.h:107:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(reader &) override;
data/crawl-0.25.1/source/mapmark.h:111:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static map_marker *read(reader &, map_marker_type);
data/crawl-0.25.1/source/mapmark.h:124:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(reader &) override;
data/crawl-0.25.1/source/mapmark.h:128:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static map_marker *read(reader &, map_marker_type);
data/crawl-0.25.1/source/mapmark.h:143:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read (reader &) override;
data/crawl-0.25.1/source/mapmark.h:147:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static map_marker *read(reader &, map_marker_type);
data/crawl-0.25.1/source/mapmark.h:171:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read (reader &) override;
data/crawl-0.25.1/source/mapmark.h:175:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static map_marker *read(reader &, map_marker_type);
data/crawl-0.25.1/source/mapmark.h:196:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read (reader &) override;
data/crawl-0.25.1/source/mapmark.h:200:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static map_marker *read(reader &, map_marker_type);
data/crawl-0.25.1/source/mapmark.h:220:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read (reader &) override;
data/crawl-0.25.1/source/mapmark.h:224:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static map_marker *read(reader &, map_marker_type);
data/crawl-0.25.1/source/mapmark.h:245:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(reader &) override;
data/crawl-0.25.1/source/mapmark.h:249:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static map_marker *read(reader &, map_marker_type);
data/crawl-0.25.1/source/mapmark.h:276:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(reader &) override;
data/crawl-0.25.1/source/mapmark.h:283:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static map_marker *read(reader &, map_marker_type);
data/crawl-0.25.1/source/mapmark.h:306:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(reader &) override;
data/crawl-0.25.1/source/mapmark.h:311:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static map_marker *read(reader &, map_marker_type);
data/crawl-0.25.1/source/mapmark.h:328:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(reader &) override;
data/crawl-0.25.1/source/mapmark.h:331:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static map_marker *read(reader &, map_marker_type);
data/crawl-0.25.1/source/mapmark.h:370:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(reader &);
data/crawl-0.25.1/source/maps.cc:285:9:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    int mismatch[4];
data/crawl-0.25.1/source/maps.cc:288:5:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    mismatch[0] = map.subvault_mismatch_count(svplace);
data/crawl-0.25.1/source/maps.cc:290:5:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    mismatch[1] = map.subvault_mismatch_count(svplace);
data/crawl-0.25.1/source/maps.cc:292:5:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    mismatch[2] = map.subvault_mismatch_count(svplace);
data/crawl-0.25.1/source/maps.cc:294:5:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    mismatch[3] = map.subvault_mismatch_count(svplace);
data/crawl-0.25.1/source/maps.cc:296:24:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    int min_mismatch = mismatch[0];
data/crawl-0.25.1/source/maps.cc:298:42:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        min_mismatch = min(min_mismatch, mismatch[1]);
data/crawl-0.25.1/source/maps.cc:300:42:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        min_mismatch = min(min_mismatch, mismatch[2]);
data/crawl-0.25.1/source/maps.cc:302:42:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        min_mismatch = min(min_mismatch, mismatch[3]);
data/crawl-0.25.1/source/maps.cc:305:38:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    min_mismatch = min(min_mismatch, mismatch[2]);
data/crawl-0.25.1/source/maps.cc:307:42:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        min_mismatch = min(min_mismatch, mismatch[3]);
data/crawl-0.25.1/source/maps.cc:311:12:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    while (mismatch[idx] != min_mismatch)
data/crawl-0.25.1/source/maps.cc:1282:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        lc_global_prelude.read(inf);
data/crawl-0.25.1/source/message.cc:1625:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, input->get_text().c_str(), len - 1);
data/crawl-0.25.1/source/mon-act.cc:1043:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read)
data/crawl-0.25.1/source/mon-act.cc:1054:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return read;
data/crawl-0.25.1/source/mutation.cc:1965:17:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
            if (mismatch && (disallow_mismatch || !one_chance_in(10)))
data/crawl-0.25.1/source/output.cc:1179: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).
    CGOTOXY(1 + crawl_view.hudsz.x - (3 + strlen(word)), 1, GOTO_STAT);
data/crawl-0.25.1/source/package.cc:163:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t res = ::read(fd, &head, sizeof(file_header));
data/crawl-0.25.1/source/package.cc:532:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while (plen_t res = rd.read(&ch0, sizeof(dir_entry0)))
data/crawl-0.25.1/source/package.cc:537: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).
            chname.resize(strlen(chname.c_str()));
data/crawl-0.25.1/source/package.cc:545:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while (plen_t res = rd.read(&name_len, sizeof(name_len)))
data/crawl-0.25.1/source/package.cc:551:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (rd.read(&chname[0], name_len) != name_len)
data/crawl-0.25.1/source/package.cc:553:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (rd.read(&bstart, sizeof(bstart)) != sizeof(bstart))
data/crawl-0.25.1/source/package.cc:587:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ssize_t res = ::read(fd, &bl, sizeof(block_header));
data/crawl-0.25.1/source/package.cc:873:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ssize_t res = ::read(pkg->fd, &bl, sizeof(block_header));
data/crawl-0.25.1/source/package.cc:892:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ssize_t res = ::read(pkg->fd, buf, s);
data/crawl-0.25.1/source/package.cc:907:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
plen_t chunk_reader::read(void *data, plen_t len)
data/crawl-0.25.1/source/package.cc:953:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        s = read(&data[at], SPACE);
data/crawl-0.25.1/source/package.h:60:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    plen_t read(void *data, plen_t len);
data/crawl-0.25.1/source/pattern.h:94: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).
        return matches(s, strlen(s));
data/crawl-0.25.1/source/pattern.h:106: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).
        return match_location(s, strlen(s));
data/crawl-0.25.1/source/prebuilt/levcomp.lex.cc:1831: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).
        s = text + strlen(text) - 1;
data/crawl-0.25.1/source/prebuilt/levcomp.lex.cc:1838: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).
            s = text + strlen(text) - 1;
data/crawl-0.25.1/source/prebuilt/levcomp.lex.cc:1844: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).
        const int original_length = strlen(text);
data/crawl-0.25.1/source/prebuilt/levcomp.lex.cc:1894: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).
        char *newbuf = (char*) malloc(strlen(yylval.text) + strlen(yytext) + 1);
data/crawl-0.25.1/source/prebuilt/levcomp.lex.cc:1894:61:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        char *newbuf = (char*) malloc(strlen(yylval.text) + strlen(yytext) + 1);
data/crawl-0.25.1/source/prebuilt/levcomp.lex.cc:2026:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
data/crawl-0.25.1/source/prebuilt/levcomp.lex.cc:3477: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).
	return yy_scan_bytes( yystr, (int) strlen(yystr) );
data/crawl-0.25.1/source/prebuilt/levcomp.tab.cc:1024: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).
#   define yystrlen strlen
data/crawl-0.25.1/source/precision-menu.cc:768:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buf, prefill.c_str(), e_width);
data/crawl-0.25.1/source/rltiles/tool/tile_list_processor.cc:146: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).
    char *idx = &text[strlen(text) - 1];
data/crawl-0.25.1/source/sound.cc:87:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (file && *file && (strlen(file) + strlen(SOUND_PLAY_COMMAND) < 255)
data/crawl-0.25.1/source/sound.cc:87:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (file && *file && (strlen(file) + strlen(SOUND_PLAY_COMMAND) < 255)
data/crawl-0.25.1/source/sqldbm.cc:41:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(1000);
data/crawl-0.25.1/source/store.cc:547:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void CrawlStoreValue::read(reader &th)
data/crawl-0.25.1/source/store.cc:619:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        hash->read(th);
data/crawl-0.25.1/source/store.cc:628:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        vec->read(th);
data/crawl-0.25.1/source/store.cc:664:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        chunk.read(th);
data/crawl-0.25.1/source/store.cc:1227:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void CrawlHashTable::read(reader &th)
data/crawl-0.25.1/source/store.cc:1248:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        val.read(th);
data/crawl-0.25.1/source/store.cc:1411:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void CrawlVector::read(reader &th)
data/crawl-0.25.1/source/store.cc:1464:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        vec[i].read(th);
data/crawl-0.25.1/source/store.h:236:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(reader &);
data/crawl-0.25.1/source/store.h:250:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(reader &);
data/crawl-0.25.1/source/store.h:311:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(reader &);
data/crawl-0.25.1/source/stringutil.cc:21: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).
        return strlen(src);
data/crawl-0.25.1/source/syscalls.cc:228:6:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
void usleep(unsigned long time)
data/crawl-0.25.1/source/syscalls.cc:240:6:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
void usleep(unsigned long time)
data/crawl-0.25.1/source/syscalls.cc:296:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                           name.substr(strlen(ANDROID_ASSETS)
data/crawl-0.25.1/source/syscalls.cc:321: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).
    string out = in.substr(strlen(ANDROID_ASSETS) + 1);
data/crawl-0.25.1/source/syscalls.cc:505:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                           path + strlen(ANDROID_ASSETS) + 1,
data/crawl-0.25.1/source/syscalls.h:31:6:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
void usleep(unsigned long time);
data/crawl-0.25.1/source/tags.cc:144:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read(junk, junklen);
data/crawl-0.25.1/source/tags.cc:168:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int b = fgetc(_file);
data/crawl-0.25.1/source/tags.cc:176:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (_chunk->read(&buf, 1) != 1)
data/crawl-0.25.1/source/tags.cc:188:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void reader::read(void *data, size_t size)
data/crawl-0.25.1/source/tags.cc:202:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (_chunk->read(data, size) != size)
data/crawl-0.25.1/source/tags.cc:230:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (_chunk ? _chunk->read(&dummy, 1) :
data/crawl-0.25.1/source/tags.cc:231:18:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        _file ? (fgetc(_file) != EOF) :
data/crawl-0.25.1/source/tags.cc:841:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    th.read(buffer, len);
data/crawl-0.25.1/source/tags.cc:874:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        th.read(&s.at(0), len);
data/crawl-0.25.1/source/tags.cc:1242:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    inf.read(&buf[0], buf.size());
data/crawl-0.25.1/source/tags.cc:3861:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        rng_states.read(th);
data/crawl-0.25.1/source/tags.cc:3884:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    you.props.read(th);
data/crawl-0.25.1/source/tags.cc:4065:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        old_type_id_props.read(th);
data/crawl-0.25.1/source/tags.cc:4763:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    item.props.read(th);
data/crawl-0.25.1/source/tags.cc:5907:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    mi.props.read(th);
data/crawl-0.25.1/source/tags.cc:6153:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    env.markers.read(th);
data/crawl-0.25.1/source/tags.cc:6183:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    env.properties.read(th);
data/crawl-0.25.1/source/tags.cc:6699:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    m.props.read(th);
data/crawl-0.25.1/source/tags.h:114:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(void *data, size_t size);
data/crawl-0.25.1/source/tiledoll.cc:133:13:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
        if (fscanf(fp, "%1023s", fbuf) != EOF)
data/crawl-0.25.1/source/tiledoll.cc:141:13:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
        if (fscanf(fp, "%1023s", fbuf) != EOF)
data/crawl-0.25.1/source/tiledoll.cc:166:20:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
            while (fscanf(fp, "%1023s", fbuf) != EOF)
data/crawl-0.25.1/source/tiledoll.cc:181:48:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
            for (int count = 0; count < max && fscanf(fp, "%1023s", fbuf) != EOF;)
data/crawl-0.25.1/source/tiledoll.cc:548: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).
    dollf.write(fbuf, strlen(fbuf));
data/crawl-0.25.1/source/tileweb.cc:240:25:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
                        usleep(sleep_time);
data/crawl-0.25.1/source/ui.cc:2129: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).
    memmove(word, cur, strlen(cur) + 1);
data/crawl-0.25.1/source/ui.cc:3329:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(max(0, min(poll_interval, remaining)));
data/crawl-0.25.1/source/unicode.cc:255:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (fgetc(f) != (unsigned char)*bytes++)
data/crawl-0.25.1/source/unicode.cc:275:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int ch = fgetc(f);
data/crawl-0.25.1/source/util/fake_pty.c:48:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read(tty, buf, sizeof(buf)) <= 0)
data/crawl-0.25.1/source/wiz-mon.cc:71:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(specs) >= 3 && partial != MONS_PROGRAM_BUG)
data/crawl-0.25.1/source/wiz-you.cc:613: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).
        max_len = max(strlen(duration_name(dur)), max_len);
data/crawl-0.25.1/source/wiz-you.cc:648:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(buf) == 1 && isalower(buf[0]))

ANALYSIS SUMMARY:

Hits = 769
Lines analyzed = 459754 in approximately 14.03 seconds (32760 lines/second)
Physical Source Lines of Code (SLOC) = 352520
Hits@level = [0] 843 [1] 265 [2] 369 [3]  70 [4]  64 [5]   1
Hits@level+ = [0+] 1612 [1+] 769 [2+] 504 [3+] 135 [4+]  65 [5+]   1
Hits/KSLOC@level+ = [0+] 4.57279 [1+] 2.18144 [2+] 1.42971 [3+] 0.382957 [4+] 0.184387 [5+] 0.00283672
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.