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/flare-engine-1.09.01/src/AStarContainer.cpp Examining data/flare-engine-1.09.01/src/AStarContainer.h Examining data/flare-engine-1.09.01/src/AStarNode.cpp Examining data/flare-engine-1.09.01/src/AStarNode.h Examining data/flare-engine-1.09.01/src/Animation.cpp Examining data/flare-engine-1.09.01/src/Animation.h Examining data/flare-engine-1.09.01/src/AnimationManager.cpp Examining data/flare-engine-1.09.01/src/AnimationManager.h Examining data/flare-engine-1.09.01/src/AnimationSet.cpp Examining data/flare-engine-1.09.01/src/AnimationSet.h Examining data/flare-engine-1.09.01/src/Avatar.cpp Examining data/flare-engine-1.09.01/src/Avatar.h Examining data/flare-engine-1.09.01/src/BehaviorAlly.cpp Examining data/flare-engine-1.09.01/src/BehaviorAlly.h Examining data/flare-engine-1.09.01/src/BehaviorStandard.cpp Examining data/flare-engine-1.09.01/src/BehaviorStandard.h Examining data/flare-engine-1.09.01/src/CampaignManager.cpp Examining data/flare-engine-1.09.01/src/CampaignManager.h Examining data/flare-engine-1.09.01/src/CombatText.cpp Examining data/flare-engine-1.09.01/src/CombatText.h Examining data/flare-engine-1.09.01/src/CommonIncludes.h Examining data/flare-engine-1.09.01/src/CursorManager.cpp Examining data/flare-engine-1.09.01/src/CursorManager.h Examining data/flare-engine-1.09.01/src/DeviceList.cpp Examining data/flare-engine-1.09.01/src/DeviceList.h Examining data/flare-engine-1.09.01/src/EffectManager.cpp Examining data/flare-engine-1.09.01/src/EffectManager.h Examining data/flare-engine-1.09.01/src/Enemy.cpp Examining data/flare-engine-1.09.01/src/Enemy.h Examining data/flare-engine-1.09.01/src/EnemyBehavior.cpp Examining data/flare-engine-1.09.01/src/EnemyBehavior.h Examining data/flare-engine-1.09.01/src/EnemyGroupManager.cpp Examining data/flare-engine-1.09.01/src/EnemyGroupManager.h Examining data/flare-engine-1.09.01/src/EnemyManager.cpp Examining data/flare-engine-1.09.01/src/EnemyManager.h Examining data/flare-engine-1.09.01/src/EngineSettings.cpp Examining data/flare-engine-1.09.01/src/EngineSettings.h Examining data/flare-engine-1.09.01/src/Entity.cpp Examining data/flare-engine-1.09.01/src/Entity.h Examining data/flare-engine-1.09.01/src/EventManager.cpp Examining data/flare-engine-1.09.01/src/EventManager.h Examining data/flare-engine-1.09.01/src/FileParser.cpp Examining data/flare-engine-1.09.01/src/FileParser.h Examining data/flare-engine-1.09.01/src/FontEngine.cpp Examining data/flare-engine-1.09.01/src/FontEngine.h Examining data/flare-engine-1.09.01/src/GameSlotPreview.cpp Examining data/flare-engine-1.09.01/src/GameSlotPreview.h Examining data/flare-engine-1.09.01/src/GameState.cpp Examining data/flare-engine-1.09.01/src/GameState.h Examining data/flare-engine-1.09.01/src/GameStateConfigBase.cpp Examining data/flare-engine-1.09.01/src/GameStateConfigBase.h Examining data/flare-engine-1.09.01/src/GameStateConfigDesktop.cpp Examining data/flare-engine-1.09.01/src/GameStateConfigDesktop.h Examining data/flare-engine-1.09.01/src/GameStateCutscene.cpp Examining data/flare-engine-1.09.01/src/GameStateCutscene.h Examining data/flare-engine-1.09.01/src/GameStateLoad.cpp Examining data/flare-engine-1.09.01/src/GameStateLoad.h Examining data/flare-engine-1.09.01/src/GameStateNew.cpp Examining data/flare-engine-1.09.01/src/GameStateNew.h Examining data/flare-engine-1.09.01/src/GameStatePlay.cpp Examining data/flare-engine-1.09.01/src/GameStatePlay.h Examining data/flare-engine-1.09.01/src/GameStateTitle.cpp Examining data/flare-engine-1.09.01/src/GameStateTitle.h Examining data/flare-engine-1.09.01/src/GameSwitcher.cpp Examining data/flare-engine-1.09.01/src/GameSwitcher.h Examining data/flare-engine-1.09.01/src/GetText.cpp Examining data/flare-engine-1.09.01/src/GetText.h Examining data/flare-engine-1.09.01/src/Hazard.cpp Examining data/flare-engine-1.09.01/src/Hazard.h Examining data/flare-engine-1.09.01/src/HazardManager.cpp Examining data/flare-engine-1.09.01/src/HazardManager.h Examining data/flare-engine-1.09.01/src/IconManager.cpp Examining data/flare-engine-1.09.01/src/IconManager.h Examining data/flare-engine-1.09.01/src/InputState.cpp Examining data/flare-engine-1.09.01/src/InputState.h Examining data/flare-engine-1.09.01/src/ItemManager.cpp Examining data/flare-engine-1.09.01/src/ItemManager.h Examining data/flare-engine-1.09.01/src/ItemStorage.cpp Examining data/flare-engine-1.09.01/src/ItemStorage.h Examining data/flare-engine-1.09.01/src/Loot.cpp Examining data/flare-engine-1.09.01/src/Loot.h Examining data/flare-engine-1.09.01/src/LootManager.cpp Examining data/flare-engine-1.09.01/src/LootManager.h Examining data/flare-engine-1.09.01/src/Map.cpp Examining data/flare-engine-1.09.01/src/Map.h Examining data/flare-engine-1.09.01/src/MapCollision.cpp Examining data/flare-engine-1.09.01/src/MapCollision.h Examining data/flare-engine-1.09.01/src/MapParallax.cpp Examining data/flare-engine-1.09.01/src/MapParallax.h Examining data/flare-engine-1.09.01/src/MapRenderer.cpp Examining data/flare-engine-1.09.01/src/MapRenderer.h Examining data/flare-engine-1.09.01/src/Menu.cpp Examining data/flare-engine-1.09.01/src/Menu.h Examining data/flare-engine-1.09.01/src/MenuActionBar.cpp Examining data/flare-engine-1.09.01/src/MenuActionBar.h Examining data/flare-engine-1.09.01/src/MenuActiveEffects.cpp Examining data/flare-engine-1.09.01/src/MenuActiveEffects.h Examining data/flare-engine-1.09.01/src/MenuBook.cpp Examining data/flare-engine-1.09.01/src/MenuBook.h Examining data/flare-engine-1.09.01/src/MenuCharacter.cpp Examining data/flare-engine-1.09.01/src/MenuCharacter.h Examining data/flare-engine-1.09.01/src/MenuConfirm.cpp Examining data/flare-engine-1.09.01/src/MenuConfirm.h Examining data/flare-engine-1.09.01/src/MenuDevConsole.cpp Examining data/flare-engine-1.09.01/src/MenuDevConsole.h Examining data/flare-engine-1.09.01/src/MenuEnemy.cpp Examining data/flare-engine-1.09.01/src/MenuEnemy.h Examining data/flare-engine-1.09.01/src/MenuExit.cpp Examining data/flare-engine-1.09.01/src/MenuExit.h Examining data/flare-engine-1.09.01/src/MenuHUDLog.cpp Examining data/flare-engine-1.09.01/src/MenuHUDLog.h Examining data/flare-engine-1.09.01/src/MenuInventory.cpp Examining data/flare-engine-1.09.01/src/MenuInventory.h Examining data/flare-engine-1.09.01/src/MenuItemStorage.cpp Examining data/flare-engine-1.09.01/src/MenuItemStorage.h Examining data/flare-engine-1.09.01/src/MenuLog.cpp Examining data/flare-engine-1.09.01/src/MenuLog.h Examining data/flare-engine-1.09.01/src/MenuManager.cpp Examining data/flare-engine-1.09.01/src/MenuManager.h Examining data/flare-engine-1.09.01/src/MenuMiniMap.cpp Examining data/flare-engine-1.09.01/src/MenuMiniMap.h Examining data/flare-engine-1.09.01/src/MenuNumPicker.cpp Examining data/flare-engine-1.09.01/src/MenuNumPicker.h Examining data/flare-engine-1.09.01/src/MenuPowers.cpp Examining data/flare-engine-1.09.01/src/MenuPowers.h Examining data/flare-engine-1.09.01/src/MenuStash.cpp Examining data/flare-engine-1.09.01/src/MenuStash.h Examining data/flare-engine-1.09.01/src/MenuStatBar.cpp Examining data/flare-engine-1.09.01/src/MenuStatBar.h Examining data/flare-engine-1.09.01/src/MenuTalker.cpp Examining data/flare-engine-1.09.01/src/MenuTalker.h Examining data/flare-engine-1.09.01/src/MenuTouchControls.cpp Examining data/flare-engine-1.09.01/src/MenuTouchControls.h Examining data/flare-engine-1.09.01/src/MenuVendor.cpp Examining data/flare-engine-1.09.01/src/MenuVendor.h Examining data/flare-engine-1.09.01/src/MessageEngine.cpp Examining data/flare-engine-1.09.01/src/MessageEngine.h Examining data/flare-engine-1.09.01/src/ModManager.cpp Examining data/flare-engine-1.09.01/src/ModManager.h Examining data/flare-engine-1.09.01/src/NPC.cpp Examining data/flare-engine-1.09.01/src/NPC.h Examining data/flare-engine-1.09.01/src/NPCManager.cpp Examining data/flare-engine-1.09.01/src/NPCManager.h Examining data/flare-engine-1.09.01/src/Platform.h Examining data/flare-engine-1.09.01/src/PlatformAndroid.cpp Examining data/flare-engine-1.09.01/src/PlatformEmscripten.cpp Examining data/flare-engine-1.09.01/src/PlatformGCW0.cpp Examining data/flare-engine-1.09.01/src/PlatformIPhoneOS.cpp Examining data/flare-engine-1.09.01/src/PlatformLinux.cpp Examining data/flare-engine-1.09.01/src/PlatformWin32.cpp Examining data/flare-engine-1.09.01/src/PowerManager.cpp Examining data/flare-engine-1.09.01/src/PowerManager.h Examining data/flare-engine-1.09.01/src/QuestLog.cpp Examining data/flare-engine-1.09.01/src/QuestLog.h Examining data/flare-engine-1.09.01/src/RenderDevice.cpp Examining data/flare-engine-1.09.01/src/RenderDevice.h Examining data/flare-engine-1.09.01/src/SDLFontEngine.cpp Examining data/flare-engine-1.09.01/src/SDLFontEngine.h Examining data/flare-engine-1.09.01/src/SDLHardwareRenderDevice.cpp Examining data/flare-engine-1.09.01/src/SDLHardwareRenderDevice.h Examining data/flare-engine-1.09.01/src/SDLInputState.cpp Examining data/flare-engine-1.09.01/src/SDLInputState.h Examining data/flare-engine-1.09.01/src/SDLSoftwareRenderDevice.cpp Examining data/flare-engine-1.09.01/src/SDLSoftwareRenderDevice.h Examining data/flare-engine-1.09.01/src/SDLSoundManager.cpp Examining data/flare-engine-1.09.01/src/SDLSoundManager.h Examining data/flare-engine-1.09.01/src/SaveLoad.cpp Examining data/flare-engine-1.09.01/src/SaveLoad.h Examining data/flare-engine-1.09.01/src/Settings.cpp Examining data/flare-engine-1.09.01/src/Settings.h Examining data/flare-engine-1.09.01/src/SharedGameResources.cpp Examining data/flare-engine-1.09.01/src/SharedGameResources.h Examining data/flare-engine-1.09.01/src/SharedResources.cpp Examining data/flare-engine-1.09.01/src/SharedResources.h Examining data/flare-engine-1.09.01/src/SoundManager.cpp Examining data/flare-engine-1.09.01/src/SoundManager.h Examining data/flare-engine-1.09.01/src/StatBlock.cpp Examining data/flare-engine-1.09.01/src/StatBlock.h Examining data/flare-engine-1.09.01/src/Stats.cpp Examining data/flare-engine-1.09.01/src/Stats.h Examining data/flare-engine-1.09.01/src/Subtitles.cpp Examining data/flare-engine-1.09.01/src/Subtitles.h Examining data/flare-engine-1.09.01/src/TileSet.cpp Examining data/flare-engine-1.09.01/src/TileSet.h Examining data/flare-engine-1.09.01/src/TooltipData.cpp Examining data/flare-engine-1.09.01/src/TooltipData.h Examining data/flare-engine-1.09.01/src/TooltipManager.cpp Examining data/flare-engine-1.09.01/src/TooltipManager.h Examining data/flare-engine-1.09.01/src/Utils.cpp Examining data/flare-engine-1.09.01/src/Utils.h Examining data/flare-engine-1.09.01/src/UtilsDebug.cpp Examining data/flare-engine-1.09.01/src/UtilsDebug.h Examining data/flare-engine-1.09.01/src/UtilsFileSystem.cpp Examining data/flare-engine-1.09.01/src/UtilsFileSystem.h Examining data/flare-engine-1.09.01/src/UtilsMath.h Examining data/flare-engine-1.09.01/src/UtilsParsing.cpp Examining data/flare-engine-1.09.01/src/UtilsParsing.h Examining data/flare-engine-1.09.01/src/Version.cpp Examining data/flare-engine-1.09.01/src/Version.h Examining data/flare-engine-1.09.01/src/Widget.cpp Examining data/flare-engine-1.09.01/src/Widget.h Examining data/flare-engine-1.09.01/src/WidgetButton.cpp Examining data/flare-engine-1.09.01/src/WidgetButton.h Examining data/flare-engine-1.09.01/src/WidgetCheckBox.cpp Examining data/flare-engine-1.09.01/src/WidgetCheckBox.h Examining data/flare-engine-1.09.01/src/WidgetInput.cpp Examining data/flare-engine-1.09.01/src/WidgetInput.h Examining data/flare-engine-1.09.01/src/WidgetLabel.cpp Examining data/flare-engine-1.09.01/src/WidgetLabel.h Examining data/flare-engine-1.09.01/src/WidgetListBox.cpp Examining data/flare-engine-1.09.01/src/WidgetListBox.h Examining data/flare-engine-1.09.01/src/WidgetLog.cpp Examining data/flare-engine-1.09.01/src/WidgetLog.h Examining data/flare-engine-1.09.01/src/WidgetScrollBar.cpp Examining data/flare-engine-1.09.01/src/WidgetScrollBar.h Examining data/flare-engine-1.09.01/src/WidgetScrollBox.cpp Examining data/flare-engine-1.09.01/src/WidgetScrollBox.h Examining data/flare-engine-1.09.01/src/WidgetSlider.cpp Examining data/flare-engine-1.09.01/src/WidgetSlider.h Examining data/flare-engine-1.09.01/src/WidgetSlot.cpp Examining data/flare-engine-1.09.01/src/WidgetSlot.h Examining data/flare-engine-1.09.01/src/WidgetTabControl.cpp Examining data/flare-engine-1.09.01/src/WidgetTabControl.h Examining data/flare-engine-1.09.01/src/WidgetTooltip.cpp Examining data/flare-engine-1.09.01/src/WidgetTooltip.h Examining data/flare-engine-1.09.01/src/api/MapSaver.cpp Examining data/flare-engine-1.09.01/src/api/MapSaver.h Examining data/flare-engine-1.09.01/src/main.cpp Examining data/flare-engine-1.09.01/src/resource.h FINAL RESULTS: data/flare-engine-1.09.01/src/FileParser.cpp:235:2: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(buffer, format, args); data/flare-engine-1.09.01/src/Utils.cpp:402:2: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(file_buf, BUFSIZ, format, args); data/flare-engine-1.09.01/src/Utils.cpp:429:2: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(file_buf, BUFSIZ, format, args); data/flare-engine-1.09.01/src/Utils.cpp:453:2: [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, BUFSIZ, pre_buf, args); data/flare-engine-1.09.01/src/PlatformGCW0.cpp:57:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XDG_CONFIG_HOME") != NULL) { data/flare-engine-1.09.01/src/PlatformGCW0.cpp:58: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. settings->path_conf = std::string(getenv("XDG_CONFIG_HOME")) + "/flare/"; data/flare-engine-1.09.01/src/PlatformGCW0.cpp:61:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. else if (getenv("HOME") != NULL) { data/flare-engine-1.09.01/src/PlatformGCW0.cpp:62: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. settings->path_conf = std::string(getenv("HOME")) + "/.config/"; data/flare-engine-1.09.01/src/PlatformGCW0.cpp:75:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XDG_DATA_HOME") != NULL) { data/flare-engine-1.09.01/src/PlatformGCW0.cpp:76: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. settings->path_user = std::string(getenv("XDG_DATA_HOME")) + "/flare/"; data/flare-engine-1.09.01/src/PlatformGCW0.cpp:79:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. else if (getenv("HOME") != NULL) { data/flare-engine-1.09.01/src/PlatformGCW0.cpp:80: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. settings->path_user = std::string(getenv("HOME")) + "/.local/"; data/flare-engine-1.09.01/src/PlatformGCW0.cpp:125:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XDG_DATA_DIRS") != NULL) { data/flare-engine-1.09.01/src/PlatformGCW0.cpp:126: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. std::string pathlist = std::string(getenv("XDG_DATA_DIRS")); data/flare-engine-1.09.01/src/PlatformIPhoneOS.cpp:73:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XDG_CONFIG_HOME") != NULL) { data/flare-engine-1.09.01/src/PlatformIPhoneOS.cpp:74: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. settings->path_conf = std::string(getenv("XDG_CONFIG_HOME")) + "/flare/"; data/flare-engine-1.09.01/src/PlatformIPhoneOS.cpp:77:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. else if (getenv("HOME") != NULL) { data/flare-engine-1.09.01/src/PlatformIPhoneOS.cpp:78: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. settings->path_conf = std::string(getenv("HOME")) + "/.config/"; data/flare-engine-1.09.01/src/PlatformIPhoneOS.cpp:91:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XDG_DATA_HOME") != NULL) { data/flare-engine-1.09.01/src/PlatformIPhoneOS.cpp:92: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. settings->path_user = std::string(getenv("XDG_DATA_HOME")) + "/flare/"; data/flare-engine-1.09.01/src/PlatformIPhoneOS.cpp:95:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. else if (getenv("HOME") != NULL) { data/flare-engine-1.09.01/src/PlatformIPhoneOS.cpp:96: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. settings->path_user = std::string(getenv("HOME")) + "/.local/"; data/flare-engine-1.09.01/src/PlatformIPhoneOS.cpp:141:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XDG_DATA_DIRS") != NULL) { data/flare-engine-1.09.01/src/PlatformIPhoneOS.cpp:142: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. std::string pathlist = std::string(getenv("XDG_DATA_DIRS")); data/flare-engine-1.09.01/src/PlatformLinux.cpp:57:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XDG_CONFIG_HOME") != NULL) { data/flare-engine-1.09.01/src/PlatformLinux.cpp:58: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. settings->path_conf = std::string(getenv("XDG_CONFIG_HOME")) + "/flare/"; data/flare-engine-1.09.01/src/PlatformLinux.cpp:61:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. else if (getenv("HOME") != NULL) { data/flare-engine-1.09.01/src/PlatformLinux.cpp:62: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. settings->path_conf = std::string(getenv("HOME")) + "/.config/"; data/flare-engine-1.09.01/src/PlatformLinux.cpp:75:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XDG_DATA_HOME") != NULL) { data/flare-engine-1.09.01/src/PlatformLinux.cpp:76: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. settings->path_user = std::string(getenv("XDG_DATA_HOME")) + "/flare/"; data/flare-engine-1.09.01/src/PlatformLinux.cpp:79:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. else if (getenv("HOME") != NULL) { data/flare-engine-1.09.01/src/PlatformLinux.cpp:80: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. settings->path_user = std::string(getenv("HOME")) + "/.local/"; data/flare-engine-1.09.01/src/PlatformLinux.cpp:125:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XDG_DATA_DIRS") != NULL) { data/flare-engine-1.09.01/src/PlatformLinux.cpp:126: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. std::string pathlist = std::string(getenv("XDG_DATA_DIRS")); data/flare-engine-1.09.01/src/PlatformWin32.cpp:47:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("APPDATA") != NULL) { data/flare-engine-1.09.01/src/PlatformWin32.cpp:48:59: [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. settings->path_conf = settings->path_user = std::string(getenv("APPDATA")) + "\\flare"; data/flare-engine-1.09.01/src/main.cpp:354:46: [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. settings->custom_path_data = std::string(getenv("HOME")) + "/"; data/flare-engine-1.09.01/src/main.cpp:358:46: [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. settings->custom_path_data = std::string(getenv("HOME")) + "/" + path_end; data/flare-engine-1.09.01/src/main.cpp:416:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(static_cast<unsigned int>(time(NULL))); data/flare-engine-1.09.01/src/AnimationSet.cpp:72: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). if (!parser.open(name, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) data/flare-engine-1.09.01/src/Avatar.cpp:99: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 (infile.open("items/step_sounds.txt", FileParser::MOD_FILE, FileParser::ERROR_NONE)) { data/flare-engine-1.09.01/src/Avatar.cpp:189: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 (infile.open("engine/hero_layers.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/CombatText.cpp:64:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(infile.open("engine/combat_text.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/CursorManager.cpp:38: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 (infile.open("engine/mouse_cursor.txt", FileParser::MOD_FILE, FileParser::ERROR_NONE)) { data/flare-engine-1.09.01/src/EnemyGroupManager.cpp:37:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!infile.open(enemy_paths[i], FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) data/flare-engine-1.09.01/src/EngineSettings.cpp:75: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 (infile.open("engine/misc.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/EngineSettings.cpp:175: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 (infile.open("engine/resolutions.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/EngineSettings.cpp:249: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 (infile.open("engine/gameplay.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/EngineSettings.cpp:280: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 (infile.open("engine/combat.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/EngineSettings.cpp:337: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 (infile.open("engine/elements.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/EngineSettings.cpp:374: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 (infile.open("engine/equip_flags.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/EngineSettings.cpp:411: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 (infile.open("engine/primary_stats.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/EngineSettings.cpp:470: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 (infile.open("engine/classes.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/EngineSettings.cpp:586: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 (infile.open("engine/damage_types.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/EngineSettings.cpp:636: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 (infile.open("engine/death_penalty.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/EngineSettings.cpp:668: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 (infile.open("engine/tooltips.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/EngineSettings.cpp:707: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 (infile.open("engine/loot.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/EngineSettings.cpp:769: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 (infile.open("engine/tileset_config.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/EngineSettings.cpp:837: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 (infile.open("engine/widget_settings.txt", FileParser::MOD_FILE, FileParser::ERROR_NONE)) { data/flare-engine-1.09.01/src/EngineSettings.cpp:880: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 (infile.open("engine/xp_table.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/EventManager.cpp:992: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). if (script_file.open(filename, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/EventManager.cpp:1050: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 (infile.open(fname, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/FileParser.cpp:40: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). bool FileParser::open(const std::string& _filename, bool _is_mod_file, int _error_mode) { data/flare-engine-1.09.01/src/FileParser.cpp:64: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). infile.open(filenames[i-1].c_str(), std::ios::in); data/flare-engine-1.09.01/src/FileParser.cpp:178:38: [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 (!include_fp || !include_fp->open(tmp, is_mod_file, error_mode)) { data/flare-engine-1.09.01/src/FileParser.cpp:203: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). infile.open(current_filename.c_str(), std::ios::in); data/flare-engine-1.09.01/src/FileParser.cpp:231:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[4096]; data/flare-engine-1.09.01/src/FileParser.h:71:7: [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 open(const std::string& filename, bool _is_mod_file, int _error_mode); data/flare-engine-1.09.01/src/FontEngine.cpp:50: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 (infile.open("engine/font_colors.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/GameSlotPreview.cpp:61: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 (infile.open("engine/hero_layers.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/GameStateConfigBase.cpp:178: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 (infile.open("menus/config.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/GameStateConfigBase.cpp:783: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 (infile.open("engine/languages.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/GameStateConfigDesktop.cpp:171: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 (infile.open("menus/config.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/GameStateCutscene.cpp:572: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). if (!infile.open(filename, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) data/flare-engine-1.09.01/src/GameStateLoad.cpp:117:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (infile.open("menus/gameload.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/GameStateLoad.cpp:303:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!infile.open(filename.str(), !FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) continue; data/flare-engine-1.09.01/src/GameStateLoad.cpp:364: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). if (!infile.open(map_filename, FileParser::MOD_FILE, FileParser::ERROR_NONE)) data/flare-engine-1.09.01/src/GameStateNew.cpp:111: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 (infile.open("menus/gamenew.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/GameStateNew.cpp:283:11: [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 (!fin.open("engine/" + filename, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) return; data/flare-engine-1.09.01/src/GameStatePlay.cpp:463: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 (infile.open("engine/titles.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/GameStateTitle.cpp:59: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 (infile.open("menus/gametitle.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/GameSwitcher.cpp:90: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). if (infile.open("engine/default_music.txt", FileParser::MOD_FILE, FileParser::ERROR_NONE)) { data/flare-engine-1.09.01/src/GameSwitcher.cpp:113: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 (infile.open("engine/menu_backgrounds.txt", FileParser::MOD_FILE, FileParser::ERROR_NONE)) { data/flare-engine-1.09.01/src/GameSwitcher.cpp:239: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 (infile.open("menus/fps.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/GetText.cpp:30:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). bool GetText::open(const std::string& filename) { data/flare-engine-1.09.01/src/GetText.cpp:31: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). infile.open(filename.c_str(), std::ios::in); data/flare-engine-1.09.01/src/GetText.h:41:7: [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 open(const std::string& filename); data/flare-engine-1.09.01/src/IconManager.cpp:39: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 (infile.open("engine/icons.txt", FileParser::MOD_FILE, FileParser::ERROR_NONE)) { data/flare-engine-1.09.01/src/InputState.cpp:111: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). if (infile.open(settings->path_user + "saves/" + eset->misc.save_prefix + "/keybindings.txt", !FileParser::MOD_FILE, FileParser::ERROR_NONE)) { data/flare-engine-1.09.01/src/InputState.cpp:114: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). else if (infile.open("engine/default_keybindings.txt", FileParser::MOD_FILE, FileParser::ERROR_NONE)) { data/flare-engine-1.09.01/src/InputState.cpp:119: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). else if (infile.open(settings->path_conf + "keybindings.txt", !FileParser::MOD_FILE, FileParser::ERROR_NONE)) { data/flare-engine-1.09.01/src/InputState.cpp:276: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). outfile.open(out_path.c_str(), std::ios::out); data/flare-engine-1.09.01/src/ItemManager.cpp:140: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). if (!infile.open(filename, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) data/flare-engine-1.09.01/src/ItemManager.cpp:374: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 (infile.open(filename, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/ItemManager.cpp:416: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 (infile.open(filename, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/ItemManager.cpp:522: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). if (!infile.open(filename, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) data/flare-engine-1.09.01/src/LootManager.cpp:574:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!infile.open(filenames[i], FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) data/flare-engine-1.09.01/src/Map.cpp:90: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). if (!infile.open(fname, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) data/flare-engine-1.09.01/src/MapCollision.cpp:422:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). AStarContainer open(map_size.x, map_size.y, limit); data/flare-engine-1.09.01/src/MapCollision.cpp:425:2: [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.add(node); data/flare-engine-1.09.01/src/MapCollision.cpp:427: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). while (!open.isEmpty() && static_cast<unsigned>(close.getSize()) < limit) { data/flare-engine-1.09.01/src/MapCollision.cpp:428: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). node = open.get_shortest_f(); data/flare-engine-1.09.01/src/MapCollision.cpp:433:3: [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.remove(node); data/flare-engine-1.09.01/src/MapCollision.cpp:446: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). if (static_cast<unsigned>(open.getSize()) >= limit) { data/flare-engine-1.09.01/src/MapCollision.cpp:458:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(!open.exists(neighbour)) { data/flare-engine-1.09.01/src/MapCollision.cpp:463:5: [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.add(newNode); data/flare-engine-1.09.01/src/MapCollision.cpp:467:20: [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). AStarNode* i = open.get(neighbour.x, neighbour.y); data/flare-engine-1.09.01/src/MapCollision.cpp:471:6: [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.updateParent(pos, parent_pos, node->getActualCost() + Utils::calcDist(FPoint(current),FPoint(neighbour))); data/flare-engine-1.09.01/src/MapParallax.cpp:53: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 (infile.open(filename, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuActionBar.cpp:96: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 (infile.open("menus/actionbar.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuActiveEffects.cpp:51:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(infile.open("menus/activeeffects.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuBook.cpp:69: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 (infile.open(book_name, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuCharacter.cpp:106: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 (infile.open("menus/character.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuConfirm.cpp:42:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(infile.open("menus/confirm.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuDevConsole.cpp:69:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(infile.open("menus/devconsole.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuEnemy.cpp:52:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(infile.open("menus/enemy.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuExit.cpp:51:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(infile.open("menus/exit.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuHUDLog.cpp:49:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(infile.open("menus/hudlog.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuInventory.cpp:80: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 (infile.open("menus/inventory.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuLog.cpp:47:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(infile.open("menus/log.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuMiniMap.cpp:56: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 (infile.open("menus/minimap.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuNumPicker.cpp:65:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(infile.open("menus/num_picker.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuPowers.cpp:145: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 (infile.open("menus/powers.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuPowers.cpp:262: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 (infile.open(filename, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuStash.cpp:58: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 (infile.open("menus/stash.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuStatBar.cpp:60:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(infile.open("menus/"+type+".txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuTalker.cpp:79:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(infile.open("menus/talker.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MenuVendor.cpp:63:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if(infile.open("menus/vendor.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/MessageEngine.cpp:47: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). if (infile.open(engineFiles[i])) { data/flare-engine-1.09.01/src/MessageEngine.cpp:61: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). if (infile.open(dataFiles[i])) { data/flare-engine-1.09.01/src/ModManager.cpp:178: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). infile.open(place1.c_str(), std::ios::in); data/flare-engine-1.09.01/src/ModManager.cpp:182:11: [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). infile.open(place2.c_str(), std::ios::in); data/flare-engine-1.09.01/src/ModManager.cpp:338: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). infile.open(path.c_str(), std::ios::in); data/flare-engine-1.09.01/src/ModManager.cpp:530: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). outfile.open((settings->path_conf + "mods.txt").c_str(), std::ios::out); data/flare-engine-1.09.01/src/NPC.cpp:68: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 (infile.open(npc_id, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/PlatformEmscripten.cpp:115:29: [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 *config_file = fopen(std::string(settings->path_conf + "settings.txt").c_str(),"r"); data/flare-engine-1.09.01/src/PowerManager.cpp:190: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). if (!infile.open("powers/effects.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) data/flare-engine-1.09.01/src/PowerManager.cpp:274: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). if (!infile.open("powers/powers.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) data/flare-engine-1.09.01/src/QuestLog.cpp:71: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). if (!infile.open(filename, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) data/flare-engine-1.09.01/src/SDLFontEngine.cpp:49: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 (infile.open("engine/font_settings.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/SaveLoad.cpp:89: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). outfile.open(Filesystem::path(&ss).c_str(), std::ios::out); data/flare-engine-1.09.01/src/SaveLoad.cpp:221: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). outfile.open(Filesystem::path(&ss).c_str(), std::ios::out); data/flare-engine-1.09.01/src/SaveLoad.cpp:264: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 (infile.open(Filesystem::path(&ss), !FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/SaveLoad.cpp:485: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 (infile.open(Filesystem::path(&ss), !FileParser::MOD_FILE, FileParser::ERROR_NONE)) { data/flare-engine-1.09.01/src/Settings.cpp:132: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). if (!infile.open(settings->path_conf + "settings.txt", !FileParser::MOD_FILE, FileParser::ERROR_NONE)) { data/flare-engine-1.09.01/src/Settings.cpp:134:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!infile.open("engine/default_settings.txt", FileParser::MOD_FILE, FileParser::ERROR_NONE)) { data/flare-engine-1.09.01/src/Settings.cpp:157: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). outfile.open((settings->path_conf + "settings.txt").c_str(), std::ios::out); data/flare-engine-1.09.01/src/StatBlock.cpp:390: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). if (!infile.open(filename, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) data/flare-engine-1.09.01/src/StatBlock.cpp:945: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 (infile.open("engine/stats.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/StatBlock.cpp:983: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 (infile.open("engine/avatar/"+gfx_base+".txt", FileParser::MOD_FILE, FileParser::ERROR_NONE)) { data/flare-engine-1.09.01/src/Subtitles.cpp:46: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 (infile.open("soundfx/subtitles.txt", FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/TileSet.cpp:88: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 (infile.open(filename, FileParser::MOD_FILE, FileParser::ERROR_NORMAL)) { data/flare-engine-1.09.01/src/Utils.cpp:400:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file_buf[BUFSIZ]; data/flare-engine-1.09.01/src/Utils.cpp:409: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 *log_file = fopen(LOG_PATH.c_str(), "a"); data/flare-engine-1.09.01/src/Utils.cpp:427:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file_buf[BUFSIZ]; data/flare-engine-1.09.01/src/Utils.cpp:436: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 *log_file = fopen(LOG_PATH.c_str(), "a"); data/flare-engine-1.09.01/src/Utils.cpp:447: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 pre_buf[BUFSIZ]; data/flare-engine-1.09.01/src/Utils.cpp:448:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ]; data/flare-engine-1.09.01/src/Utils.cpp:466: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 *log_file = fopen(LOG_PATH.c_str(), "w+"); data/flare-engine-1.09.01/src/Utils.cpp:707: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(x, str.c_str(), length); data/flare-engine-1.09.01/src/Utils.cpp:718: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). infile.open(lock_file_path.c_str(), std::ios::in); data/flare-engine-1.09.01/src/Utils.cpp:751: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). outfile.open(lock_file_path.c_str(), std::ios::out); data/flare-engine-1.09.01/src/api/MapSaver.cpp:80: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). outfile.open(dest_file.c_str(), std::ios::out); ANALYSIS SUMMARY: Hits = 163 Lines analyzed = 58829 in approximately 1.71 seconds (34339 lines/second) Physical Source Lines of Code (SLOC) = 41053 Hits@level = [0] 14 [1] 0 [2] 124 [3] 35 [4] 4 [5] 0 Hits@level+ = [0+] 177 [1+] 163 [2+] 163 [3+] 39 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 4.3115 [1+] 3.97048 [2+] 3.97048 [3+] 0.949991 [4+] 0.097435 [5+] 0 Dot directories skipped = 3 (--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.