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/lincity-ng-2.9~git20150314/src/PhysfsStream/PhysfsSDL.hpp
Examining data/lincity-ng-2.9~git20150314/src/PhysfsStream/PhysfsStream.cpp
Examining data/lincity-ng-2.9~git20150314/src/PhysfsStream/PhysfsSDL.cpp
Examining data/lincity-ng-2.9~git20150314/src/PhysfsStream/PhysfsStream.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/EconomyGraph.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/Mps.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/MainMenu.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/MainMenu.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/Sound.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/Util.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/main.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/ButtonPanel.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/GameView.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/Dialog.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/MiniMap.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/MiniMap.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/PBar.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/Util.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/MapEdit.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/Debug.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/ReadPngInterface.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/readdir.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/Mps.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/ErrorInterface.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/CheckButton.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/MapPoint.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/PbarInterface.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/MainLincity.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/getBundleSharePath.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/Sound.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/Debug.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/readdir.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/ButtonPanel.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/GameView.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/Permutator.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/main.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/Game.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/MapEdit.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/ScreenInterface.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/Config.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/MainLincity.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/Config.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/Permutator.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/ErrorInterface.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/EconomyGraph.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/HelpWindow.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/HelpWindow.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/CheckButton.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/TimerInterface.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/Dialog.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/Game.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/ButtonInterface.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/ScreenInterface.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/PBar.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.h
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/MpsInterface.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity-ng/TimerInterface.hpp
Examining data/lincity-ng-2.9~git20150314/src/TinyLandGen/ground_sea.cpp
Examining data/lincity-ng-2.9~git20150314/src/TinyLandGen/save.cpp
Examining data/lincity-ng-2.9~git20150314/src/TinyLandGen/lctypes.h
Examining data/lincity-ng-2.9~git20150314/src/TinyLandGen/ecology.cpp
Examining data/lincity-ng-2.9~git20150314/src/TinyLandGen/lakes_rivers.cpp
Examining data/lincity-ng-2.9~git20150314/src/TinyLandGen/main.cpp
Examining data/lincity-ng-2.9~git20150314/src/tools/xmlgettext/XmlReader.cpp
Examining data/lincity-ng-2.9~git20150314/src/tools/xmlgettext/XmlReader.hpp
Examining data/lincity-ng-2.9~git20150314/src/tools/xmlgettext/main.cpp
Examining data/lincity-ng-2.9~git20150314/src/tinygettext/gettext.hpp
Examining data/lincity-ng-2.9~git20150314/src/tinygettext/tinygettext.hpp
Examining data/lincity-ng-2.9~git20150314/src/tinygettext/findlocale.cpp
Examining data/lincity-ng-2.9~git20150314/src/tinygettext/tinygettext.cpp
Examining data/lincity-ng-2.9~git20150314/src/tinygettext/findlocale.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Document.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/TooltipManager.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Child.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/DocumentImage.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Image.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/ScrollView.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Paragraph.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/SwitchComponent.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Component.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Style.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Desktop.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/FilledRectangle.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/ScrollBar.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Button.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Panel.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Event.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/ComponentLoader.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Vector2.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Panel.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/ScrollBar.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Color.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Color.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Rect2D.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/TextureManager.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/TooltipManager.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/callback/Signal.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/callback/CallbackBase.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/callback/Callback.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/TableLayout.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Document.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/XmlReader.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Window.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/FilledRectangle.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/SwitchComponent.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Child.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Image.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Window.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/XmlReader.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Button.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Desktop.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/ComponentLoader.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/FontManager.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Gradient.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/FontManager.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Rect2D.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Style.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/PainterSDL/TextureSDL.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/PainterSDL/TextureManagerSDL.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/PainterSDL/PainterSDL.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/PainterSDL/PainterSDL.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/PainterSDL/TextureManagerSDL.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/PainterSDL/TextureSDL.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Filter.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/ComponentFactory.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Component.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/DocumentElement.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/TableLayout.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Filter.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/ScrollView.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/DocumentImage.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Painter.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Gradient.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Texture.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Paragraph.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/TextureManager.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/Event.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/PainterGL/TextureGL.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/PainterGL/PainterGL.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/PainterGL/TextureManagerGL.hpp
Examining data/lincity-ng-2.9~git20150314/src/gui/PainterGL/TextureManagerGL.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/PainterGL/TextureGL.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/PainterGL/PainterGL.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui/ComponentFactory.hpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/xmlloadsave.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/ConstructionManager.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/simulate.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/commune.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/commune.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/shanty.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/track_road_rail.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/coalmine.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/organic_farm.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/tip.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/solar_power.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/all_modules.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/heavy_industry.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/windmill.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/university.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/mill.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/windmill.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/rocket_pad.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/waterwell.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/university.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/oremine.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/oremine.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/pottery.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/firestation.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/coalmine.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/fire.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/pottery.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/windpower.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/power_line.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/substation.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/rocket_pad.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/health_centre.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/modules_interfaces.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/substation.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/power_line.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/monument.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/water.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/port.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/firestation.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/mill.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/tip.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/modules.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/fire.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/market.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/school.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/blacksmith.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/health_centre.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/recycle.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/blacksmith.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/light_industry.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/monument.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/waterwell.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/all_modules.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/heavy_industry.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/shanty.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/light_industry.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/residence.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/cricket.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/school.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/track_road_rail.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/solar_power.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/coal_power.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/market.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/parkland.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/recycle.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/parkland.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/cricket.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/residence.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/windpower.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/port.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/organic_farm.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/water.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/modules/coal_power.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/ConstructionCount.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/xmlloadsave.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/ConstructionRequest.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/stats.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/UserOperation.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/lcstring.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/transport.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/world.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/confw32.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/lclib.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/loadsave.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/ConstructionManager.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/init_game.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/lctypes.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/lin-city.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/old_ldsvguts.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/Vehicles.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/simulate.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/fileutil.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/UserOperation.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/ConstructionCount.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/engglobs.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/ConstructionRequest.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/all_buildings.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/stats.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/engglobs.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/lintypes.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/lc_locale.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/groups.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/lc_locale.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/Vehicles.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/transport.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/sustainable.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/loadsave.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/engine.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/all_buildings.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/init_game.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/lclib.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/lcconfig.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/lintypes.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/old_ldsvguts.cpp
Examining data/lincity-ng-2.9~git20150314/src/lincity/world.h
Examining data/lincity-ng-2.9~git20150314/src/lincity/engine.cpp
Examining data/lincity-ng-2.9~git20150314/src/gui_interface/readpng.h
Examining data/lincity-ng-2.9~git20150314/src/gui_interface/screen_interface.h
Examining data/lincity-ng-2.9~git20150314/src/gui_interface/mps.h
Examining data/lincity-ng-2.9~git20150314/src/gui_interface/dialbox_interface.h
Examining data/lincity-ng-2.9~git20150314/src/gui_interface/shared_globals.h
Examining data/lincity-ng-2.9~git20150314/src/gui_interface/pbar_interface.h
Examining data/lincity-ng-2.9~git20150314/contrib/autocrop.cxx
Examining data/lincity-ng-2.9~git20150314/mk/msvc/config.h
Examining data/lincity-ng-2.9~git20150314/mk/msvc/iconv.h
Examining data/lincity-ng-2.9~git20150314/mk/msvc/stdint.h

FINAL RESULTS:

data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:79:10:  [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.
		size = readlink (path2, path, buf_size - 1);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:23:9:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
#define chown(x,y,z)
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:449:9:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
    if (chown(lc_save_dir, getuid(), getgid()) == -1) {
data/lincity-ng-2.9~git20150314/src/lincity/loadsave.cpp:50:9:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
#define chown(x,y,z)
data/lincity-ng-2.9~git20150314/src/lincity/old_ldsvguts.cpp:48:9:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
#define chown(x,y,z)
data/lincity-ng-2.9~git20150314/mk/msvc/config.h:93: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/lincity-ng-2.9~git20150314/mk/msvc/config.h:93: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/lincity-ng-2.9~git20150314/mk/msvc/config.h:96:9:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
#define popen _popen
data/lincity-ng-2.9~git20150314/src/lincity-ng/Dialog.cpp:495:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (s, "%s%c%s", lc_save_dir, PATH_SLASH, RESULTS_FILENAME);
data/lincity-ng-2.9~git20150314/src/lincity-ng/MainMenu.cpp:902:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy (given_scene, baseName.c_str());
data/lincity-ng-2.9~git20150314/src/lincity-ng/getBundleSharePath.cpp:60:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
 	(void)strcat(path, packageName);
data/lincity-ng-2.9~git20150314/src/lincity-ng/main.cpp:83:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(writedir, "%s%s", userdir, application);
data/lincity-ng-2.9~git20150314/src/lincity-ng/main.cpp:87:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(mkdir, "%s", application);
data/lincity-ng-2.9~git20150314/src/lincity-ng/main.cpp:109:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(writedir, "%s.lincity", userdir);
data/lincity-ng-2.9~git20150314/src/lincity-ng/main.cpp:128:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(str, "%s%s%s", d, dirsep, *i);
data/lincity-ng-2.9~git20150314/src/lincity-ng/main.cpp:638:9:  [4] (shell) execlp:
  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.
        execlp( argv[0], fixWhiteSpaceInPathnameProblem.c_str(), (char *) NULL );
data/lincity-ng-2.9~git20150314/src/lincity-ng/main.cpp:640:9:  [4] (shell) execlp:
  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.
        execlp( argv[0], argv[0], (char *) NULL );
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:146:12:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    return access(path, mode)
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:196: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(LIBDIR, default_dir);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:207:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(LIBDIR, __XOS2RedirRoot(OS2_DEFAULT_LIBDIR));
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:347:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(message_path, "%s%c%s%c%s%c", LIBDIR, PATH_SLASH, "messages", PATH_SLASH, intl_suffix, PATH_SLASH);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:355:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(help_path, "%s%c%s%c%s%c", LIBDIR, PATH_SLASH, "help", PATH_SLASH, intl_suffix, PATH_SLASH);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:368:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(message_path, "%s%c%s%c", LIBDIR, PATH_SLASH, "messages", PATH_SLASH);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:372:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(help_path, "%s%c%s%c", LIBDIR, PATH_SLASH, "help", PATH_SLASH);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:387:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(lc_save_dir, "%s%c%s", homedir, PATH_SLASH, LC_SAVE_DIR);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:388:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(colour_pal_file, "%s%c%s", LIBDIR, PATH_SLASH, "colour.pal");
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:389:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(opening_path, "%s%c%s", LIBDIR, PATH_SLASH, "opening");
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:391:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(opening_pic, "%s%c%s", opening_path, PATH_SLASH, "open.tga");
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:393:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(opening_pic, "%s%c%s", opening_path, PATH_SLASH, "open.tga.gz");
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:395:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(graphic_path, "%s%c%s%c", LIBDIR, PATH_SLASH, "icons", PATH_SLASH);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:396:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(lincityrc_file, "%s%c%s", homedir, PATH_SLASH, LINCITYRC_FILENAME);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:402:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fontfile, "%s%c%s", opening_path, PATH_SLASH, "iso8859-1-8x8.raw");
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:409:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(lc_temp_filename, "%s%c%s", lc_save_dir, PATH_SLASH, "tmp-file");
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:414:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(lc_textdomain_directory, "%s%c%s", LIBDIR, PATH_SLASH, "locale");
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:416: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(lc_textdomain_directory, LOCALEDIR);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:480: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(ss, graphic_path);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:481:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(ss, s);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:535: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(fp, fmt, argptr);
data/lincity-ng-2.9~git20150314/src/lincity/lin-city.h:32:12:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#   define snprintf _snprintf
data/lincity-ng-2.9~git20150314/src/lincity/lin-city.h:32:21:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#   define snprintf _snprintf
data/lincity-ng-2.9~git20150314/src/lincity/xmlloadsave.cpp:758:69:  [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).
            else if (xml_tag == "given_scene")                     {strcpy(given_scene, xml_val.c_str());}
data/lincity-ng-2.9~git20150314/src/tinygettext/tinygettext.cpp:48:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(in, text.c_str());
data/lincity-ng-2.9~git20150314/src/tinygettext/tinygettext.cpp:67:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(in_orig, text.c_str());
data/lincity-ng-2.9~git20150314/src/TinyLandGen/main.cpp:86:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand(1234);
data/lincity-ng-2.9~git20150314/src/TinyLandGen/main.cpp:88:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand(time(0));
data/lincity-ng-2.9~git20150314/src/lincity-ng/MainLincity.cpp:168:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand (time (0));
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:219:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    home_dir = getenv("LINCITY_HOME");
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:260:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    retval = getenv("LANGUAGE");
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:275:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    retval = getenv("LC_ALL");
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:280:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    retval = getenv(categoryname);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:285:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    retval = getenv("LANG");
data/lincity-ng-2.9~git20150314/src/lincity/init_game.cpp:294:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(world.seed());
data/lincity-ng-2.9~git20150314/src/lincity/init_game.cpp:478:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(1234);
data/lincity-ng-2.9~git20150314/src/lincity/lc_locale.cpp:17:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    language = getenv("LANGUAGE");
data/lincity-ng-2.9~git20150314/src/tinygettext/findlocale.cpp:149:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  env = getenv(name);
data/lincity-ng-2.9~git20150314/src/tinygettext/tinygettext.cpp:200:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  const char* lang = getenv( "LINCITY_LANG" );
data/lincity-ng-2.9~git20150314/contrib/autocrop.cxx:94:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(filename.c_str (), "rb")) == NULL)
data/lincity-ng-2.9~git20150314/contrib/autocrop.cxx:222:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(filename.c_str (), "wb");
data/lincity-ng-2.9~git20150314/contrib/autocrop.cxx:239:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(filename.c_str (), "wb");
data/lincity-ng-2.9~git20150314/src/PhysfsStream/PhysfsStream.hpp:41: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/lincity-ng-2.9~git20150314/src/PhysfsStream/PhysfsStream.hpp:56: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/lincity-ng-2.9~git20150314/src/gui_interface/screen_interface.h:21:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern unsigned char main_font[2048];
data/lincity-ng-2.9~git20150314/src/gui_interface/screen_interface.h:22:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern unsigned char start_font1[2048];
data/lincity-ng-2.9~git20150314/src/gui_interface/screen_interface.h:23:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern unsigned char start_font2[4096];
data/lincity-ng-2.9~git20150314/src/gui_interface/screen_interface.h:24:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern unsigned char start_font3[4096];
data/lincity-ng-2.9~git20150314/src/lincity-ng/MainMenu.cpp:477:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        slotNr = 1 + atoi(
data/lincity-ng-2.9~git20150314/src/lincity-ng/MpsInterface.cpp:435:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char s[12];
data/lincity-ng-2.9~git20150314/src/lincity-ng/MpsInterface.cpp:490:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char s[12];
data/lincity-ng-2.9~git20150314/src/lincity-ng/PBar.cpp:108: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 s[12];
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:123:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = fopen ("/proc/self/maps", "r");
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:190:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *address_string, line[SIZE], *found;
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:195:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = fopen ("/proc/self/maps", "r");
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:255:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy (address_string, "0x", 2);
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:256:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy (address_string + 2, start_addr, len);
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:260:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy (address_string, "0x", 2);
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:261:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy (address_string + 2, end_addr, len);
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:677:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (result, str1, len1);
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:678:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (result + len1, str2, len2);
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:723:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (result, str, size);
data/lincity-ng-2.9~git20150314/src/lincity-ng/getBundleSharePath.cpp:23:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
 	static char path[FILENAME_MAX];
data/lincity-ng-2.9~git20150314/src/lincity-ng/getBundleSharePath.cpp:59:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
 	(void)strcat(path, "/Contents/Resources/share/");
data/lincity-ng-2.9~git20150314/src/lincity-ng/main.cpp:143: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(testfname.str().c_str(), "r");
data/lincity-ng-2.9~git20150314/src/lincity-ng/main.cpp:228: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 myBuffer[BUFFER_SIZE];
data/lincity-ng-2.9~git20150314/src/lincity-ng/readdir.hpp:32:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char d_name[MAX_PATH];
data/lincity-ng-2.9~git20150314/src/lincity-ng/readdir.hpp: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 path[MAX_PATH];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:123:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char LIBDIR[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:129:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char given_scene[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:130:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char colour_pal_file[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:131:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char opening_pic[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:132:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char graphic_path[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:133:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char fontfile[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:134:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char opening_path[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:135:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char help_path[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:136:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char message_path[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:137:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char lc_textdomain_directory[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:138:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char lincityrc_file[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:170:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(filename, "rb");
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:215: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 cwd_buf[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:216: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_buf[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:311: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 intl_lang[128];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:429: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(colour_pal_file, "rb");
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:478: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 ss[LC_PATH_MAX], *graphic;
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:482:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((inf = fopen(ss, "rb")) == NULL) {
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:483:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
        strcat(ss, " -- UNABLE TO LOAD");
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:530:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(filename, "a");
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.h:33:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char colour_pal_file[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.h:34:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char opening_pic[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.h:35:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char graphic_path[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.h:36:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char fontfile[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.h:37:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char opening_path[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.h:38:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char help_path[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.h:39:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char message_path[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.h:40:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char lc_textdomain_directory[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.h:41:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char lincityrc_file[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.h:42:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char given_scene[LC_PATH_MAX];
data/lincity-ng-2.9~git20150314/src/lincity/lc_locale.cpp:11: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 language_buf[MAX_LANG_BUF];
data/lincity-ng-2.9~git20150314/src/lincity/loadsave.cpp: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 s[512];
data/lincity-ng-2.9~git20150314/src/lincity/modules/market.cpp:193: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 arrows[4]="---";
data/lincity-ng-2.9~git20150314/src/lincity/old_ldsvguts.cpp:125:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char s[256];
data/lincity-ng-2.9~git20150314/src/lincity/xmlloadsave.h: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 buffer_line[4096];
data/lincity-ng-2.9~git20150314/src/tools/xmlgettext/main.cpp: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 buffer[128];
data/lincity-ng-2.9~git20150314/src/gui/Button.cpp:86:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while(reader.read() && reader.getDepth() > depth) {
data/lincity-ng-2.9~git20150314/src/gui/ComponentLoader.cpp:97:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while(reader.read() && reader.getDepth() > depth) {
data/lincity-ng-2.9~git20150314/src/gui/Desktop.cpp:61:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while(reader.read() && reader.getDepth() > depth) {
data/lincity-ng-2.9~git20150314/src/gui/Document.cpp:70:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while(reader.read() && reader.getDepth() > depth) {
data/lincity-ng-2.9~git20150314/src/gui/Paragraph.cpp:130:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while(reader.read() && reader.getDepth() > depth) {
data/lincity-ng-2.9~git20150314/src/gui/ScrollBar.cpp:80:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while(reader.read() && reader.getDepth() > depth) {
data/lincity-ng-2.9~git20150314/src/gui/ScrollView.cpp:69:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while(reader.read() && reader.getDepth() > depth) {
data/lincity-ng-2.9~git20150314/src/gui/SwitchComponent.cpp:66:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while(reader.read() && reader.getDepth() > depth) {
data/lincity-ng-2.9~git20150314/src/gui/TableLayout.cpp:89:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while(reader.read() && reader.getDepth() > depth) {
data/lincity-ng-2.9~git20150314/src/gui/TooltipManager.cpp:67:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while(reader.read() && reader.getDepth() > depth) {
data/lincity-ng-2.9~git20150314/src/gui/Window.cpp:101:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while(reader.read() && reader.getDepth() > depth) {
data/lincity-ng-2.9~git20150314/src/gui/XmlReader.cpp:54:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while(read() && getNodeType() != XML_READER_TYPE_ELEMENT)
data/lincity-ng-2.9~git20150314/src/gui/XmlReader.hpp:131:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bool read()
data/lincity-ng-2.9~git20150314/src/lincity-ng/ButtonPanel.cpp:92:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while(reader.read() && reader.getDepth() > depth) {
data/lincity-ng-2.9~git20150314/src/lincity-ng/CheckButton.cpp:117:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while(reader.read() && reader.getDepth() > depth) {
data/lincity-ng-2.9~git20150314/src/lincity-ng/Config.cpp:121:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while( reader.read() ) {
data/lincity-ng-2.9~git20150314/src/lincity-ng/Dialog.cpp:375: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 (given_scene) > 3){
data/lincity-ng-2.9~git20150314/src/lincity-ng/Dialog.cpp:492:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((s = (char *) malloc (lc_save_dir_len + strlen (LC_SAVE_DIR)
data/lincity-ng-2.9~git20150314/src/lincity-ng/Dialog.cpp:493: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).
                  + strlen (RESULTS_FILENAME) + 64)) == 0)
data/lincity-ng-2.9~git20150314/src/lincity-ng/Dialog.cpp:510: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 (given_scene) > 3){
data/lincity-ng-2.9~git20150314/src/lincity-ng/GameView.cpp:448:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while( reader.read() )
data/lincity-ng-2.9~git20150314/src/lincity-ng/MiniMap.cpp:242:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if(strlen(mapViewButtons[i]))
data/lincity-ng-2.9~git20150314/src/lincity-ng/MiniMap.cpp:455: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(mapViewButtons[i])==0) {
data/lincity-ng-2.9~git20150314/src/lincity-ng/MiniMap.cpp:459: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).
        while(i>=0 && mapViewButtons[i] && strlen(mapViewButtons[i]))
data/lincity-ng-2.9~git20150314/src/lincity-ng/MiniMap.cpp:464:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert(i>=0 && mapViewButtons[i] && strlen(mapViewButtons[i]));
data/lincity-ng-2.9~git20150314/src/lincity-ng/MiniMap.cpp:491:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if(strlen(mapViewButtons[b]))
data/lincity-ng-2.9~git20150314/src/lincity-ng/Sound.cpp:70:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while( reader.read() )
data/lincity-ng-2.9~git20150314/src/lincity-ng/Sound.cpp:186:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while( reader.read() ) {
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:74:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	strncpy (path2, "/proc/self/exe", buf_size - 1);
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:106:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy (path, path2, buf_size - 1);
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:142: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).
	buf_size = strlen (line);
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:231:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen (file);
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:238:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen (file);
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:243:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen (start_addr);
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:244:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (len != strlen (end_addr))
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:673: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).
	len1 = strlen (str1);
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:674:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len2 = strlen (str2);
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:692:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen (dir);
data/lincity-ng-2.9~git20150314/src/lincity-ng/binreloc.c:716:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen (str);
data/lincity-ng-2.9~git20150314/src/lincity-ng/main.cpp:79: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* writedir = new char[strlen(userdir) + strlen(application) + 2];
data/lincity-ng-2.9~git20150314/src/lincity-ng/main.cpp:79:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char* writedir = new char[strlen(userdir) + strlen(application) + 2];
data/lincity-ng-2.9~git20150314/src/lincity-ng/main.cpp:86:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        char* mkdir = new char[strlen(application) + 2];
data/lincity-ng-2.9~git20150314/src/lincity-ng/main.cpp:117: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).
    size_t extlen = strlen(archiveExt);
data/lincity-ng-2.9~git20150314/src/lincity-ng/main.cpp:122:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t l = strlen(*i);
data/lincity-ng-2.9~git20150314/src/lincity-ng/main.cpp:127: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).
                char* str = new char[strlen(d) + strlen(dirsep) + l + 1];
data/lincity-ng-2.9~git20150314/src/lincity-ng/main.cpp:127:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                char* str = new char[strlen(d) + strlen(dirsep) + l + 1];
data/lincity-ng-2.9~git20150314/src/lincity-ng/readdir.cpp:52: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).
    dir->entry.d_reclen = (unsigned short)strlen(dir->info.name);
data/lincity-ng-2.9~git20150314/src/lincity-ng/readdir.cpp:53:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(dir->entry.d_name, dir->info.name, sizeof(dir->entry.d_name));
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:62: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).
#define NAMLEN(dirent) strlen((dirent)->d_name)
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:189:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        int endofpath_offset = strlen(LIBDIR) - strlen(searchfile) - 1;
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:189:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        int endofpath_offset = strlen(LIBDIR) - strlen(searchfile) - 1;
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:223:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(LIBDIR, home_dir, LC_PATH_MAX);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:233:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(LIBDIR, cwd_buf, LC_PATH_MAX);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:240:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(LIBDIR, DEFAULT_LIBDIR, LC_PATH_MAX);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:340:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(intl_lang, intl_suffix, 128);
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:384: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).
    lc_save_dir_len = strlen(homedir) + strlen(LC_SAVE_DIR) + 1;
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:384:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    lc_save_dir_len = strlen(homedir) + strlen(LC_SAVE_DIR) + 1;
data/lincity-ng-2.9~git20150314/src/lincity/fileutil.cpp:491:26:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        *(graphic + x) = fgetc(inf);
data/lincity-ng-2.9~git20150314/src/lincity/loadsave.cpp:55: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).
#define NAMLEN(dirent) strlen((dirent)->d_name)
data/lincity-ng-2.9~git20150314/src/lincity/loadsave.cpp:273: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(given_scene) > 1)
data/lincity-ng-2.9~git20150314/src/lincity/loadsave.cpp:551:9:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
        sscanf(gzgets(gzfile, s, 256), "%128s", given_scene);
data/lincity-ng-2.9~git20150314/src/lincity/loadsave.cpp:552:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strncmp(given_scene, "dummy", 5) == 0 || strlen(given_scene) < 3)
data/lincity-ng-2.9~git20150314/src/lincity/loadsave.cpp:554:9:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
        sscanf(gzgets(gzfile, s, 256), "%128s", s);
data/lincity-ng-2.9~git20150314/src/lincity/old_ldsvguts.cpp:53: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).
#define NAMLEN(dirent) strlen((dirent)->d_name)
data/lincity-ng-2.9~git20150314/src/lincity/old_ldsvguts.cpp:365:5:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
    sscanf(gzgets(gzfile, s, 256), "%128s", given_scene);
data/lincity-ng-2.9~git20150314/src/lincity/old_ldsvguts.cpp:366:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strncmp(given_scene, "dummy", 5) == 0 || strlen(given_scene) < 3)
data/lincity-ng-2.9~git20150314/src/lincity/old_ldsvguts.cpp:368:5:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
    sscanf(gzgets(gzfile, s, 256), "%128s", s);
data/lincity-ng-2.9~git20150314/src/tinygettext/tinygettext.cpp:587: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).
          from_charset = i->substr(strlen("Content-Type: text/plain; charset="));
data/lincity-ng-2.9~git20150314/src/tinygettext/tinygettext.cpp:683:14:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  inline int getchar(std::istream& in)
data/lincity-ng-2.9~git20150314/src/tinygettext/tinygettext.cpp:702:16:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while((c = getchar(in)) != EOF)
data/lincity-ng-2.9~git20150314/src/tinygettext/tinygettext.cpp:722:30:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                } while((c = getchar(in)) != EOF && !isspace(static_cast<unsigned char>(c)));
data/lincity-ng-2.9~git20150314/src/tinygettext/tinygettext.cpp:730:24:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            while((c = getchar(in)) != EOF)
data/lincity-ng-2.9~git20150314/src/tinygettext/tinygettext.cpp:750:19:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              c = getchar(in);
data/lincity-ng-2.9~git20150314/src/tools/xmlgettext/XmlReader.cpp:28:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while(read() && getNodeType() != XML_READER_TYPE_ELEMENT)
data/lincity-ng-2.9~git20150314/src/tools/xmlgettext/XmlReader.hpp:121:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bool read()
data/lincity-ng-2.9~git20150314/src/tools/xmlgettext/main.cpp:52:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while(reader.read()) {

ANALYSIS SUMMARY:

Hits = 197
Lines analyzed = 48269 in approximately 1.28 seconds (37745 lines/second)
Physical Source Lines of Code (SLOC) = 35263
Hits@level = [0] 434 [1]  76 [2]  65 [3]  13 [4]  38 [5]   5
Hits@level+ = [0+] 631 [1+] 197 [2+] 121 [3+]  56 [4+]  43 [5+]   5
Hits/KSLOC@level+ = [0+] 17.8941 [1+] 5.58659 [2+] 3.43136 [3+] 1.58807 [4+] 1.21941 [5+] 0.141792
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.