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/widelands-21/src/wlapplication_options.cc Examining data/widelands-21/src/logic/game_settings.h Examining data/widelands-21/src/logic/save_handler.h Examining data/widelands-21/src/logic/generic_save_handler.cc Examining data/widelands-21/src/logic/maptriangleregion.cc Examining data/widelands-21/src/logic/save_handler.cc Examining data/widelands-21/src/logic/player_end_result.h Examining data/widelands-21/src/logic/mapfringeregion.cc Examining data/widelands-21/src/logic/map.h Examining data/widelands-21/src/logic/editor_game_base.cc Examining data/widelands-21/src/logic/ai_dna_handler.cc Examining data/widelands-21/src/logic/cookie_priority_queue.h Examining data/widelands-21/src/logic/queue_cmd_factory.h Examining data/widelands-21/src/logic/single_player_game_controller.h Examining data/widelands-21/src/logic/map_revision.h Examining data/widelands-21/src/logic/trade_agreement.h Examining data/widelands-21/src/logic/path.cc Examining data/widelands-21/src/logic/replay.h Examining data/widelands-21/src/logic/see_unsee_node.h Examining data/widelands-21/src/logic/map_objects/findbob.cc Examining data/widelands-21/src/logic/map_objects/walkingdir.h Examining data/widelands-21/src/logic/map_objects/terrain_affinity.h Examining data/widelands-21/src/logic/map_objects/tribes/carrier.cc Examining data/widelands-21/src/logic/map_objects/tribes/road_textures.h Examining data/widelands-21/src/logic/map_objects/tribes/tribe_descr.h Examining data/widelands-21/src/logic/map_objects/tribes/warelist.h Examining data/widelands-21/src/logic/map_objects/tribes/requirements.h Examining data/widelands-21/src/logic/map_objects/tribes/partially_finished_building.cc Examining data/widelands-21/src/logic/map_objects/tribes/tribe_basic_info.h Examining data/widelands-21/src/logic/map_objects/tribes/ferry.cc Examining data/widelands-21/src/logic/map_objects/tribes/ware_descr.h Examining data/widelands-21/src/logic/map_objects/tribes/tribes.h Examining data/widelands-21/src/logic/map_objects/tribes/partially_finished_building.h Examining data/widelands-21/src/logic/map_objects/tribes/market.cc Examining data/widelands-21/src/logic/map_objects/tribes/ship.cc Examining data/widelands-21/src/logic/map_objects/tribes/requirements.cc Examining data/widelands-21/src/logic/map_objects/tribes/carrier.h Examining data/widelands-21/src/logic/map_objects/tribes/battle.h Examining data/widelands-21/src/logic/map_objects/tribes/road_textures.cc Examining data/widelands-21/src/logic/map_objects/tribes/worker.cc Examining data/widelands-21/src/logic/map_objects/tribes/ship.h Examining data/widelands-21/src/logic/map_objects/tribes/militarysite.h Examining data/widelands-21/src/logic/map_objects/tribes/soldier.cc Examining data/widelands-21/src/logic/map_objects/tribes/warelist.cc Examining data/widelands-21/src/logic/map_objects/tribes/ferry.h Examining data/widelands-21/src/logic/map_objects/tribes/militarysite.cc Examining data/widelands-21/src/logic/map_objects/tribes/dismantlesite.h Examining data/widelands-21/src/logic/map_objects/tribes/building.h Examining data/widelands-21/src/logic/map_objects/tribes/building_settings.cc Examining data/widelands-21/src/logic/map_objects/tribes/production_program.cc Examining data/widelands-21/src/logic/map_objects/tribes/building_settings.h Examining data/widelands-21/src/logic/map_objects/tribes/warehouse.h Examining data/widelands-21/src/logic/map_objects/tribes/soldiercontrol.h Examining data/widelands-21/src/logic/map_objects/tribes/worker_program.h Examining data/widelands-21/src/logic/map_objects/tribes/soldier.h Examining data/widelands-21/src/logic/map_objects/tribes/constructionsite.cc Examining data/widelands-21/src/logic/map_objects/tribes/attack_target.h Examining data/widelands-21/src/logic/map_objects/tribes/training_attribute.h Examining data/widelands-21/src/logic/map_objects/tribes/program_result.h Examining data/widelands-21/src/logic/map_objects/tribes/market.h Examining data/widelands-21/src/logic/map_objects/tribes/bill_of_materials.h Examining data/widelands-21/src/logic/map_objects/tribes/tribes.cc Examining data/widelands-21/src/logic/map_objects/tribes/building.cc Examining data/widelands-21/src/logic/map_objects/tribes/battle.cc Examining data/widelands-21/src/logic/map_objects/tribes/constructionsite.h Examining data/widelands-21/src/logic/map_objects/tribes/worker_descr.cc Examining data/widelands-21/src/logic/map_objects/tribes/trainingsite.h Examining data/widelands-21/src/logic/map_objects/tribes/wareworker.h Examining data/widelands-21/src/logic/map_objects/tribes/worker_descr.h Examining data/widelands-21/src/logic/map_objects/tribes/productionsite.h Examining data/widelands-21/src/logic/map_objects/tribes/workarea_info.h Examining data/widelands-21/src/logic/map_objects/tribes/worker.h Examining data/widelands-21/src/logic/map_objects/tribes/production_program.h Examining data/widelands-21/src/logic/map_objects/tribes/tribe_descr.cc Examining data/widelands-21/src/logic/map_objects/tribes/dismantlesite.cc Examining data/widelands-21/src/logic/map_objects/tribes/trainingsite.cc Examining data/widelands-21/src/logic/map_objects/tribes/ware_descr.cc Examining data/widelands-21/src/logic/map_objects/tribes/warehouse.cc Examining data/widelands-21/src/logic/map_objects/tribes/worker_program.cc Examining data/widelands-21/src/logic/map_objects/tribes/tribe_basic_info.cc Examining data/widelands-21/src/logic/map_objects/tribes/productionsite.cc Examining data/widelands-21/src/logic/map_objects/world/world.cc Examining data/widelands-21/src/logic/map_objects/world/critter.cc Examining data/widelands-21/src/logic/map_objects/world/terrain_description.cc Examining data/widelands-21/src/logic/map_objects/world/map_gen.h Examining data/widelands-21/src/logic/map_objects/world/critter_program.h Examining data/widelands-21/src/logic/map_objects/world/resource_description.cc Examining data/widelands-21/src/logic/map_objects/world/map_gen.cc Examining data/widelands-21/src/logic/map_objects/world/resource_description.h Examining data/widelands-21/src/logic/map_objects/world/editor_category.cc Examining data/widelands-21/src/logic/map_objects/world/editor_category.h Examining data/widelands-21/src/logic/map_objects/world/terrain_description.h Examining data/widelands-21/src/logic/map_objects/world/critter.h Examining data/widelands-21/src/logic/map_objects/world/world.h Examining data/widelands-21/src/logic/map_objects/walkingdir.cc Examining data/widelands-21/src/logic/map_objects/immovable.cc Examining data/widelands-21/src/logic/map_objects/findnode.h Examining data/widelands-21/src/logic/map_objects/map_object.cc Examining data/widelands-21/src/logic/map_objects/buildcost.cc Examining data/widelands-21/src/logic/map_objects/map_object_program.cc Examining data/widelands-21/src/logic/map_objects/backtrace.h Examining data/widelands-21/src/logic/map_objects/terrain_affinity.cc Examining data/widelands-21/src/logic/map_objects/map_object.h Examining data/widelands-21/src/logic/map_objects/map_object_program.h Examining data/widelands-21/src/logic/map_objects/bob.h Examining data/widelands-21/src/logic/map_objects/checkstep.cc Examining data/widelands-21/src/logic/map_objects/bob.cc Examining data/widelands-21/src/logic/map_objects/backtrace.cc Examining data/widelands-21/src/logic/map_objects/description_maintainer.cc Examining data/widelands-21/src/logic/map_objects/buildcost.h Examining data/widelands-21/src/logic/map_objects/immovable_program.h Examining data/widelands-21/src/logic/map_objects/findimmovable.h Examining data/widelands-21/src/logic/map_objects/checkstep.h Examining data/widelands-21/src/logic/map_objects/findimmovable.cc Examining data/widelands-21/src/logic/map_objects/description_maintainer.h Examining data/widelands-21/src/logic/map_objects/findnode.cc Examining data/widelands-21/src/logic/map_objects/findbob.h Examining data/widelands-21/src/logic/map_objects/immovable_program.cc Examining data/widelands-21/src/logic/map_objects/info_to_draw.h Examining data/widelands-21/src/logic/map_objects/immovable.h Examining data/widelands-21/src/logic/cmd_delete_message.h Examining data/widelands-21/src/logic/game_settings.cc Examining data/widelands-21/src/logic/mapdifferenceregion.h Examining data/widelands-21/src/logic/widelands.h Examining data/widelands-21/src/logic/single_player_game_settings_provider.h Examining data/widelands-21/src/logic/cmd_luacoroutine.h Examining data/widelands-21/src/logic/mapastar.cc Examining data/widelands-21/src/logic/map.cc Examining data/widelands-21/src/logic/editor_game_base.h Examining data/widelands-21/src/logic/maphollowregion.h Examining data/widelands-21/src/logic/replay.cc Examining data/widelands-21/src/logic/cmd_queue.cc Examining data/widelands-21/src/logic/replay_game_controller.h Examining data/widelands-21/src/logic/player.h Examining data/widelands-21/src/logic/mapdifferenceregion.cc Examining data/widelands-21/src/logic/player.cc Examining data/widelands-21/src/logic/cmd_calculate_statistics.h Examining data/widelands-21/src/logic/replay_game_controller.cc Examining data/widelands-21/src/logic/nodecaps.h Examining data/widelands-21/src/logic/playercommand.cc Examining data/widelands-21/src/logic/cmd_incorporate.h Examining data/widelands-21/src/logic/message_id.h Examining data/widelands-21/src/logic/map_revision.cc Examining data/widelands-21/src/logic/cmd_queue.h Examining data/widelands-21/src/logic/maptriangleregion.h Examining data/widelands-21/src/logic/playercommand.h Examining data/widelands-21/src/logic/path.h Examining data/widelands-21/src/logic/mapastar.h Examining data/widelands-21/src/logic/cmd_incorporate.cc Examining data/widelands-21/src/logic/playersmanager.cc Examining data/widelands-21/src/logic/game_controller.h Examining data/widelands-21/src/logic/widelands_geometry_io.cc Examining data/widelands-21/src/logic/queue_cmd_factory.cc Examining data/widelands-21/src/logic/playersmanager.h Examining data/widelands-21/src/logic/mapregion.h Examining data/widelands-21/src/logic/pathfield.cc Examining data/widelands-21/src/logic/widelands_geometry_io.h Examining data/widelands-21/src/logic/objective.cc Examining data/widelands-21/src/logic/cmd_luascript.cc Examining data/widelands-21/src/logic/message_queue.h Examining data/widelands-21/src/logic/cmd_delete_message.cc Examining data/widelands-21/src/logic/cmd_luacoroutine.cc Examining data/widelands-21/src/logic/game.h Examining data/widelands-21/src/logic/pathfield.h Examining data/widelands-21/src/logic/single_player_game_controller.cc Examining data/widelands-21/src/logic/queue_cmd_ids.h Examining data/widelands-21/src/logic/filesystem_constants.h Examining data/widelands-21/src/logic/game_data_error.h Examining data/widelands-21/src/logic/widelands_geometry.cc Examining data/widelands-21/src/logic/filesystem_constants.cc Examining data/widelands-21/src/logic/mapfringeregion.h Examining data/widelands-21/src/logic/maphollowregion.cc Examining data/widelands-21/src/logic/player_area.h Examining data/widelands-21/src/logic/single_player_game_settings_provider.cc Examining data/widelands-21/src/logic/note_map_options.h Examining data/widelands-21/src/logic/generic_save_handler.h Examining data/widelands-21/src/logic/objective.h Examining data/widelands-21/src/logic/widelands.cc Examining data/widelands-21/src/logic/widelands_geometry.h Examining data/widelands-21/src/logic/game_data_error.cc Examining data/widelands-21/src/logic/cmd_luascript.h Examining data/widelands-21/src/logic/ai_dna_handler.h Examining data/widelands-21/src/logic/field.h Examining data/widelands-21/src/logic/message.h Examining data/widelands-21/src/logic/game.cc Examining data/widelands-21/src/logic/field.cc Examining data/widelands-21/src/logic/cmd_calculate_statistics.cc Examining data/widelands-21/src/build_info.h Examining data/widelands-21/src/graphic/render_queue.h Examining data/widelands-21/src/graphic/style_manager.cc Examining data/widelands-21/src/graphic/graphic.cc Examining data/widelands-21/src/graphic/game_renderer.cc Examining data/widelands-21/src/graphic/animation/diranimations.h Examining data/widelands-21/src/graphic/animation/animation.h Examining data/widelands-21/src/graphic/animation/animation.cc Examining data/widelands-21/src/graphic/animation/diranimations.cc Examining data/widelands-21/src/graphic/animation/spritesheet_animation.h Examining data/widelands-21/src/graphic/animation/nonpacked_animation.h Examining data/widelands-21/src/graphic/animation/animation_manager.h Examining data/widelands-21/src/graphic/animation/animation_manager.cc Examining data/widelands-21/src/graphic/animation/nonpacked_animation.cc Examining data/widelands-21/src/graphic/animation/spritesheet_animation.cc Examining data/widelands-21/src/graphic/font_handler.h Examining data/widelands-21/src/graphic/sdl_utils.h Examining data/widelands-21/src/graphic/gl/blit_program.h Examining data/widelands-21/src/graphic/gl/grid_program.cc Examining data/widelands-21/src/graphic/gl/road_program.h Examining data/widelands-21/src/graphic/gl/terrain_program.cc Examining data/widelands-21/src/graphic/gl/fields_to_draw.h Examining data/widelands-21/src/graphic/gl/road_program.cc Examining data/widelands-21/src/graphic/gl/utils.cc Examining data/widelands-21/src/graphic/gl/draw_line_program.cc Examining data/widelands-21/src/graphic/gl/initialize.h Examining data/widelands-21/src/graphic/gl/workarea_program.h Examining data/widelands-21/src/graphic/gl/fields_to_draw.cc Examining data/widelands-21/src/graphic/gl/dither_program.cc Examining data/widelands-21/src/graphic/gl/blit_program.cc Examining data/widelands-21/src/graphic/gl/blit_data.h Examining data/widelands-21/src/graphic/gl/utils.h Examining data/widelands-21/src/graphic/gl/fill_rect_program.h Examining data/widelands-21/src/graphic/gl/grid_program.h Examining data/widelands-21/src/graphic/gl/dither_program.h Examining data/widelands-21/src/graphic/gl/fill_rect_program.cc Examining data/widelands-21/src/graphic/gl/draw_line_program.h Examining data/widelands-21/src/graphic/gl/coordinate_conversion.h Examining data/widelands-21/src/graphic/gl/terrain_program.h Examining data/widelands-21/src/graphic/gl/system_headers.h Examining data/widelands-21/src/graphic/gl/workarea_program.cc Examining data/widelands-21/src/graphic/gl/initialize.cc Examining data/widelands-21/src/graphic/game_renderer.h Examining data/widelands-21/src/graphic/image_io.h Examining data/widelands-21/src/graphic/styles/building_statistics_style.h Examining data/widelands-21/src/graphic/styles/table_style.h Examining data/widelands-21/src/graphic/styles/button_style.h Examining data/widelands-21/src/graphic/styles/progress_bar_style.h Examining data/widelands-21/src/graphic/styles/statistics_plot_style.h Examining data/widelands-21/src/graphic/styles/font_style.h Examining data/widelands-21/src/graphic/styles/font_style.cc Examining data/widelands-21/src/graphic/styles/ware_info_style.h Examining data/widelands-21/src/graphic/styles/text_panel_style.h Examining data/widelands-21/src/graphic/styles/panel_styles.h Examining data/widelands-21/src/graphic/minimap_renderer.cc Examining data/widelands-21/src/graphic/road_segments.cc Examining data/widelands-21/src/graphic/color.h Examining data/widelands-21/src/graphic/render_queue.cc Examining data/widelands-21/src/graphic/texture_atlas.cc Examining data/widelands-21/src/graphic/blit_mode.h Examining data/widelands-21/src/graphic/rendertarget.h Examining data/widelands-21/src/graphic/align.cc Examining data/widelands-21/src/graphic/graphic.h Examining data/widelands-21/src/graphic/wordwrap.cc Examining data/widelands-21/src/graphic/rendertarget.cc Examining data/widelands-21/src/graphic/mouse_cursor.cc Examining data/widelands-21/src/graphic/blend_mode.h Examining data/widelands-21/src/graphic/build_texture_atlas.cc Examining data/widelands-21/src/graphic/toolbar_imageset.h Examining data/widelands-21/src/graphic/screen.cc Examining data/widelands-21/src/graphic/color.cc Examining data/widelands-21/src/graphic/align.h Examining data/widelands-21/src/graphic/toolbar_imageset.cc Examining data/widelands-21/src/graphic/sdl_utils.cc Examining data/widelands-21/src/graphic/style_manager.h Examining data/widelands-21/src/graphic/image_cache.h Examining data/widelands-21/src/graphic/playercolor.h Examining data/widelands-21/src/graphic/text_layout.cc Examining data/widelands-21/src/graphic/texture.h Examining data/widelands-21/src/graphic/font_handler.cc Examining data/widelands-21/src/graphic/road_segments.h Examining data/widelands-21/src/graphic/text/transient_cache.h Examining data/widelands-21/src/graphic/text/rt_render.cc Examining data/widelands-21/src/graphic/text/font_io.h Examining data/widelands-21/src/graphic/text/sdl_ttf_font.cc Examining data/widelands-21/src/graphic/text/rt_parse.h Examining data/widelands-21/src/graphic/text/rt_errors_impl.h Examining data/widelands-21/src/graphic/text/bidi.cc Examining data/widelands-21/src/graphic/text/font_io.cc Examining data/widelands-21/src/graphic/text/sdl_ttf_font.h Examining data/widelands-21/src/graphic/text/rt_render.h Examining data/widelands-21/src/graphic/text/rt_errors.h Examining data/widelands-21/src/graphic/text/test/render.cc Examining data/widelands-21/src/graphic/text/test/render_richtext.cc Examining data/widelands-21/src/graphic/text/test/render.h Examining data/widelands-21/src/graphic/text/textstream.h Examining data/widelands-21/src/graphic/text/rendered_text.cc Examining data/widelands-21/src/graphic/text/textstream.cc Examining data/widelands-21/src/graphic/text/font_set.cc Examining data/widelands-21/src/graphic/text/texture_cache.h Examining data/widelands-21/src/graphic/text/rendered_text.h Examining data/widelands-21/src/graphic/text/bidi.h Examining data/widelands-21/src/graphic/text/rt_parse.cc Examining data/widelands-21/src/graphic/text/font_set.h Examining data/widelands-21/src/graphic/surface.cc Examining data/widelands-21/src/graphic/image.h Examining data/widelands-21/src/graphic/image_io.cc Examining data/widelands-21/src/graphic/surface.h Examining data/widelands-21/src/graphic/default_resolution.h Examining data/widelands-21/src/graphic/wordwrap.h Examining data/widelands-21/src/graphic/build_texture_atlas.h Examining data/widelands-21/src/graphic/mouse_cursor.h Examining data/widelands-21/src/graphic/playercolor.cc Examining data/widelands-21/src/graphic/minimap_renderer.h Examining data/widelands-21/src/graphic/text_layout.h Examining data/widelands-21/src/graphic/screen.h Examining data/widelands-21/src/graphic/texture_atlas.h Examining data/widelands-21/src/graphic/image_cache.cc Examining data/widelands-21/src/graphic/texture.cc Examining data/widelands-21/src/wlapplication.h Examining data/widelands-21/src/main.cc Examining data/widelands-21/src/io/fileread.h Examining data/widelands-21/src/io/fileread.cc Examining data/widelands-21/src/io/streamread.h Examining data/widelands-21/src/io/streamread.cc Examining data/widelands-21/src/io/streamwrite.h Examining data/widelands-21/src/io/filesystem/layered_filesystem.h Examining data/widelands-21/src/io/filesystem/filesystem.h Examining data/widelands-21/src/io/filesystem/zip_filesystem.cc Examining data/widelands-21/src/io/filesystem/disk_filesystem.cc Examining data/widelands-21/src/io/filesystem/zip_exceptions.h Examining data/widelands-21/src/io/filesystem/disk_filesystem.h Examining data/widelands-21/src/io/filesystem/test/filesystem_test_main.cc Examining data/widelands-21/src/io/filesystem/test/test_filesystem.cc Examining data/widelands-21/src/io/filesystem/layered_filesystem.cc Examining data/widelands-21/src/io/filesystem/filesystem_exceptions.h Examining data/widelands-21/src/io/filesystem/zip_filesystem.h Examining data/widelands-21/src/io/filesystem/filesystem.cc Examining data/widelands-21/src/io/profile.h Examining data/widelands-21/src/io/profile.cc Examining data/widelands-21/src/io/filewrite.cc Examining data/widelands-21/src/io/filewrite.h Examining data/widelands-21/src/io/streamwrite.cc Examining data/widelands-21/src/io/machdep.h Examining data/widelands-21/src/wlapplication_messages.h Examining data/widelands-21/src/website/website_common.cc Examining data/widelands-21/src/website/website_common.h Examining data/widelands-21/src/website/create_spritesheet.cc Examining data/widelands-21/src/website/map_object_info.cc Examining data/widelands-21/src/website/json/json.cc Examining data/widelands-21/src/website/json/value.cc Examining data/widelands-21/src/website/json/json.h Examining data/widelands-21/src/website/json/value.h Examining data/widelands-21/src/website/lua/lua_tree.cc Examining data/widelands-21/src/website/lua/value.cc Examining data/widelands-21/src/website/lua/lua_tree.h Examining data/widelands-21/src/website/lua/value.h Examining data/widelands-21/src/website/map_info.cc Examining data/widelands-21/src/scripting/lua_game.h Examining data/widelands-21/src/scripting/eris.h Examining data/widelands-21/src/scripting/lua_path.cc Examining data/widelands-21/src/scripting/lua_bases.h Examining data/widelands-21/src/scripting/lua.cc Examining data/widelands-21/src/scripting/lua_interface.h Examining data/widelands-21/src/scripting/lua_table.cc Examining data/widelands-21/src/scripting/lua_ui.cc Examining data/widelands-21/src/scripting/run_script.h Examining data/widelands-21/src/scripting/lua_map.cc Examining data/widelands-21/src/scripting/luna.h Examining data/widelands-21/src/scripting/lua_errors.h Examining data/widelands-21/src/scripting/report_error.h Examining data/widelands-21/src/scripting/lua.h Examining data/widelands-21/src/scripting/globals.h Examining data/widelands-21/src/scripting/lua_ui.h Examining data/widelands-21/src/scripting/lua_globals.cc Examining data/widelands-21/src/scripting/lua_editor.cc Examining data/widelands-21/src/scripting/lua_editor.h Examining data/widelands-21/src/scripting/lua_path.h Examining data/widelands-21/src/scripting/lua_map.h Examining data/widelands-21/src/scripting/logic.cc Examining data/widelands-21/src/scripting/persistence.h Examining data/widelands-21/src/scripting/lua_root.h Examining data/widelands-21/src/scripting/test/scripting_test_main.cc Examining data/widelands-21/src/scripting/test/test_luna.cc Examining data/widelands-21/src/scripting/luna_impl.h Examining data/widelands-21/src/scripting/globals.cc Examining data/widelands-21/src/scripting/logic.h Examining data/widelands-21/src/scripting/lua_root.cc Examining data/widelands-21/src/scripting/lua_interface.cc Examining data/widelands-21/src/scripting/lua_coroutine.h Examining data/widelands-21/src/scripting/luna_impl.cc Examining data/widelands-21/src/scripting/factory.cc Examining data/widelands-21/src/scripting/persistence.cc Examining data/widelands-21/src/scripting/lua_bases.cc Examining data/widelands-21/src/scripting/factory.h Examining data/widelands-21/src/scripting/lua_coroutine.cc Examining data/widelands-21/src/scripting/lua_globals.h Examining data/widelands-21/src/scripting/run_script.cc Examining data/widelands-21/src/scripting/lua_errors.cc Examining data/widelands-21/src/scripting/report_error.cc Examining data/widelands-21/src/scripting/lua_table.h Examining data/widelands-21/src/scripting/lua_game.cc Examining data/widelands-21/src/economy/flag.h Examining data/widelands-21/src/economy/router.h Examining data/widelands-21/src/economy/route.cc Examining data/widelands-21/src/economy/road.cc Examining data/widelands-21/src/economy/wares_queue.h Examining data/widelands-21/src/economy/shippingitem.h Examining data/widelands-21/src/economy/ware_instance.cc Examining data/widelands-21/src/economy/workers_queue.cc Examining data/widelands-21/src/economy/request.h Examining data/widelands-21/src/economy/waterway.cc Examining data/widelands-21/src/economy/expedition_bootstrap.h Examining data/widelands-21/src/economy/transfer.cc Examining data/widelands-21/src/economy/ship_fleet.h Examining data/widelands-21/src/economy/route.h Examining data/widelands-21/src/economy/economy.h Examining data/widelands-21/src/economy/supply_list.cc Examining data/widelands-21/src/economy/warehousesupply.h Examining data/widelands-21/src/economy/roadbase.h Examining data/widelands-21/src/economy/request.cc Examining data/widelands-21/src/economy/router.cc Examining data/widelands-21/src/economy/economy.cc Examining data/widelands-21/src/economy/economy_data_packet.cc Examining data/widelands-21/src/economy/portdock.h Examining data/widelands-21/src/economy/idleworkersupply.h Examining data/widelands-21/src/economy/road.h Examining data/widelands-21/src/economy/trackptr.h Examining data/widelands-21/src/economy/idleworkersupply.cc Examining data/widelands-21/src/economy/ferry_fleet.cc Examining data/widelands-21/src/economy/expedition_bootstrap.cc Examining data/widelands-21/src/economy/roadbase.cc Examining data/widelands-21/src/economy/test/test_routing.cc Examining data/widelands-21/src/economy/test/economy_test_main.cc Examining data/widelands-21/src/economy/test/test_road.cc Examining data/widelands-21/src/economy/transfer.h Examining data/widelands-21/src/economy/portdock.cc Examining data/widelands-21/src/economy/input_queue.cc Examining data/widelands-21/src/economy/cmd_call_economy_balance.h Examining data/widelands-21/src/economy/ship_fleet.cc Examining data/widelands-21/src/economy/supply_list.h Examining data/widelands-21/src/economy/ware_instance.h Examining data/widelands-21/src/economy/supply.h Examining data/widelands-21/src/economy/economy_data_packet.h Examining data/widelands-21/src/economy/routeastar.cc Examining data/widelands-21/src/economy/shipping_schedule.h Examining data/widelands-21/src/economy/input_queue.h Examining data/widelands-21/src/economy/wares_queue.cc Examining data/widelands-21/src/economy/iroute.h Examining data/widelands-21/src/economy/itransport_cost_calculator.h Examining data/widelands-21/src/economy/workers_queue.h Examining data/widelands-21/src/economy/cmd_call_economy_balance.cc Examining data/widelands-21/src/economy/ferry_fleet.h Examining data/widelands-21/src/economy/flag.cc Examining data/widelands-21/src/economy/waterway.h Examining data/widelands-21/src/economy/routing_node.h Examining data/widelands-21/src/economy/shipping_schedule.cc Examining data/widelands-21/src/economy/routeastar.h Examining data/widelands-21/src/economy/shippingitem.cc Examining data/widelands-21/src/editor/editorinteractive.cc Examining data/widelands-21/src/editor/tools/decrease_resources_tool.h Examining data/widelands-21/src/editor/tools/history.h Examining data/widelands-21/src/editor/tools/info_tool.cc Examining data/widelands-21/src/editor/tools/delete_critter_tool.cc Examining data/widelands-21/src/editor/tools/set_origin_tool.cc Examining data/widelands-21/src/editor/tools/set_height_tool.cc Examining data/widelands-21/src/editor/tools/draw_tool.cc Examining data/widelands-21/src/editor/tools/place_critter_tool.cc Examining data/widelands-21/src/editor/tools/noise_height_tool.cc Examining data/widelands-21/src/editor/tools/draw_tool.h Examining data/widelands-21/src/editor/tools/increase_resources_tool.cc Examining data/widelands-21/src/editor/tools/delete_immovable_tool.cc Examining data/widelands-21/src/editor/tools/set_height_tool.h Examining data/widelands-21/src/editor/tools/history.cc Examining data/widelands-21/src/editor/tools/set_starting_pos_tool.h Examining data/widelands-21/src/editor/tools/place_critter_tool.h Examining data/widelands-21/src/editor/tools/info_tool.h Examining data/widelands-21/src/editor/tools/tool.h Examining data/widelands-21/src/editor/tools/increase_height_tool.cc Examining data/widelands-21/src/editor/tools/decrease_height_tool.h Examining data/widelands-21/src/editor/tools/set_resources_tool.h Examining data/widelands-21/src/editor/tools/action_args.h Examining data/widelands-21/src/editor/tools/increase_resources_tool.h Examining data/widelands-21/src/editor/tools/set_terrain_tool.cc Examining data/widelands-21/src/editor/tools/set_starting_pos_tool.cc Examining data/widelands-21/src/editor/tools/tool_action.h Examining data/widelands-21/src/editor/tools/delete_immovable_tool.h Examining data/widelands-21/src/editor/tools/resize_tool.h Examining data/widelands-21/src/editor/tools/increase_height_tool.h Examining data/widelands-21/src/editor/tools/set_origin_tool.h Examining data/widelands-21/src/editor/tools/place_immovable_tool.h Examining data/widelands-21/src/editor/tools/set_port_space_tool.h Examining data/widelands-21/src/editor/tools/set_port_space_tool.cc Examining data/widelands-21/src/editor/tools/decrease_resources_tool.cc Examining data/widelands-21/src/editor/tools/set_resources_tool.cc Examining data/widelands-21/src/editor/tools/multi_select.h Examining data/widelands-21/src/editor/tools/resize_tool.cc Examining data/widelands-21/src/editor/tools/delete_critter_tool.h Examining data/widelands-21/src/editor/tools/set_terrain_tool.h Examining data/widelands-21/src/editor/tools/noise_height_tool.h Examining data/widelands-21/src/editor/tools/decrease_height_tool.cc Examining data/widelands-21/src/editor/tools/place_immovable_tool.cc Examining data/widelands-21/src/editor/map_generator.h Examining data/widelands-21/src/editor/map_generator.cc Examining data/widelands-21/src/editor/ui_menus/tool_place_immovable_options_menu.h Examining data/widelands-21/src/editor/ui_menus/tool_options_menu.h Examining data/widelands-21/src/editor/ui_menus/main_menu_load_or_save_map.cc Examining data/widelands-21/src/editor/ui_menus/tool_change_resources_options_menu.h Examining data/widelands-21/src/editor/ui_menus/toolsize_menu.h Examining data/widelands-21/src/editor/ui_menus/toolsize_menu.cc Examining data/widelands-21/src/editor/ui_menus/tool_set_terrain_options_menu.cc Examining data/widelands-21/src/editor/ui_menus/help.cc Examining data/widelands-21/src/editor/ui_menus/main_menu_map_options.cc Examining data/widelands-21/src/editor/ui_menus/help.h Examining data/widelands-21/src/editor/ui_menus/main_menu_new_map.cc Examining data/widelands-21/src/editor/ui_menus/main_menu_random_map.cc Examining data/widelands-21/src/editor/ui_menus/tool_change_height_options_menu.h Examining data/widelands-21/src/editor/ui_menus/tool_resize_options_menu.cc Examining data/widelands-21/src/editor/ui_menus/main_menu_new_map.h Examining data/widelands-21/src/editor/ui_menus/tool_resize_options_menu.h Examining data/widelands-21/src/editor/ui_menus/main_menu_load_map.cc Examining data/widelands-21/src/editor/ui_menus/categorized_item_selection_menu.h Examining data/widelands-21/src/editor/ui_menus/main_menu_load_map.h Examining data/widelands-21/src/editor/ui_menus/tool_options_menu.cc Examining data/widelands-21/src/editor/ui_menus/main_menu_load_or_save_map.h Examining data/widelands-21/src/editor/ui_menus/tool_place_critter_options_menu.cc Examining data/widelands-21/src/editor/ui_menus/tool_set_terrain_options_menu.h Examining data/widelands-21/src/editor/ui_menus/main_menu_save_map_make_directory.cc Examining data/widelands-21/src/editor/ui_menus/player_menu.cc Examining data/widelands-21/src/editor/ui_menus/tool_change_height_options_menu.cc Examining data/widelands-21/src/editor/ui_menus/tool_place_critter_options_menu.h Examining data/widelands-21/src/editor/ui_menus/main_menu_random_map.h Examining data/widelands-21/src/editor/ui_menus/tool_noise_height_options_menu.cc Examining data/widelands-21/src/editor/ui_menus/main_menu_map_options.h Examining data/widelands-21/src/editor/ui_menus/main_menu_save_map.h Examining data/widelands-21/src/editor/ui_menus/player_menu.h Examining data/widelands-21/src/editor/ui_menus/tool_place_immovable_options_menu.cc Examining data/widelands-21/src/editor/ui_menus/map_size_box.h Examining data/widelands-21/src/editor/ui_menus/main_menu_save_map.cc Examining data/widelands-21/src/editor/ui_menus/map_size_box.cc Examining data/widelands-21/src/editor/ui_menus/tool_noise_height_options_menu.h Examining data/widelands-21/src/editor/ui_menus/main_menu_save_map_make_directory.h Examining data/widelands-21/src/editor/ui_menus/tool_change_resources_options_menu.cc Examining data/widelands-21/src/editor/editorinteractive.h Examining data/widelands-21/src/sound/note_sound.h Examining data/widelands-21/src/sound/fxset.h Examining data/widelands-21/src/sound/sound_handler.cc Examining data/widelands-21/src/sound/note_sound.cc Examining data/widelands-21/src/sound/fxset.cc Examining data/widelands-21/src/sound/sound_handler.h Examining data/widelands-21/src/sound/constants.h Examining data/widelands-21/src/sound/songset.cc Examining data/widelands-21/src/sound/songset.h Examining data/widelands-21/src/sound/constants.cc Examining data/widelands-21/src/network/network_protocol.h Examining data/widelands-21/src/network/network_gaming_messages.cc Examining data/widelands-21/src/network/crypto.h Examining data/widelands-21/src/network/nethost.cc Examining data/widelands-21/src/network/network_lan_promotion.h Examining data/widelands-21/src/network/network_lan_promotion.cc Examining data/widelands-21/src/network/internet_gaming.cc Examining data/widelands-21/src/network/crypto.cc Examining data/widelands-21/src/network/gamehost.h Examining data/widelands-21/src/network/bufferedconnection.h Examining data/widelands-21/src/network/nethost.h Examining data/widelands-21/src/network/network.cc Examining data/widelands-21/src/network/gamehost.cc Examining data/widelands-21/src/network/internet_gaming.h Examining data/widelands-21/src/network/nethostproxy.cc Examining data/widelands-21/src/network/gameclient.cc Examining data/widelands-21/src/network/netclientproxy.h Examining data/widelands-21/src/network/netclient.h Examining data/widelands-21/src/network/nethostproxy.h Examining data/widelands-21/src/network/bufferedconnection.cc Examining data/widelands-21/src/network/network_player_settings_backend.cc Examining data/widelands-21/src/network/internet_gaming_messages.cc Examining data/widelands-21/src/network/network.h Examining data/widelands-21/src/network/constants.h Examining data/widelands-21/src/network/netclientproxy.cc Examining data/widelands-21/src/network/internet_gaming_protocol.h Examining data/widelands-21/src/network/gameclient.h Examining data/widelands-21/src/network/relay_protocol.h Examining data/widelands-21/src/network/network_gaming_messages.h Examining data/widelands-21/src/network/network_player_settings_backend.h Examining data/widelands-21/src/network/netclient.cc Examining data/widelands-21/src/network/nethost_interface.h Examining data/widelands-21/src/network/internet_gaming_messages.h Examining data/widelands-21/src/network/netclient_interface.h Examining data/widelands-21/src/wui/plot_area.cc Examining data/widelands-21/src/wui/tribal_encyclopedia.cc Examining data/widelands-21/src/wui/itemwaresdisplay.cc Examining data/widelands-21/src/wui/plot_area.h Examining data/widelands-21/src/wui/actionconfirm.cc Examining data/widelands-21/src/wui/gamedetails.cc Examining data/widelands-21/src/wui/mapviewpixelconstants.cc Examining data/widelands-21/src/wui/playerdescrgroup.h Examining data/widelands-21/src/wui/game_message_menu.cc Examining data/widelands-21/src/wui/quicknavigation.h Examining data/widelands-21/src/wui/minimap.cc Examining data/widelands-21/src/wui/actionconfirm.h Examining data/widelands-21/src/wui/gamedetails.h Examining data/widelands-21/src/wui/warehousewindow.cc Examining data/widelands-21/src/wui/economy_options_window.h Examining data/widelands-21/src/wui/interactive_player.h Examining data/widelands-21/src/wui/militarysitewindow.h Examining data/widelands-21/src/wui/tribal_encyclopedia.h Examining data/widelands-21/src/wui/mapview.cc Examining data/widelands-21/src/wui/game_options_sound_menu.cc Examining data/widelands-21/src/wui/game_debug_ui.h Examining data/widelands-21/src/wui/playerdescrgroup.cc Examining data/widelands-21/src/wui/game_summary.h Examining data/widelands-21/src/wui/login_box.cc Examining data/widelands-21/src/wui/maptable.cc Examining data/widelands-21/src/wui/game_client_disconnected.h Examining data/widelands-21/src/wui/sound_options.cc Examining data/widelands-21/src/wui/attack_box.cc Examining data/widelands-21/src/wui/game_debug_ui.cc Examining data/widelands-21/src/wui/productionsitewindow.h Examining data/widelands-21/src/wui/multiplayersetupgroup.h Examining data/widelands-21/src/wui/map_tags.cc Examining data/widelands-21/src/wui/interactive_gamebase.h Examining data/widelands-21/src/wui/soldiercapacitycontrol.h Examining data/widelands-21/src/wui/ware_statistics_menu.h Examining data/widelands-21/src/wui/encyclopedia_window.cc Examining data/widelands-21/src/wui/helpwindow.h Examining data/widelands-21/src/wui/mapdetails.h Examining data/widelands-21/src/wui/waresdisplay.cc Examining data/widelands-21/src/wui/buildingwindow.h Examining data/widelands-21/src/wui/dismantlesitewindow.h Examining data/widelands-21/src/wui/productionsitewindow.cc Examining data/widelands-21/src/wui/trainingsitewindow.h Examining data/widelands-21/src/wui/story_message_box.h Examining data/widelands-21/src/wui/fieldaction.cc Examining data/widelands-21/src/wui/soldierlist.h Examining data/widelands-21/src/wui/attack_box.h Examining data/widelands-21/src/wui/unique_window_handler.cc Examining data/widelands-21/src/wui/dismantlesitewindow.cc Examining data/widelands-21/src/wui/seafaring_statistics_menu.cc Examining data/widelands-21/src/wui/chat_overlay.h Examining data/widelands-21/src/wui/mapview.h Examining data/widelands-21/src/wui/logmessage.h Examining data/widelands-21/src/wui/stock_menu.h Examining data/widelands-21/src/wui/building_statistics_menu.cc Examining data/widelands-21/src/wui/savegamedata.cc Examining data/widelands-21/src/wui/savegametable.cc Examining data/widelands-21/src/wui/encyclopedia_window.h Examining data/widelands-21/src/wui/portdockwaresdisplay.cc Examining data/widelands-21/src/wui/savegameloader.h Examining data/widelands-21/src/wui/stock_menu.cc Examining data/widelands-21/src/wui/game_tips.h Examining data/widelands-21/src/wui/fieldaction.h Examining data/widelands-21/src/wui/interactive_gamebase.cc Examining data/widelands-21/src/wui/mapdetails.cc Examining data/widelands-21/src/wui/game_client_disconnected.cc Examining data/widelands-21/src/wui/itemwaresdisplay.h Examining data/widelands-21/src/wui/mapdata.h Examining data/widelands-21/src/wui/watchwindow.cc Examining data/widelands-21/src/wui/interactive_spectator.h Examining data/widelands-21/src/wui/game_chat_menu.cc Examining data/widelands-21/src/wui/chat_msg_layout.h Examining data/widelands-21/src/wui/game_objectives_menu.cc Examining data/widelands-21/src/wui/militarysitewindow.cc Examining data/widelands-21/src/wui/mapviewpixelfunctions.h Examining data/widelands-21/src/wui/game_tips.cc Examining data/widelands-21/src/wui/game_chat_menu.h Examining data/widelands-21/src/wui/suggested_teams_box.h Examining data/widelands-21/src/wui/game_objectives_menu.h Examining data/widelands-21/src/wui/unique_window_handler.h Examining data/widelands-21/src/wui/mapviewpixelconstants.h Examining data/widelands-21/src/wui/economy_options_window.cc Examining data/widelands-21/src/wui/mapauthordata.h Examining data/widelands-21/src/wui/suggested_teams_box.cc Examining data/widelands-21/src/wui/minimap.h Examining data/widelands-21/src/wui/building_statistics_menu.h Examining data/widelands-21/src/wui/game_summary.cc Examining data/widelands-21/src/wui/savegameloader.cc Examining data/widelands-21/src/wui/waresdisplay.h Examining data/widelands-21/src/wui/warehousewindow.h Examining data/widelands-21/src/wui/map_tags.h Examining data/widelands-21/src/wui/savegamedeleter.cc Examining data/widelands-21/src/wui/game_main_menu_save_game.cc Examining data/widelands-21/src/wui/interactive_spectator.cc Examining data/widelands-21/src/wui/game_chat_panel.h Examining data/widelands-21/src/wui/debugconsole.h Examining data/widelands-21/src/wui/watchwindow.h Examining data/widelands-21/src/wui/chat_overlay.cc Examining data/widelands-21/src/wui/inputqueuedisplay.h Examining data/widelands-21/src/wui/inputqueuedisplay.cc Examining data/widelands-21/src/wui/mapdata.cc Examining data/widelands-21/src/wui/helpwindow.cc Examining data/widelands-21/src/wui/sound_options.h Examining data/widelands-21/src/wui/maptable.h Examining data/widelands-21/src/wui/game_options_sound_menu.h Examining data/widelands-21/src/wui/savegamedeleter.h Examining data/widelands-21/src/wui/buildingwindow.cc Examining data/widelands-21/src/wui/constructionsitewindow.h Examining data/widelands-21/src/wui/debugconsole.cc Examining data/widelands-21/src/wui/interactive_base.h Examining data/widelands-21/src/wui/load_or_save_game.h Examining data/widelands-21/src/wui/game_exit_confirm_box.h Examining data/widelands-21/src/wui/interactive_player.cc Examining data/widelands-21/src/wui/interactive_base.cc Examining data/widelands-21/src/wui/game_chat_panel.cc Examining data/widelands-21/src/wui/portdockwaresdisplay.h Examining data/widelands-21/src/wui/chat_msg_layout.cc Examining data/widelands-21/src/wui/general_statistics_menu.h Examining data/widelands-21/src/wui/load_or_save_game.cc Examining data/widelands-21/src/wui/trainingsitewindow.cc Examining data/widelands-21/src/wui/login_box.h Examining data/widelands-21/src/wui/general_statistics_menu.cc Examining data/widelands-21/src/wui/story_message_box.cc Examining data/widelands-21/src/wui/savegametable.h Examining data/widelands-21/src/wui/shipwindow.h Examining data/widelands-21/src/wui/savegamedata.h Examining data/widelands-21/src/wui/constructionsitewindow.cc Examining data/widelands-21/src/wui/soldiercapacitycontrol.cc Examining data/widelands-21/src/wui/game_message_menu.h Examining data/widelands-21/src/wui/multiplayersetupgroup.cc Examining data/widelands-21/src/wui/ware_statistics_menu.cc Examining data/widelands-21/src/wui/quicknavigation.cc Examining data/widelands-21/src/wui/soldierlist.cc Examining data/widelands-21/src/wui/seafaring_statistics_menu.h Examining data/widelands-21/src/wui/game_exit_confirm_box.cc Examining data/widelands-21/src/wui/mapviewpixelfunctions.cc Examining data/widelands-21/src/wui/game_main_menu_save_game.h Examining data/widelands-21/src/wui/shipwindow.cc Examining data/widelands-21/src/base/utf8.h Examining data/widelands-21/src/base/warning.h Examining data/widelands-21/src/base/i18n.cc Examining data/widelands-21/src/base/exceptions.cc Examining data/widelands-21/src/base/utf8.cc Examining data/widelands-21/src/base/scoped_timer.h Examining data/widelands-21/src/base/log.h Examining data/widelands-21/src/base/random.cc Examining data/widelands-21/src/base/random.h Examining data/widelands-21/src/base/md5.cc Examining data/widelands-21/src/base/time_string.cc Examining data/widelands-21/src/base/md5.h Examining data/widelands-21/src/base/vector.cc Examining data/widelands-21/src/base/log.cc Examining data/widelands-21/src/base/wexception.h Examining data/widelands-21/src/base/math.cc Examining data/widelands-21/src/base/i18n.h Examining data/widelands-21/src/base/rect.h Examining data/widelands-21/src/base/scoped_timer.cc Examining data/widelands-21/src/base/vector.h Examining data/widelands-21/src/base/macros.cc Examining data/widelands-21/src/base/time_string.h Examining data/widelands-21/src/base/macros.h Examining data/widelands-21/src/base/math.h Examining data/widelands-21/src/map_io/map_exploration_packet.cc Examining data/widelands-21/src/map_io/map_object_packet.h Examining data/widelands-21/src/map_io/map_player_position_packet.cc Examining data/widelands-21/src/map_io/map_objective_packet.h Examining data/widelands-21/src/map_io/map_images.cc Examining data/widelands-21/src/map_io/map_data_packet.h Examining data/widelands-21/src/map_io/world_legacy_lookup_table.h Examining data/widelands-21/src/map_io/map_building_packet.h Examining data/widelands-21/src/map_io/tribes_legacy_lookup_table.cc Examining data/widelands-21/src/map_io/map_version_packet.h Examining data/widelands-21/src/map_io/map_wincondition_packet.h Examining data/widelands-21/src/map_io/widelands_map_loader.cc Examining data/widelands-21/src/map_io/map_waterwaydata_packet.h Examining data/widelands-21/src/map_io/map_port_spaces_packet.cc Examining data/widelands-21/src/map_io/map_objective_packet.cc Examining data/widelands-21/src/map_io/map_player_names_and_tribes_packet.cc Examining data/widelands-21/src/map_io/s2map.cc Examining data/widelands-21/src/map_io/map_object_loader.h Examining data/widelands-21/src/map_io/map_bob_packet.h Examining data/widelands-21/src/map_io/map_flagdata_packet.cc Examining data/widelands-21/src/map_io/map_flag_packet.h Examining data/widelands-21/src/map_io/map_heights_packet.cc Examining data/widelands-21/src/map_io/map_version_packet.cc Examining data/widelands-21/src/map_io/map_resources_packet.h Examining data/widelands-21/src/map_io/map_flagdata_packet.h Examining data/widelands-21/src/map_io/map_roaddata_packet.cc Examining data/widelands-21/src/map_io/map_exploration_packet.h Examining data/widelands-21/src/map_io/map_bob_packet.cc Examining data/widelands-21/src/map_io/map_waterway_packet.cc Examining data/widelands-21/src/map_io/map_object_loader.cc Examining data/widelands-21/src/map_io/coords_profile.h Examining data/widelands-21/src/map_io/map_terrain_packet.h Examining data/widelands-21/src/map_io/map_players_view_packet.cc Examining data/widelands-21/src/map_io/map_waterway_packet.h Examining data/widelands-21/src/map_io/map_buildingdata_packet.h Examining data/widelands-21/src/map_io/map_scripting_packet.cc Examining data/widelands-21/src/map_io/map_resources_packet.cc Examining data/widelands-21/src/map_io/map_elemental_packet.h Examining data/widelands-21/src/map_io/map_road_packet.cc Examining data/widelands-21/src/map_io/map_node_ownership_packet.cc Examining data/widelands-21/src/map_io/map_object_saver.cc Examining data/widelands-21/src/map_io/map_flag_packet.cc Examining data/widelands-21/src/map_io/world_legacy_lookup_table.cc Examining data/widelands-21/src/map_io/map_port_spaces_packet.h Examining data/widelands-21/src/map_io/map_buildingdata_packet.cc Examining data/widelands-21/src/map_io/map_images.h Examining data/widelands-21/src/map_io/map_allowed_building_types_packet.h Examining data/widelands-21/src/map_io/map_elemental_packet.cc Examining data/widelands-21/src/map_io/map_building_packet.cc Examining data/widelands-21/src/map_io/map_allowed_worker_types_packet.cc Examining data/widelands-21/src/map_io/s2map.h Examining data/widelands-21/src/map_io/map_allowed_building_types_packet.cc Examining data/widelands-21/src/map_io/map_message_saver.h Examining data/widelands-21/src/map_io/map_roaddata_packet.h Examining data/widelands-21/src/map_io/map_players_messages_packet.h Examining data/widelands-21/src/map_io/map_heights_packet.h Examining data/widelands-21/src/map_io/map_players_view_packet.h Examining data/widelands-21/src/map_io/map_player_position_packet.h Examining data/widelands-21/src/map_io/map_player_names_and_tribes_packet.h Examining data/widelands-21/src/map_io/map_allowed_worker_types_packet.h Examining data/widelands-21/src/map_io/map_object_saver.h Examining data/widelands-21/src/map_io/map_players_messages_packet.cc Examining data/widelands-21/src/map_io/map_saver.h Examining data/widelands-21/src/map_io/map_object_packet.cc Examining data/widelands-21/src/map_io/map_saver.cc Examining data/widelands-21/src/map_io/map_scripting_packet.h Examining data/widelands-21/src/map_io/tribes_legacy_lookup_table.h Examining data/widelands-21/src/map_io/map_wincondition_packet.cc Examining data/widelands-21/src/map_io/widelands_map_loader.h Examining data/widelands-21/src/map_io/map_waterwaydata_packet.cc Examining data/widelands-21/src/map_io/map_road_packet.h Examining data/widelands-21/src/map_io/map_loader.h Examining data/widelands-21/src/map_io/map_terrain_packet.cc Examining data/widelands-21/src/map_io/map_node_ownership_packet.h Examining data/widelands-21/src/map_io/coords_profile.cc Examining data/widelands-21/src/wlapplication_options.h Examining data/widelands-21/src/game_io/game_map_packet.h Examining data/widelands-21/src/game_io/game_player_economies_packet.cc Examining data/widelands-21/src/game_io/game_interactive_player_packet.cc Examining data/widelands-21/src/game_io/game_cmd_queue_packet.cc Examining data/widelands-21/src/game_io/game_cmd_queue_packet.h Examining data/widelands-21/src/game_io/game_interactive_player_packet.h Examining data/widelands-21/src/game_io/game_class_packet.cc Examining data/widelands-21/src/game_io/game_player_ai_persistent_packet.h Examining data/widelands-21/src/game_io/game_loader.cc Examining data/widelands-21/src/game_io/game_player_ai_persistent_packet.cc Examining data/widelands-21/src/game_io/game_data_packet.h Examining data/widelands-21/src/game_io/game_loader.h Examining data/widelands-21/src/game_io/game_saver.cc Examining data/widelands-21/src/game_io/game_player_economies_packet.h Examining data/widelands-21/src/game_io/game_player_info_packet.h Examining data/widelands-21/src/game_io/game_class_packet.h Examining data/widelands-21/src/game_io/game_preload_packet.h Examining data/widelands-21/src/game_io/game_saver.h Examining data/widelands-21/src/game_io/game_preload_packet.cc Examining data/widelands-21/src/game_io/game_player_info_packet.cc Examining data/widelands-21/src/game_io/game_map_packet.cc Examining data/widelands-21/src/chat/chat.h Examining data/widelands-21/src/chat/chat.cc Examining data/widelands-21/src/ui_fsmenu/campaigndetails.cc Examining data/widelands-21/src/ui_fsmenu/internet_lobby.cc Examining data/widelands-21/src/ui_fsmenu/launch_game.h Examining data/widelands-21/src/ui_fsmenu/options.h Examining data/widelands-21/src/ui_fsmenu/campaigns.cc Examining data/widelands-21/src/ui_fsmenu/mapselect.cc Examining data/widelands-21/src/ui_fsmenu/netsetup_lan.cc Examining data/widelands-21/src/ui_fsmenu/mapselect.h Examining data/widelands-21/src/ui_fsmenu/options.cc Examining data/widelands-21/src/ui_fsmenu/launch_spg.h Examining data/widelands-21/src/ui_fsmenu/launch_mpg.h Examining data/widelands-21/src/ui_fsmenu/scenariodetails.cc Examining data/widelands-21/src/ui_fsmenu/campaign_select.cc Examining data/widelands-21/src/ui_fsmenu/main.cc Examining data/widelands-21/src/ui_fsmenu/about.h Examining data/widelands-21/src/ui_fsmenu/netsetup_lan.h Examining data/widelands-21/src/ui_fsmenu/helpwindow.h Examining data/widelands-21/src/ui_fsmenu/multiplayer.h Examining data/widelands-21/src/ui_fsmenu/loadgame.cc Examining data/widelands-21/src/ui_fsmenu/scenario_select.cc Examining data/widelands-21/src/ui_fsmenu/campaign_select.h Examining data/widelands-21/src/ui_fsmenu/campaigns.h Examining data/widelands-21/src/ui_fsmenu/about.cc Examining data/widelands-21/src/ui_fsmenu/internet_lobby.h Examining data/widelands-21/src/ui_fsmenu/launch_spg.cc Examining data/widelands-21/src/ui_fsmenu/intro.h Examining data/widelands-21/src/ui_fsmenu/scenariodetails.h Examining data/widelands-21/src/ui_fsmenu/intro.cc Examining data/widelands-21/src/ui_fsmenu/singleplayer.h Examining data/widelands-21/src/ui_fsmenu/load_map_or_game.cc Examining data/widelands-21/src/ui_fsmenu/singleplayer.cc Examining data/widelands-21/src/ui_fsmenu/campaigndetails.h Examining data/widelands-21/src/ui_fsmenu/helpwindow.cc Examining data/widelands-21/src/ui_fsmenu/main_menu.cc Examining data/widelands-21/src/ui_fsmenu/multiplayer.cc Examining data/widelands-21/src/ui_fsmenu/launch_mpg.cc Examining data/widelands-21/src/ui_fsmenu/main_menu.h Examining data/widelands-21/src/ui_fsmenu/base.h Examining data/widelands-21/src/ui_fsmenu/load_map_or_game.h Examining data/widelands-21/src/ui_fsmenu/scenario_select.h Examining data/widelands-21/src/ui_fsmenu/loadgame.h Examining data/widelands-21/src/ui_fsmenu/base.cc Examining data/widelands-21/src/ui_fsmenu/main.h Examining data/widelands-21/src/ui_fsmenu/launch_game.cc Examining data/widelands-21/src/third_party/minizip/zip.h Examining data/widelands-21/src/third_party/minizip/unzip.h Examining data/widelands-21/src/third_party/minizip/unzip.cc Examining data/widelands-21/src/third_party/minizip/ioapi.h Examining data/widelands-21/src/third_party/gettext/dummy_gettext.cc Examining data/widelands-21/src/third_party/gettext/gettext.h Examining data/widelands-21/src/third_party/eris/lgc.c Examining data/widelands-21/src/third_party/eris/lprefix.h Examining data/widelands-21/src/third_party/eris/luac.c Examining data/widelands-21/src/third_party/eris/lobject.h Examining data/widelands-21/src/third_party/eris/lstate.c Examining data/widelands-21/src/third_party/eris/eris.h Examining data/widelands-21/src/third_party/eris/lvm.c Examining data/widelands-21/src/third_party/eris/ltablib.c Examining data/widelands-21/src/third_party/eris/lapi.h Examining data/widelands-21/src/third_party/eris/luaconf.h Examining data/widelands-21/src/third_party/eris/lauxlib.h Examining data/widelands-21/src/third_party/eris/ldblib.c Examining data/widelands-21/src/third_party/eris/llimits.h Examining data/widelands-21/src/third_party/eris/ltm.h Examining data/widelands-21/src/third_party/eris/lbitlib.c Examining data/widelands-21/src/third_party/eris/ltm.c Examining data/widelands-21/src/third_party/eris/lua.c Examining data/widelands-21/src/third_party/eris/liolib.c Examining data/widelands-21/src/third_party/eris/ldump.c Examining data/widelands-21/src/third_party/eris/lmem.h Examining data/widelands-21/src/third_party/eris/loadlib.c Examining data/widelands-21/src/third_party/eris/lundump.h Examining data/widelands-21/src/third_party/eris/ldo.c Examining data/widelands-21/src/third_party/eris/lauxlib.c Examining data/widelands-21/src/third_party/eris/lapi.c Examining data/widelands-21/src/third_party/eris/lcode.c Examining data/widelands-21/src/third_party/eris/lparser.h Examining data/widelands-21/src/third_party/eris/lua.h Examining data/widelands-21/src/third_party/eris/ldebug.c Examining data/widelands-21/src/third_party/eris/lstate.h Examining data/widelands-21/src/third_party/eris/lstring.h Examining data/widelands-21/src/third_party/eris/linit.c Examining data/widelands-21/src/third_party/eris/lfunc.c Examining data/widelands-21/src/third_party/eris/eris.c Examining data/widelands-21/src/third_party/eris/lopcodes.c Examining data/widelands-21/src/third_party/eris/lvm.h Examining data/widelands-21/src/third_party/eris/lmathlib.c Examining data/widelands-21/src/third_party/eris/lfunc.h Examining data/widelands-21/src/third_party/eris/lstring.c Examining data/widelands-21/src/third_party/eris/lua.hpp Examining data/widelands-21/src/third_party/eris/ltable.c Examining data/widelands-21/src/third_party/eris/lzio.h Examining data/widelands-21/src/third_party/eris/lstrlib.c Examining data/widelands-21/src/third_party/eris/lcode.h Examining data/widelands-21/src/third_party/eris/loslib.c Examining data/widelands-21/src/third_party/eris/lutf8lib.c Examining data/widelands-21/src/third_party/eris/lundump.c Examining data/widelands-21/src/third_party/eris/llex.c Examining data/widelands-21/src/third_party/eris/lualib.h Examining data/widelands-21/src/third_party/eris/lmem.c Examining data/widelands-21/src/third_party/eris/lobject.c Examining data/widelands-21/src/third_party/eris/lctype.h Examining data/widelands-21/src/third_party/eris/lparser.c Examining data/widelands-21/src/third_party/eris/lcorolib.c Examining data/widelands-21/src/third_party/eris/llex.h Examining data/widelands-21/src/third_party/eris/ldo.h Examining data/widelands-21/src/third_party/eris/lgc.h Examining data/widelands-21/src/third_party/eris/lbaselib.c Examining data/widelands-21/src/third_party/eris/ltable.h Examining data/widelands-21/src/third_party/eris/ldebug.h Examining data/widelands-21/src/third_party/eris/lopcodes.h Examining data/widelands-21/src/third_party/eris/lzio.c Examining data/widelands-21/src/third_party/eris/lctype.c Examining data/widelands-21/src/ui_basic/button.cc Examining data/widelands-21/src/ui_basic/multilinetextarea.h Examining data/widelands-21/src/ui_basic/multilineeditbox.h Examining data/widelands-21/src/ui_basic/dropdown.h Examining data/widelands-21/src/ui_basic/spinbox.cc Examining data/widelands-21/src/ui_basic/progressbar.cc Examining data/widelands-21/src/ui_basic/progresswindow.h Examining data/widelands-21/src/ui_basic/tabpanel.cc Examining data/widelands-21/src/ui_basic/fullscreen_window.h Examining data/widelands-21/src/ui_basic/unique_window.h Examining data/widelands-21/src/ui_basic/progressbar.h Examining data/widelands-21/src/ui_basic/checkbox.cc Examining data/widelands-21/src/ui_basic/scrollbar.cc Examining data/widelands-21/src/ui_basic/icongrid.h Examining data/widelands-21/src/ui_basic/listselect.h Examining data/widelands-21/src/ui_basic/messagebox.cc Examining data/widelands-21/src/ui_basic/progresswindow.cc Examining data/widelands-21/src/ui_basic/unique_window.cc Examining data/widelands-21/src/ui_basic/window.cc Examining data/widelands-21/src/ui_basic/tabpanel.h Examining data/widelands-21/src/ui_basic/multilineeditbox.cc Examining data/widelands-21/src/ui_basic/slider.cc Examining data/widelands-21/src/ui_basic/icon.cc Examining data/widelands-21/src/ui_basic/spinbox.h Examining data/widelands-21/src/ui_basic/messagebox.h Examining data/widelands-21/src/ui_basic/window.h Examining data/widelands-21/src/ui_basic/editbox.cc Examining data/widelands-21/src/ui_basic/radiobutton.cc Examining data/widelands-21/src/ui_basic/fullscreen_window.cc Examining data/widelands-21/src/ui_basic/listselect.cc Examining data/widelands-21/src/ui_basic/table.h Examining data/widelands-21/src/ui_basic/table.cc Examining data/widelands-21/src/ui_basic/icon.h Examining data/widelands-21/src/ui_basic/button.h Examining data/widelands-21/src/ui_basic/radiobutton.h Examining data/widelands-21/src/ui_basic/fileview_panel.h Examining data/widelands-21/src/ui_basic/editbox.h Examining data/widelands-21/src/ui_basic/mouse_constants.h Examining data/widelands-21/src/ui_basic/box.h Examining data/widelands-21/src/ui_basic/multilinetextarea.cc Examining data/widelands-21/src/ui_basic/box.cc Examining data/widelands-21/src/ui_basic/dropdown.cc Examining data/widelands-21/src/ui_basic/scrollbar.h Examining data/widelands-21/src/ui_basic/slider.h Examining data/widelands-21/src/ui_basic/panel.h Examining data/widelands-21/src/ui_basic/panel.cc Examining data/widelands-21/src/ui_basic/fileview_panel.cc Examining data/widelands-21/src/ui_basic/textarea.h Examining data/widelands-21/src/ui_basic/icongrid.cc Examining data/widelands-21/src/ui_basic/checkbox.h Examining data/widelands-21/src/ui_basic/textarea.cc Examining data/widelands-21/src/notifications/notifications.h Examining data/widelands-21/src/notifications/notifications.cc Examining data/widelands-21/src/notifications/notifications_impl.h Examining data/widelands-21/src/notifications/note_ids.h Examining data/widelands-21/src/notifications/test/notifications_test.cc Examining data/widelands-21/src/wlapplication_messages.cc Examining data/widelands-21/src/ai/computer_player.h Examining data/widelands-21/src/ai/ai_hints.h Examining data/widelands-21/src/ai/ai_help_structs.cc Examining data/widelands-21/src/ai/test/test_ga.cc Examining data/widelands-21/src/ai/test/test_ai.cc Examining data/widelands-21/src/ai/test/ai_test_main.cc Examining data/widelands-21/src/ai/ai_help_structs.h Examining data/widelands-21/src/ai/ai_hints.cc Examining data/widelands-21/src/ai/defaultai_seafaring.cc Examining data/widelands-21/src/ai/defaultai_warfare.cc Examining data/widelands-21/src/ai/defaultai.cc Examining data/widelands-21/src/ai/computer_player.cc Examining data/widelands-21/src/ai/defaultai.h Examining data/widelands-21/src/wlapplication.cc FINAL RESULTS: data/widelands-21/src/wlapplication.cc:128:16: [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_t size = readlink("/proc/self/exe", buffer, PATH_MAX); data/widelands-21/src/base/exceptions.cc:35:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buffer, sizeof(buffer), fmt, va); data/widelands-21/src/base/exceptions.cc:55:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buffer, sizeof(buffer), em, va); data/widelands-21/src/base/log.cc:157: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(buffer, sizeof(buffer), fmt, va); data/widelands-21/src/economy/transfer.cc:259: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(buffer, sizeof(buffer), fmt, va); data/widelands-21/src/io/profile.cc:523: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(buffer, sizeof(buffer), fmt, va); data/widelands-21/src/io/profile.h:190:59: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. void error(char const*, ...) const __attribute__((format(printf, 2, 3))); data/widelands-21/src/io/streamread.cc:35:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buffer, sizeof(buffer), fmt, va); data/widelands-21/src/io/streamwrite.cc:40:14: [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. int32_t i = vsnprintf(buffer, sizeof(buffer), fmt, va); data/widelands-21/src/io/streamwrite.cc:60:8: [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. i = vsnprintf(heapbuf, i + 1, fmt, va); data/widelands-21/src/io/streamwrite.h:59:55: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. void print_f(char const*, ...) __attribute__((format(printf, 2, 3))); data/widelands-21/src/logic/game_data_error.cc:35:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buffer, sizeof(buffer), fmt, va); data/widelands-21/src/logic/map_objects/map_object.cc:647: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(buffer, sizeof(buffer), fmt, va); data/widelands-21/src/map_io/map_players_view_packet.cc:119:2: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(filename, sizeof(filename), filename_template, plnum, version); \ data/widelands-21/src/map_io/map_players_view_packet.cc:136:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(filename, sizeof(filename), filename_template, plnum, fileversion); \ data/widelands-21/src/map_io/map_players_view_packet.cc:155:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(filename, sizeof(filename), file_templ, plnum, fileversion); \ data/widelands-21/src/map_io/map_players_view_packet.cc:315:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(unseen_times_filename, sizeof(unseen_times_filename), UNSEEN_TIMES_FILENAME_TEMPLATE, data/widelands-21/src/map_io/map_players_view_packet.cc:420:4: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(fname, sizeof(fname), VISION_FILENAME_TEMPLATE, static_cast<unsigned int>(plnum), data/widelands-21/src/map_io/map_players_view_packet.cc:888:2: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(filename, sizeof(filename), filename_template, plnum, version); \ data/widelands-21/src/network/bufferedconnection.cc:117:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. boost::system::error_code ec; data/widelands-21/src/network/bufferedconnection.cc:234:35: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. [this, nonempty_queue](boost::system::error_code ec, std::size_t length) { data/widelands-21/src/network/bufferedconnection.cc:236:35: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. [this, nonempty_queue](boost::system::error_code ec, std::size_t /*length*/) { data/widelands-21/src/network/bufferedconnection.cc:270:19: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. [this](boost::system::error_code ec, std::size_t length) { data/widelands-21/src/network/bufferedconnection.cc:298:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. boost::system::error_code ec; data/widelands-21/src/network/bufferedconnection.cc:319:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. boost::system::error_code ec; data/widelands-21/src/network/internet_gaming.cc:526:61: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. format_and_add_chat(sender, personal ? clientname_ : "", system, message); data/widelands-21/src/network/internet_gaming.cc:1021:47: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. bool system, data/widelands-21/src/network/internet_gaming.cc:1024:7: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!system && from.empty()) { data/widelands-21/src/network/internet_gaming.cc:1031:14: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. c.playern = system ? -1 : to.size() ? 3 : 7; data/widelands-21/src/network/internet_gaming.cc:1035:6: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (system && (state_ == IN_GAME)) { data/widelands-21/src/network/internet_gaming.h:195:32: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. bool system, data/widelands-21/src/network/nethost.cc:70:10: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. boost::system::error_code ec; data/widelands-21/src/network/nethost.cc:153:59: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. *(pair.second), [this, &acceptor, &pair](const boost::system::error_code& ec) { data/widelands-21/src/network/nethost.cc:205:24: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. } catch (const boost::system::system_error&) { data/widelands-21/src/network/network.cc:50:24: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. } catch (const boost::system::system_error& ec) { data/widelands-21/src/network/network.cc:68:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. boost::system::error_code ec; data/widelands-21/src/network/network.cc:237:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buffer, sizeof(buffer), fmt, va); data/widelands-21/src/network/network_lan_promotion.cc:162:10: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. boost::system::error_code ec; data/widelands-21/src/network/network_lan_promotion.cc:197:26: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. } catch (const boost::system::system_error& ec) { data/widelands-21/src/network/network_lan_promotion.cc:218:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. boost::system::error_code ec; data/widelands-21/src/network/network_lan_promotion.cc:255:11: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. boost::system::error_code ec; data/widelands-21/src/network/network_lan_promotion.cc:317:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. boost::system::error_code ec; data/widelands-21/src/network/network_lan_promotion.cc:373:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. boost::system::error_code ec; data/widelands-21/src/scripting/report_error.cc:34: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(buffer, sizeof(buffer), fmt, va); data/widelands-21/src/third_party/eris/lauxlib.h:238:10: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (fprintf(stderr, (s), (p)), fflush(stderr)) data/widelands-21/src/third_party/eris/liolib.c:59:40: [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 l_popen(L,c,m) (fflush(NULL), popen(c,m)) data/widelands-21/src/third_party/eris/liolib.c:622:19: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. ? fprintf(f, LUA_INTEGER_FMT, data/widelands-21/src/third_party/eris/liolib.c:624:19: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. : fprintf(f, LUA_NUMBER_FMT, data/widelands-21/src/third_party/eris/lobject.c:286: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(buff, s); /* copy string to buffer */ data/widelands-21/src/third_party/eris/loslib.c:122: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(b, LUA_TMPNAMTEMPLATE); \ data/widelands-21/src/third_party/eris/loslib.c:143:14: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. int stat = system(cmd); data/widelands-21/src/third_party/eris/lstrlib.c:1010:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(form + l - 1, lenmod); // NOLINT data/widelands-21/src/third_party/eris/luac.c:263:2: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(bvalue(o) ? "true" : "false"); data/widelands-21/src/third_party/eris/luac.c:268:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buff,LUA_NUMBER_FMT,fltvalue(o)); data/widelands-21/src/third_party/eris/luac.c:274:2: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LUA_INTEGER_FMT,ivalue(o)); data/widelands-21/src/third_party/eris/luaconf.h:606:29: [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 l_sprintf(s,sz,f,i) snprintf(s,sz,f,i) data/widelands-21/src/third_party/eris/luaconf.h:608:42: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. #define l_sprintf(s,sz,f,i) ((void)(sz), sprintf(s,f,i)) data/widelands-21/src/base/i18n.cc:138: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. lang = getenv("LANG"); data/widelands-21/src/base/i18n.cc:143:10: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. lang = getenv("LANGUAGE"); data/widelands-21/src/io/filesystem/disk_filesystem.cc:102:7: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (!realpath.empty()) { data/widelands-21/src/io/filesystem/disk_filesystem.cc:103:3: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. realpath.append("\\"); data/widelands-21/src/io/filesystem/filesystem.cc:290: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. home_char = getenv(name); \ data/widelands-21/src/io/filesystem/filesystem.cc:302:28: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (char const* const h = getenv("HOME")) { data/widelands-21/src/io/filesystem/filesystem.cc:337:36: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (char const* const datahome = getenv("XDG_DATA_HOME")) { data/widelands-21/src/io/filesystem/filesystem.cc:371: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. if (char const* const confighome = getenv("XDG_CONFIG_HOME")) { data/widelands-21/src/io/filesystem/filesystem.cc:398:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. environment_char = getenv("XDG_DATA_DIRS"); data/widelands-21/src/logic/game.cc:240:37: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. tribe = tribes().get_tribe_descr(random)->name(); data/widelands-21/src/logic/single_player_game_settings_provider.cc:152:26: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. it = impls.begin() + random; data/widelands-21/src/logic/single_player_game_settings_provider.cc:174:30: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. actual_tribe = s.tribes.at(random).name; data/widelands-21/src/network/gamehost.cc:1253:40: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. actual_tribe = d->settings.tribes.at(random).name; data/widelands-21/src/network/network_player_settings_backend.cc:43:26: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. it = impls.begin() + random; data/widelands-21/src/sound/fxset.cc:36:48: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. FXset::FXset(const std::string& path, uint32_t random) : last_used_(random % 2000) { data/widelands-21/src/sound/fxset.cc:36:69: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. FXset::FXset(const std::string& path, uint32_t random) : last_used_(random % 2000) { data/widelands-21/src/sound/fxset.cc:85:35: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. Mix_Chunk* FXset::get_fx(uint32_t random) { data/widelands-21/src/sound/fxset.cc:96:17: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. return fxs_.at(random % fxs_.size()); data/widelands-21/src/sound/fxset.h:36:51: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. explicit FXset(const std::string& path, uint32_t random); data/widelands-21/src/sound/fxset.h:49:29: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. Mix_Chunk* get_fx(uint32_t random); data/widelands-21/src/sound/songset.cc:70:39: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. Mix_Music* Songset::get_song(uint32_t random) { data/widelands-21/src/sound/songset.cc:79:24: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. current_song_ += 1 + random % (songs_.size() - 1); data/widelands-21/src/sound/songset.h:40:31: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. Mix_Music* get_song(uint32_t random); data/widelands-21/src/third_party/eris/lmathlib.c:28:18: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define l_rand() random() data/widelands-21/src/third_party/eris/lmathlib.c:29:20: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define l_srand(x) srandom(x) data/widelands-21/src/third_party/eris/lmathlib.c:33:20: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define l_srand(x) srand(x) data/widelands-21/src/third_party/eris/loadlib.c:294:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *path = getenv(nver); /* use versioned name */ data/widelands-21/src/third_party/eris/loadlib.c:296:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. path = getenv(envname); /* try unversioned name */ data/widelands-21/src/third_party/eris/loslib.c:131:33: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). #define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); } data/widelands-21/src/third_party/eris/loslib.c:178:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. lua_pushstring(L, getenv(luaL_checkstring(L, 1))); /* if NULL push nil */ data/widelands-21/src/third_party/eris/lua.c:537:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *init = getenv(name + 1); data/widelands-21/src/third_party/eris/lua.c:540:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. init = getenv(name + 1); /* try alternative name */ data/widelands-21/src/wlapplication.cc:155:13: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. char* rp = realpath(path.c_str(), buffer); data/widelands-21/src/wlapplication.cc:413:7: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. std::srand(time(nullptr)); data/widelands-21/src/base/exceptions.cc:31: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[512]; data/widelands-21/src/base/exceptions.cc:51: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[512]; data/widelands-21/src/base/log.cc:50:2: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t path[MAX_PATH]; data/widelands-21/src/base/log.cc:52: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 path[MAX_PATH]; data/widelands-21/src/base/log.cc:66: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). stdout_.open(stdout_filename_); data/widelands-21/src/base/log.cc:154: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[2048]; data/widelands-21/src/base/md5.cc:35:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[3]; data/widelands-21/src/base/md5.cc:69: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(&ctx->buffer[bytes], fillbuf, pad); data/widelands-21/src/base/md5.cc:97: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(&ctx->buffer[left_over], buffer, add); data/widelands-21/src/base/md5.cc:103:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ctx->buffer, &ctx->buffer[(left_over + add) & ~63], (left_over + add) & 63); data/widelands-21/src/base/md5.cc:120: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(ctx->buffer, buffer, len); data/widelands-21/src/base/md5.h:38: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[128]; data/widelands-21/src/economy/shipping_schedule.cc:1095:29: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). assert(total_waiting >= open); data/widelands-21/src/economy/shipping_schedule.cc:1097:36: [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). const int32_t prio = maxprio * open / total_waiting; data/widelands-21/src/economy/shipping_schedule.cc:1100:70: [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). start__map.first.get(game), dest__shipsinfos.first.get(game), open, prio)); data/widelands-21/src/economy/transfer.cc:253: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[1024]; data/widelands-21/src/game_io/game_class_packet.cc:34: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). fr.open(fs, "binary/game_class"); data/widelands-21/src/game_io/game_cmd_queue_packet.cc:37: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). fr.open(fs, "binary/cmd_queue"); data/widelands-21/src/game_io/game_interactive_player_packet.cc:44: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). fr.open(fs, "binary/interactive_player"); data/widelands-21/src/game_io/game_player_ai_persistent_packet.cc:38: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). fr.open(fs, "binary/player_ai"); data/widelands-21/src/game_io/game_player_economies_packet.cc:71: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). fr.open(fs, "binary/player_economies"); data/widelands-21/src/game_io/game_player_info_packet.cc:42: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). fr.open(fs, "binary/player_info"); data/widelands-21/src/graphic/gl/initialize.cc:238:6: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). atoi(shading_language_version_vector.front().c_str()); data/widelands-21/src/graphic/gl/initialize.cc:240:6: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). atoi(shading_language_version_vector.at(1).c_str()); data/widelands-21/src/graphic/gl/initialize.cc:260:47: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). const int major_shading_language_version = atoi(shading_language_version_string); data/widelands-21/src/graphic/gl/utils.cc:39: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). fr.open(*g_fs, filename); data/widelands-21/src/graphic/text/font_io.cc:43: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). fr->open(*g_fs, filename); data/widelands-21/src/graphic/text/test/render_richtext.cc:59:4: [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). f.open(fn.c_str()); data/widelands-21/src/io/fileread.cc:33:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void FileRead::open(FileSystem& fs, const std::string& filename) { data/widelands-21/src/io/fileread.cc:41: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(fs, filename); data/widelands-21/src/io/fileread.h:83: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). void open(FileSystem& fs, const std::string& filename); data/widelands-21/src/io/filesystem/disk_filesystem.cc:380: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). file = fopen(fullname.c_str(), "rb"); data/widelands-21/src/io/filesystem/disk_filesystem.cc:447:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* const f = fopen(fullname.c_str(), append ? "a" : "wb"); data/widelands-21/src/io/filesystem/disk_filesystem.cc:479:62: [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). explicit RealFSStreamRead(const std::string& fname) : file_(fopen(fname.c_str(), "rb")) { data/widelands-21/src/io/filesystem/disk_filesystem.cc:519:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file_ = fopen(fname.c_str(), "wb"); data/widelands-21/src/io/filesystem/filesystem.cc:211: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 cwd[PATH_MAX + 1]; data/widelands-21/src/io/filesystem/zip_filesystem.cc:87: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 filename_inzip[256]; data/widelands-21/src/io/filesystem/zip_filesystem.cc:177: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 filename_inzip[256]; data/widelands-21/src/io/filesystem/zip_filesystem.cc:215: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 filename_inzip[256]; data/widelands-21/src/io/filesystem/zip_filesystem.cc:261: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 filename_inzip[256]; data/widelands-21/src/io/filesystem/zip_filesystem.cc:394: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[1024]; data/widelands-21/src/io/filewrite.cc:74: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(data_ + i, src, size); data/widelands-21/src/io/profile.cc: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. static char const* trueWords[TRUE_WORDS] = { data/widelands-21/src/io/profile.cc:49:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char const* falseWords[FALSE_WORDS] = { data/widelands-21/src/io/profile.cc:519: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[256]; data/widelands-21/src/io/profile.cc:657: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). fr.open(fs, filename); data/widelands-21/src/io/streamread.cc:31: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[256]; data/widelands-21/src/io/streamread.cc:97: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(&rv, &x, 4); data/widelands-21/src/io/streamwrite.cc:36: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[2048]; data/widelands-21/src/io/streamwrite.h:85: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(&y, &x, 4); data/widelands-21/src/logic/game_data_error.cc:31: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[512]; data/widelands-21/src/logic/map_objects/map_object.cc:44: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 const* const animation_direction_names[6] = {"_ne", "_e", "_se", "_sw", "_w", "_nw"}; data/widelands-21/src/logic/map_objects/map_object.cc:644: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[2048]; data/widelands-21/src/logic/player.cc:1564:58: [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). stats->at(ware_index)[j] = static_cast<unsigned int>(atoi(stats_vector.at(j).c_str())); data/widelands-21/src/map_io/coords_profile.cc:49:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[sizeof("-32769 -32769")]; data/widelands-21/src/map_io/coords_profile.cc:50:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buffer, "%i %i", value.x, value.y); data/widelands-21/src/map_io/map_bob_packet.cc:78: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). fr.open(fs, "binary/bob"); data/widelands-21/src/map_io/map_building_packet.cc:52: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). fr.open(fs, "binary/building"); data/widelands-21/src/map_io/map_buildingdata_packet.cc:78: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). fr.open(fs, "binary/building_data"); data/widelands-21/src/map_io/map_elemental_packet.cc:87:62: [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). PlayerNumber player_number = static_cast<PlayerNumber>(atoi(player.c_str())); data/widelands-21/src/map_io/map_exploration_packet.cc:44: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). fr.open(fs, "binary/exploration"); data/widelands-21/src/map_io/map_exploration_packet.cc:47: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). fr.open(fs, "binary/seen_fields"); data/widelands-21/src/map_io/map_flag_packet.cc:46: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). fr.open(fs, "binary/flag"); data/widelands-21/src/map_io/map_flagdata_packet.cc:52: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). fr.open(fs, "binary/flag_data"); data/widelands-21/src/map_io/map_heights_packet.cc:35: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). fr.open(fs, "binary/heights"); data/widelands-21/src/map_io/map_node_ownership_packet.cc:43: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). fr.open(fs, "binary/node_ownership"); data/widelands-21/src/map_io/map_node_ownership_packet.cc:46: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). fr.open(fs, "binary/owned_fields"); data/widelands-21/src/map_io/map_object_packet.cc:56: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). fr.open(fs, "binary/mapobjects"); data/widelands-21/src/map_io/map_players_view_packet.cc:122: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). (file).open(fs, filename); \ data/widelands-21/src/map_io/map_players_view_packet.cc:138: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). (file).open(fs, filename); \ data/widelands-21/src/map_io/map_players_view_packet.cc:157: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). (file).open(fs, filename); \ data/widelands-21/src/map_io/map_players_view_packet.cc:314:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char unseen_times_filename[FILENAME_SIZE]; data/widelands-21/src/map_io/map_players_view_packet.cc:419:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[FILENAME_SIZE]; data/widelands-21/src/map_io/map_players_view_packet.cc:422:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). vision_file.open(fs, fname); data/widelands-21/src/map_io/map_players_view_packet.cc:1031:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[FILENAME_SIZE]; data/widelands-21/src/map_io/map_resources_packet.cc:40: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). fr.open(fs, "binary/resource"); data/widelands-21/src/map_io/map_road_packet.cc:46: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). fr.open(fs, "binary/road"); data/widelands-21/src/map_io/map_roaddata_packet.cc:53: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). fr.open(fs, "binary/road_data"); data/widelands-21/src/map_io/map_terrain_packet.cc:40: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). fr.open(fs, "binary/terrain"); data/widelands-21/src/map_io/map_waterway_packet.cc:46: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). fr.open(fs, "binary/waterway"); data/widelands-21/src/map_io/map_waterwaydata_packet.cc:52: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). fr.open(fs, "binary/waterway_data"); data/widelands-21/src/map_io/map_wincondition_packet.cc:38: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). fr.open(fs, "binary/wincondition"); data/widelands-21/src/map_io/s2map.cc:52: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 magic[10]; // "WORLD_V1.0" data/widelands-21/src/map_io/s2map.cc:53: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 name[20]; // We need fixed char arrays rather than strings here. Otherwise, this will data/widelands-21/src/map_io/s2map.cc:59:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char author[26]; data/widelands-21/src/map_io/s2map.cc:60: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 bulk[2290]; // unknown data/widelands-21/src/map_io/s2map.cc:196: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[256]; data/widelands-21/src/map_io/s2map.cc:199: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(buffer, fr.data(6), 6); data/widelands-21/src/map_io/s2map.cc:229: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(section.get() + y * width, ptr, width); data/widelands-21/src/map_io/s2map.cc:378: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). fr.open(*g_fs, filename_.c_str()); data/widelands-21/src/map_io/s2map.cc:467: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). fr.open(*g_fs, filename_.c_str()); data/widelands-21/src/network/crypto.cc:20:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char result[41] = {0}; data/widelands-21/src/network/crypto.cc:23:8: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. std::sprintf(result + (i << 3), "%08x", digest[i]); data/widelands-21/src/network/gameclient.cc:681: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). fr.open(*g_fs, path); data/widelands-21/src/network/gameclient.cc:744: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[NETFILEPARTSIZE]; data/widelands-21/src/network/gameclient.cc:751: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(fp.part, &buf[0], size); data/widelands-21/src/network/gameclient.cc:780: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). fr.open(*g_fs, d->file_->filename); data/widelands-21/src/network/gamehost.cc:1116: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). fr.open(*g_fs, mapfilename); data/widelands-21/src/network/gamehost.cc:1123:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fp.part, fr.data(readout), readout); data/widelands-21/src/network/internet_gaming.cc:956: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). fr.open(*g_fs, temp); data/widelands-21/src/network/nethost.cc:195: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). acceptor->open(endpoint.protocol()); data/widelands-21/src/network/network.cc:233: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[kNetworkBufferSize]; data/widelands-21/src/network/network.h:173:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char part[NETFILEPARTSIZE]; data/widelands-21/src/network/network_lan_promotion.cc:95: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 host[NI_MAXHOST]; data/widelands-21/src/network/network_lan_promotion.cc:319: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). socket->open(version, ec); data/widelands-21/src/network/network_lan_promotion.cc:420:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char magic[8]; data/widelands-21/src/network/network_lan_promotion.cc:452: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 magic[8]; data/widelands-21/src/network/network_lan_promotion.h:35: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 magic[6]; data/widelands-21/src/network/network_lan_promotion.h:39: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 gameversion[32]; data/widelands-21/src/network/network_lan_promotion.h:40: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 hostname[128]; data/widelands-21/src/network/network_lan_promotion.h:41: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 map[32]; data/widelands-21/src/scripting/lua_ui.cc:362:24: [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). METHOD(LuaDropdown, open), data/widelands-21/src/scripting/lua_ui.cc:399: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). int LuaDropdown::open(lua_State* /* L */) { data/widelands-21/src/scripting/lua_ui.h:148: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). int open(lua_State* L); data/widelands-21/src/scripting/report_error.cc:30: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[2048]; data/widelands-21/src/third_party/eris/eris.c:557: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(&rep, &value, sizeof(float)); data/widelands-21/src/third_party/eris/eris.c:564: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(&rep, &value, sizeof(double)); data/widelands-21/src/third_party/eris/eris.c:700: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(&value, &rep, sizeof(float)); data/widelands-21/src/third_party/eris/eris.c:708: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(&value, &rep, sizeof(double)); data/widelands-21/src/third_party/eris/eris.c:1835: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). uv = uv->u.open.next) data/widelands-21/src/third_party/eris/eris.c:2368:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newbuff, eris_buffer(buff), eris_bufflen(buff)); // NOLINT data/widelands-21/src/third_party/eris/eris.c:2374: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(&eris_buffer(buff)[eris_bufflen(buff)], value, sz); data/widelands-21/src/third_party/eris/eris.c:2420:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char header[HEADER_LENGTH]; data/widelands-21/src/third_party/eris/eris.c:2430: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 throw_away[3]; data/widelands-21/src/third_party/eris/lapi.c:1294:33: [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 (upisopen(*up1)) (*up1)->u.open.touched = 1; data/widelands-21/src/third_party/eris/lauxlib.c:519:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newbuff, B->b, B->n * sizeof(char)); /* copy original content */ // NOLINT data/widelands-21/src/third_party/eris/lauxlib.c:531:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(b, s, l * sizeof(char)); data/widelands-21/src/third_party/eris/lauxlib.c:638:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[BUFSIZ]; /* area for reading file */ data/widelands-21/src/third_party/eris/lauxlib.c:715:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). lf.f = fopen(filename, "r"); data/widelands-21/src/third_party/eris/lauxlib.h:157:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char initb[LUAL_BUFFERSIZE]; /* initial buffer */ data/widelands-21/src/third_party/eris/ldblib.c:382:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[5]; data/widelands-21/src/third_party/eris/ldblib.c:404:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[250]; data/widelands-21/src/third_party/eris/ldebug.c:630:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[LUA_IDSIZE]; data/widelands-21/src/third_party/eris/ldo.c:162:50: [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). for (up = L->openupval; up != NULL; up = up->u.open.next) data/widelands-21/src/third_party/eris/lfunc.c:66:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). pp = &p->u.open.next; data/widelands-21/src/third_party/eris/lfunc.c:71: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). uv->u.open.next = *pp; /* link it to list of open upvalues */ data/widelands-21/src/third_party/eris/lfunc.c:72: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). uv->u.open.touched = 1; data/widelands-21/src/third_party/eris/lfunc.c:87:26: [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). L->openupval = uv->u.open.next; /* remove from 'open' list */ data/widelands-21/src/third_party/eris/lfunc.h:42: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). } open; data/widelands-21/src/third_party/eris/lgc.c:323:59: [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). for (uv = thread->openupval; uv != NULL; uv = uv->u.open.next) { data/widelands-21/src/third_party/eris/lgc.c:324: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). if (uv->u.open.touched) { data/widelands-21/src/third_party/eris/lgc.c:326: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). uv->u.open.touched = 0; data/widelands-21/src/third_party/eris/lgc.c:521: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). uv->u.open.touched = 1; /* can be marked in 'remarkupvals' */ data/widelands-21/src/third_party/eris/liolib.c:245: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). p->f = fopen(fname, mode); data/widelands-21/src/third_party/eris/liolib.c:257: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). p->f = fopen(filename, mode); data/widelands-21/src/third_party/eris/liolib.c:283:10: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). p->f = tmpfile(); data/widelands-21/src/third_party/eris/liolib.c:389:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[L_MAXLENNUM + 1]; /* +1 for ending '\0' */ data/widelands-21/src/third_party/eris/liolib.c:439:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char decp[2]; data/widelands-21/src/third_party/eris/llex.c:346:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[UTF8BUFFSZ]; data/widelands-21/src/third_party/eris/loadlib.c:169:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[MAX_PATH + 1]; data/widelands-21/src/third_party/eris/loadlib.c:187:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[128]; data/widelands-21/src/third_party/eris/loadlib.c:417:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(filename, "r"); /* try to open file */ data/widelands-21/src/third_party/eris/lobject.c:282:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[L_MAXLENNUM + 1]; data/widelands-21/src/third_party/eris/lobject.c:372:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[MAXNUMBER2STR]; data/widelands-21/src/third_party/eris/lobject.c:437:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[4*sizeof(void *) + 8]; /* should be enough space for a '%p' */ data/widelands-21/src/third_party/eris/lobject.c:443:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[UTF8BUFFSZ]; data/widelands-21/src/third_party/eris/lobject.c:484:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define addstr(a,b,l) ( memcpy(a,b,(l) * sizeof(char)), a += (l) ) data/widelands-21/src/third_party/eris/lobject.c:490:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out, source + 1, l * sizeof(char)); data/widelands-21/src/third_party/eris/lobject.c:498:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out, source + 1, l * sizeof(char)); data/widelands-21/src/third_party/eris/lobject.c:502:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out, source + 1 + l - bufflen, bufflen * sizeof(char)); data/widelands-21/src/third_party/eris/lobject.c:518:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out, POS, (LL(POS) + 1) * sizeof(char)); data/widelands-21/src/third_party/eris/lopcodes.c:20:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = { data/widelands-21/src/third_party/eris/lopcodes.h:290:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. LUAI_DDEC const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */ data/widelands-21/src/third_party/eris/loslib.c:123:13: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). e = mkstemp(b); \ data/widelands-21/src/third_party/eris/loslib.c:167:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[LUA_TMPNAMBUFSIZE]; data/widelands-21/src/third_party/eris/loslib.c:268:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buff, conv, oplen); /* copy valid option to buffer */ data/widelands-21/src/third_party/eris/loslib.c:302:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cc[4]; /* buffer for individual conversion specifiers */ data/widelands-21/src/third_party/eris/lstate.c:79:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(b + p, &t, sizeof(t)); p += sizeof(t); } data/widelands-21/src/third_party/eris/lstate.c:82:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[4 * sizeof(size_t)]; data/widelands-21/src/third_party/eris/lstate.c:276: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(lua_getextraspace(L1), lua_getextraspace(g->mainthread), data/widelands-21/src/third_party/eris/lstring.c:187: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(getstr(ts), str, l * sizeof(char)); data/widelands-21/src/third_party/eris/lstring.c:207:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(getstr(ts), str, l * sizeof(char)); data/widelands-21/src/third_party/eris/lstrlib.c:135:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, s, l * sizeof(char)); p += l; data/widelands-21/src/third_party/eris/lstrlib.c:137:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, sep, lsep * sizeof(char)); data/widelands-21/src/third_party/eris/lstrlib.c:141:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, s, l * sizeof(char)); /* last copy (not followed by separator) */ data/widelands-21/src/third_party/eris/lstrlib.c:916:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[10]; data/widelands-21/src/third_party/eris/lstrlib.c:996: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(form, strfrmt, ((p - strfrmt) + 1) * sizeof(char)); data/widelands-21/src/third_party/eris/lstrlib.c:1030:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char form[MAX_FORMAT]; /* to store the format ('%...') */ data/widelands-21/src/third_party/eris/lstrlib.c:1146:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[5 * sizeof(lua_Number)]; /* enough for any float type */ data/widelands-21/src/third_party/eris/ltablib.c:263: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(buff, &c, sof(c) * sizeof(unsigned int)); data/widelands-21/src/third_party/eris/ltablib.c:264: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(buff + sof(c), &t, sof(t) * sizeof(unsigned int)); data/widelands-21/src/third_party/eris/ltm.c:29:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. LUAI_DDEF const char *const luaT_typenames_[LUA_TOTALTAGS] = { data/widelands-21/src/third_party/eris/ltm.h:55:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. LUAI_DDEC const char *const luaT_typenames_[LUA_TOTALTAGS]; data/widelands-21/src/third_party/eris/lua.c:308:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[LUA_MAXINPUT]; data/widelands-21/src/third_party/eris/lua.h:454:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char short_src[LUA_IDSIZE]; /* (S) */ data/widelands-21/src/third_party/eris/luac.c:181:38: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* D= (output==NULL) ? stdout : fopen(output,"wb"); data/widelands-21/src/third_party/eris/luac.c:267: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 buff[100]; data/widelands-21/src/third_party/eris/lundump.c:95:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[LUAI_MAXSHORTLEN]; data/widelands-21/src/third_party/eris/lundump.c:220:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[sizeof(LUA_SIGNATURE) + sizeof(LUAC_DATA)]; /* larger than both */ data/widelands-21/src/third_party/eris/lvm.c:464:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buff + tl, svalue(top - n), l * sizeof(char)); data/widelands-21/src/third_party/eris/lvm.c:498:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[LUAI_MAXSHORTLEN]; data/widelands-21/src/third_party/eris/lzio.c:60:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(b, z->p, m); data/widelands-21/src/third_party/gettext/gettext.h: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 msg_ctxt_id[msgctxt_len + msgid_len]; data/widelands-21/src/third_party/gettext/gettext.h:192: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[1024]; data/widelands-21/src/third_party/gettext/gettext.h:199: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(msg_ctxt_id, msgctxt, msgctxt_len - 1); data/widelands-21/src/third_party/gettext/gettext.h:201: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(msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/widelands-21/src/third_party/gettext/gettext.h:228:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg_ctxt_id[msgctxt_len + msgid_len]; data/widelands-21/src/third_party/gettext/gettext.h:230: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[1024]; data/widelands-21/src/third_party/gettext/gettext.h:237: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(msg_ctxt_id, msgctxt, msgctxt_len - 1); data/widelands-21/src/third_party/gettext/gettext.h:239: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(msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/widelands-21/src/third_party/minizip/unzip.cc:1050:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char data[SIZEDATA_INDATABLOCK]; data/widelands-21/src/third_party/minizip/unzip.cc:1179:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[4]; data/widelands-21/src/third_party/minizip/unzip.cc:1978: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). file = fopen(filename, mode_fopen); data/widelands-21/src/ui_basic/dropdown.cc:390:45: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void BaseDropdown::set_list_visibility(bool open) { data/widelands-21/src/ui_basic/dropdown.cc:395:21: [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). list_->set_visible(open); data/widelands-21/src/ui_basic/dropdown.h:137:32: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void set_list_visibility(bool open); data/widelands-21/src/website/create_spritesheet.cc:43: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 const* const animation_direction_names[6] = {"_ne", "_e", "_se", "_sw", "_w", "_nw"}; data/widelands-21/src/wlapplication.cc:127: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[PATH_MAX]; data/widelands-21/src/wlapplication.cc:136: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 filename[_MAX_PATH + 1] = {0}; data/widelands-21/src/wlapplication.cc:153: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[PATH_MAX]; data/widelands-21/src/wlapplication.cc:1636:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char module_name[MAX_PATH]; data/widelands-21/src/wui/building_statistics_menu.cc:790:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int number = std::atoi(cutoff.c_str()); data/widelands-21/src/wui/chat_msg_layout.cc:91: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 ts[12]; data/widelands-21/src/wui/interactive_base.cc:1377:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). uint32_t serial = atoi(args[1].c_str()); data/widelands-21/src/wui/interactive_player.cc:609:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int const n = atoi(args[1].c_str()); data/widelands-21/src/economy/cmd_call_economy_balance.cc:58:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdCallEconomyBalance::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/economy/cmd_call_economy_balance.cc:62:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). GameLogicCommand::read(fr, egbase, mol); data/widelands-21/src/economy/cmd_call_economy_balance.h:43:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/economy/economy_data_packet.cc:33:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void EconomyDataPacket::read(FileRead& fr) { data/widelands-21/src/economy/economy_data_packet.h:39:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&); data/widelands-21/src/economy/expedition_bootstrap.cc:326:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). wq->read(fr, game, mol, tribes_lookup_table); data/widelands-21/src/economy/expedition_bootstrap.cc:346:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). wq->read(fr, game, mol, tribes_lookup_table); data/widelands-21/src/economy/input_queue.cc:136:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void InputQueue::read(FileRead& fr, data/widelands-21/src/economy/input_queue.cc:159:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). request_->read(fr, game, mol, tribes_lookup_table); data/widelands-21/src/economy/input_queue.cc:176:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). request_->read(fr, game, mol, tribes_lookup_table); data/widelands-21/src/economy/input_queue.h:186:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead& f, data/widelands-21/src/economy/request.cc:101:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Request::read(FileRead& fr, data/widelands-21/src/economy/request.cc:170:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). requirements_.read(fr, game, mol); data/widelands-21/src/economy/request.h:114:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(FileRead&, Game&, MapObjectLoader&, const TribesLegacyLookupTable& tribes_lookup_table); data/widelands-21/src/economy/transfer.cc:286:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Transfer::read(FileRead& fr, Transfer::ReadData& rd) { data/widelands-21/src/economy/transfer.h:75:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead& fr, ReadData& rd); data/widelands-21/src/economy/ware_instance.cc:531:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ware.transfer_->read(fr, transfer_); data/widelands-21/src/game_io/game_class_packet.cc:31:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void GameClassPacket::read(FileSystem& fs, Game& game, MapObjectLoader*) { data/widelands-21/src/game_io/game_class_packet.h:32:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, Game&, MapObjectLoader* = nullptr) override; data/widelands-21/src/game_io/game_cmd_queue_packet.cc:34:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void GameCmdQueuePacket::read(FileSystem& fs, Game& game, MapObjectLoader* const ol) { data/widelands-21/src/game_io/game_cmd_queue_packet.cc:63:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cmd.read(fr, game, *ol); data/widelands-21/src/game_io/game_cmd_queue_packet.h:32:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, Game&, MapObjectLoader* = nullptr) override; data/widelands-21/src/game_io/game_data_packet.h:45:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual void read(FileSystem&, Game&, MapObjectLoader* = nullptr) = 0; data/widelands-21/src/game_io/game_interactive_player_packet.cc:41:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void GameInteractivePlayerPacket::read(FileSystem& fs, Game& game, MapObjectLoader* mol) { data/widelands-21/src/game_io/game_interactive_player_packet.h:32:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, Game&, MapObjectLoader* = nullptr) override; data/widelands-21/src/game_io/game_loader.cc:55:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). mp.read(fs_, game_, nullptr); data/widelands-21/src/game_io/game_loader.cc:75:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(fs_, game_); data/widelands-21/src/game_io/game_loader.cc:82:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(fs_, game_); data/widelands-21/src/game_io/game_loader.cc:88:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). map_packet.read(fs_, game_); data/widelands-21/src/game_io/game_loader.cc:105:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(fs_, game_); data/widelands-21/src/game_io/game_loader.cc:119:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(fs_, game_, mol); data/widelands-21/src/game_io/game_loader.cc:127:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(fs_, game_, mol); data/widelands-21/src/game_io/game_loader.cc:135:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(fs_, game_, mol); data/widelands-21/src/game_io/game_loader.cc:170:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(fs_, game_, mol); data/widelands-21/src/game_io/game_map_packet.cc:37:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void GameMapPacket::read(FileSystem& fs, Game& game, MapObjectLoader* const) { data/widelands-21/src/game_io/game_map_packet.h:39:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, Game&, MapObjectLoader* = nullptr) override; data/widelands-21/src/game_io/game_player_ai_persistent_packet.cc:33:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void GamePlayerAiPersistentPacket::read(FileSystem& fs, Game& game, MapObjectLoader*) { data/widelands-21/src/game_io/game_player_ai_persistent_packet.h:31:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, Game&, MapObjectLoader* = nullptr) override; data/widelands-21/src/game_io/game_player_economies_packet.cc:64:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void GamePlayerEconomiesPacket::read(FileSystem& fs, Game& game, MapObjectLoader* mol) { data/widelands-21/src/game_io/game_player_economies_packet.cc:86:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). d.read(fr); data/widelands-21/src/game_io/game_player_economies_packet.cc:96:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). d.read(fr); data/widelands-21/src/game_io/game_player_economies_packet.cc:116:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). d.read(fr); data/widelands-21/src/game_io/game_player_economies_packet.cc:138:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). d.read(fr); data/widelands-21/src/game_io/game_player_economies_packet.h:31:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, Game&, MapObjectLoader* = nullptr) override; data/widelands-21/src/game_io/game_player_info_packet.cc:38:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void GamePlayerInfoPacket::read(FileSystem& fs, Game& game, MapObjectLoader*) { data/widelands-21/src/game_io/game_player_info_packet.h:32:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, Game&, MapObjectLoader* = nullptr) override; data/widelands-21/src/game_io/game_preload_packet.cc:48:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void GamePreloadPacket::read(FileSystem& fs, Game&, MapObjectLoader* const) { data/widelands-21/src/game_io/game_preload_packet.cc:51:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prof.read("preload", nullptr, fs); data/widelands-21/src/game_io/game_preload_packet.h:34:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, Game&, MapObjectLoader* = nullptr) override; data/widelands-21/src/io/fileread.cc:77:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (; read < bufsize && filepos_ < length_; ++read, ++filepos_) { data/widelands-21/src/io/fileread.cc:77:49: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (; read < bufsize && filepos_ < length_; ++read, ++filepos_) { data/widelands-21/src/io/fileread.cc:78:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). static_cast<char*>(dst)[read] = data_[filepos_]; data/widelands-21/src/io/fileread.cc:80:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read; data/widelands-21/src/io/filesystem/zip_filesystem.cc:266: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). return filename_inzip[strlen(filename_inzip) - 1] == '/'; data/widelands-21/src/io/profile.cc:156:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const auto len = strlen(value) + 1; data/widelands-21/src/io/profile.cc:497:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(filename, global_section); data/widelands-21/src/io/profile.cc:506:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(filename, global_section); data/widelands-21/src/io/profile.cc:653:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Profile::read(char const* const filename, char const* const global_section, FileSystem& fs) { data/widelands-21/src/io/profile.cc:705:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (char* eot = line + strlen(line) - 1; *eot != '"' && *eot != '\''; --eot) { data/widelands-21/src/io/profile.cc:738: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* const eot = tail + strlen(tail) - 1; data/widelands-21/src/io/profile.cc:742:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char* const eot2 = tail + strlen(tail) - 1; data/widelands-21/src/io/profile.cc:820: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). uint32_t spaces = strlen(temp_value.get_name()); data/widelands-21/src/io/profile.cc:823:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (uint32_t i = 0; i < strlen(str); ++i) { data/widelands-21/src/io/profile.h:193:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(const char* const filename, data/widelands-21/src/io/streamread.cc:50:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read != size) { data/widelands-21/src/io/streamread.cc:52:80: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). "Stream ended unexpectedly (%" PRIuS " bytes read, %" PRIuS " expected)", read, size); data/widelands-21/src/io/streamwrite.h:95:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). data(x, strlen(x) + 1); data/widelands-21/src/io/streamwrite.h:103:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). data(x, strlen(x)); data/widelands-21/src/logic/ai_dna_handler.cc:50:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prof.read(full_filename.c_str(), nullptr, *g_fs); data/widelands-21/src/logic/cmd_calculate_statistics.cc:36:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdCalculateStatistics::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/cmd_calculate_statistics.cc:40:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). GameLogicCommand::read(fr, egbase, mol); data/widelands-21/src/logic/cmd_calculate_statistics.h:35:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/cmd_incorporate.cc:33:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdIncorporate::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/cmd_incorporate.cc:37:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). GameLogicCommand::read(fr, egbase, mol); data/widelands-21/src/logic/cmd_incorporate.h:39:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/cmd_luacoroutine.cc:72:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdLuaCoroutine::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/cmd_luacoroutine.cc:76:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). GameLogicCommand::read(fr, egbase, mol); data/widelands-21/src/logic/cmd_luacoroutine.h:41:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/cmd_luascript.cc:48:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdLuaScript::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/cmd_luascript.cc:52:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). GameLogicCommand::read(fr, egbase, mol); data/widelands-21/src/logic/cmd_luascript.h:38:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/cmd_queue.cc:161:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void GameLogicCommand::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader&) { data/widelands-21/src/logic/cmd_queue.h:99:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual void read(FileRead&, EditorGameBase&, MapObjectLoader&); data/widelands-21/src/logic/map_objects/map_object.cc:63:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdDestroyMapObject::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/map_objects/map_object.cc:67:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). GameLogicCommand::read(fr, egbase, mol); data/widelands-21/src/logic/map_objects/map_object.cc:114:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdAct::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/map_objects/map_object.cc:118:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). GameLogicCommand::read(fr, egbase, mol); data/widelands-21/src/logic/map_objects/map_object.h:574:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/map_objects/map_object.h:592:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/map_objects/tribes/building_settings.cc:191:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). result->read(game, fr, tribes_lookup_table); data/widelands-21/src/logic/map_objects/tribes/building_settings.cc:203:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void BuildingSettings::read(const Game&, FileRead&, const TribesLegacyLookupTable&) { data/widelands-21/src/logic/map_objects/tribes/building_settings.cc:212:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MilitarysiteSettings::read(const Game& game, data/widelands-21/src/logic/map_objects/tribes/building_settings.cc:215:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). BuildingSettings::read(game, fr, tribes_lookup_table); data/widelands-21/src/logic/map_objects/tribes/building_settings.cc:238:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void ProductionsiteSettings::read(const Game& game, data/widelands-21/src/logic/map_objects/tribes/building_settings.cc:241:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). BuildingSettings::read(game, fr, tribes_lookup_table); data/widelands-21/src/logic/map_objects/tribes/building_settings.cc:318:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void TrainingsiteSettings::read(const Game& game, data/widelands-21/src/logic/map_objects/tribes/building_settings.cc:321:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ProductionsiteSettings::read(game, fr, tribes_lookup_table); data/widelands-21/src/logic/map_objects/tribes/building_settings.cc:341:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void WarehouseSettings::read(const Game& game, data/widelands-21/src/logic/map_objects/tribes/building_settings.cc:344:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). BuildingSettings::read(game, fr, tribes_lookup_table); data/widelands-21/src/logic/map_objects/tribes/building_settings.h:54:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual void read(const Game&, FileRead&, const TribesLegacyLookupTable&); data/widelands-21/src/logic/map_objects/tribes/building_settings.h:73:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(const Game&, FileRead&, const TribesLegacyLookupTable& tribes_lookup_table) override; data/widelands-21/src/logic/map_objects/tribes/building_settings.h:92:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(const Game&, FileRead&, const TribesLegacyLookupTable& tribes_lookup_table) override; data/widelands-21/src/logic/map_objects/tribes/building_settings.h:106:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(const Game&, FileRead&, const TribesLegacyLookupTable& tribes_lookup_table) override; data/widelands-21/src/logic/map_objects/tribes/building_settings.h:119:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(const Game&, FileRead&, const TribesLegacyLookupTable& tribes_lookup_table) override; data/widelands-21/src/logic/map_objects/tribes/requirements.cc:39:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Requirements::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/map_objects/tribes/requirements.cc:43:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *this = RequirementsStorage::read(fr, egbase, mol); data/widelands-21/src/logic/map_objects/tribes/requirements.cc:78:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Requirements RequirementsStorage::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/map_objects/tribes/requirements.cc:127:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sub.read(fr, egbase, mol); data/widelands-21/src/logic/map_objects/tribes/requirements.cc:164:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sub.read(fr, egbase, mol); data/widelands-21/src/logic/map_objects/tribes/requirements.h:91:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&); data/widelands-21/src/logic/map_objects/tribes/requirements.h:118:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). static Requirements read(FileRead&, EditorGameBase&, MapObjectLoader&); data/widelands-21/src/logic/map_objects/tribes/worker.cc:3154:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). worker.transfer_->read(fr, transfer_); data/widelands-21/src/logic/playercommand.cc:179:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void PlayerCommand::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:183:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). GameLogicCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:216:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdBulldoze::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:220:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:262:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdBuild::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:266:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:304:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdBuildFlag::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:308:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:376:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdBuildRoad::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:380:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:459:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdBuildWaterway::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:463:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:512:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdFlagAction::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:517:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:563:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdStartStopBuilding::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:567:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:626:43: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdMilitarySiteSetSoldierPreference::read(FileRead& fr, data/widelands-21/src/logic/playercommand.cc:632:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:669:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdStartOrCancelExpedition::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:673:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:720:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdExpeditionConfig::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:724:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:773:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdEnhanceBuilding::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:777:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:818:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdDismantleBuilding::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:822:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:864:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdEvictWorker::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:868:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:919:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdShipScoutDirection::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:923:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:976:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdShipConstructPort::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:980:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:1036:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdShipExploreIsland::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:1040:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:1083:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdShipSink::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:1087:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:1127:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdShipCancelExpedition::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:1131:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:1202:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdSetWarePriority::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:1206:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:1305:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdSetInputMaxFill::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:1309:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:1362:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdChangeTargetQuantity::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:1364:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:1406:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdSetWareTargetQuantity::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:1410:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). CmdChangeTargetQuantity::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:1456:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdResetWareTargetQuantity::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:1460:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). CmdChangeTargetQuantity::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:1503:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdSetWorkerTargetQuantity::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:1507:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). CmdChangeTargetQuantity::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:1555:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdResetWorkerTargetQuantity::read(FileRead& fr, data/widelands-21/src/logic/playercommand.cc:1561:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). CmdChangeTargetQuantity::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:1602:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdChangeTrainingOptions::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:1606:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:1653:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdDropSoldier::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:1657:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:1727:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdChangeSoldierCapacity::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:1731:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:1808:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdEnemyFlagAction::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:1812:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:1870:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void PlayerMessageCommand::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:1874:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:1988:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdSetStockPolicy::read(FileRead& fr, EditorGameBase& egbase, MapObjectLoader& mol) { data/widelands-21/src/logic/playercommand.cc:1992:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). PlayerCommand::read(fr, egbase, mol); data/widelands-21/src/logic/playercommand.cc:2070:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void CmdProposeTrade::read(FileRead& /* fr */, data/widelands-21/src/logic/playercommand.h:72:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:92:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:116:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:140:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:162:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:187:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:211:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:234:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:261:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:284:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:312:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:340:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:366:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:391:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:414:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:438:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:466:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:489:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:512:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:541:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:573:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:602:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:632:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:659:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:682:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:709:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:735:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:761:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:786:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:811:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:836:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:908:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/logic/playercommand.h:933:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileRead&, EditorGameBase&, MapObjectLoader&) override; data/widelands-21/src/map_io/map_allowed_building_types_packet.cc:33:37: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapAllowedBuildingTypesPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_allowed_building_types_packet.cc:43:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prof.read("allowed_building_types", nullptr, fs); data/widelands-21/src/map_io/map_allowed_building_types_packet.cc:46:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prof.read("allowed_buildings", nullptr, fs); data/widelands-21/src/map_io/map_allowed_worker_types_packet.cc:32:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapAllowedWorkerTypesPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_allowed_worker_types_packet.cc:46:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prof.read("allowed_worker_types", nullptr, fs); data/widelands-21/src/map_io/map_bob_packet.cc:73:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapBobPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_bob_packet.h:38:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(FileSystem&, EditorGameBase&, MapObjectLoader&, const WorldLegacyLookupTable& lookup_table); data/widelands-21/src/map_io/map_building_packet.cc:43:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapBuildingPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_building_packet.h:37:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, EditorGameBase&, bool, MapObjectLoader&); data/widelands-21/src/map_io/map_buildingdata_packet.cc:67:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapBuildingdataPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_buildingdata_packet.cc:242:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pfb.builder_request_->read(fr, game, mol, tribes_lookup_table); data/widelands-21/src/map_io/map_buildingdata_packet.cc:262:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pfb.consume_wares_[i]->read(fr, game, mol, tribes_lookup_table); data/widelands-21/src/map_io/map_buildingdata_packet.cc:269:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pfb.dropout_wares_[i]->read(fr, game, mol, tribes_lookup_table); data/widelands-21/src/map_io/map_buildingdata_packet.cc:465:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pw.requests.back()->read(fr, game, mol, tribes_lookup_table); data/widelands-21/src/map_io/map_buildingdata_packet.cc:524:43: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). militarysite.normal_soldier_request_->read(fr, game, mol, tribes_lookup_table); data/widelands-21/src/map_io/map_buildingdata_packet.cc:534:44: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). militarysite.upgrade_soldier_request_->read(fr, game, mol, tribes_lookup_table); data/widelands-21/src/map_io/map_buildingdata_packet.cc:618:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). req.read(fr, game, mol, tribes_lookup_table); data/widelands-21/src/map_io/map_buildingdata_packet.cc:752:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). wq->read(fr, game, mol, tribes_lookup_table); data/widelands-21/src/map_io/map_buildingdata_packet.cc:765:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). wq->read(fr, game, mol, tribes_lookup_table); data/widelands-21/src/map_io/map_buildingdata_packet.cc:843:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). trainingsite.soldier_request_->read(fr, game, mol, tribes_lookup_table); data/widelands-21/src/map_io/map_buildingdata_packet.h:46:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, data/widelands-21/src/map_io/map_data_packet.h:36:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, EditorGameBase&, bool, MapObjectLoader&); \ data/widelands-21/src/map_io/map_elemental_packet.cc:36:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prof.read("elemental", nullptr, fs); data/widelands-21/src/map_io/map_elemental_packet.cc:115:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapElementalPacket::read(FileSystem& fs, EditorGameBase& egbase, bool, MapObjectLoader&) { data/widelands-21/src/map_io/map_elemental_packet.h:38:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, EditorGameBase&, bool, MapObjectLoader&); data/widelands-21/src/map_io/map_exploration_packet.cc:34:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapExplorationPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_flag_packet.cc:36:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapFlagPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_flagdata_packet.cc:41:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapFlagdataPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_flagdata_packet.cc:136:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f.request->read(fr, dynamic_cast<Game&>(egbase), mol, tribes_lookup_table); data/widelands-21/src/map_io/map_flagdata_packet.h:29:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, data/widelands-21/src/map_io/map_heights_packet.cc:32:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapHeightsPacket::read(FileSystem& fs, EditorGameBase& egbase, bool, MapObjectLoader&) { data/widelands-21/src/map_io/map_node_ownership_packet.cc:32:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapNodeOwnershipPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_object_packet.cc:49:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapObjectPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_object_packet.h:54:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, data/widelands-21/src/map_io/map_objective_packet.cc:37:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prof.read("objective", nullptr, fs); data/widelands-21/src/map_io/map_player_names_and_tribes_packet.cc:41:37: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapPlayerNamesAndTribesPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_player_names_and_tribes_packet.cc:54:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prof.read("player_names", nullptr, fs); data/widelands-21/src/map_io/map_player_names_and_tribes_packet.h:36:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual void read(FileSystem&, EditorGameBase&, bool, MapObjectLoader&); data/widelands-21/src/map_io/map_player_position_packet.cc:32:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapPlayerPositionPacket::read(FileSystem& fs, EditorGameBase& egbase, bool, MapObjectLoader&) { data/widelands-21/src/map_io/map_player_position_packet.cc:34:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prof.read("player_position", nullptr, fs); data/widelands-21/src/map_io/map_players_messages_packet.cc:39:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapPlayersMessagesPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_players_messages_packet.cc:54:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prof.read(profile_filename.c_str(), nullptr, fs); data/widelands-21/src/map_io/map_players_view_packet.cc:293:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapPlayersViewPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_players_view_packet.h:40:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, data/widelands-21/src/map_io/map_port_spaces_packet.cc:33:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapPortSpacesPacket::read(FileSystem& fs, EditorGameBase& egbase, bool, MapObjectLoader&) { data/widelands-21/src/map_io/map_port_spaces_packet.cc:35:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prof.read("port_spaces", nullptr, fs); data/widelands-21/src/map_io/map_port_spaces_packet.h:31:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, EditorGameBase&, bool, MapObjectLoader&); data/widelands-21/src/map_io/map_resources_packet.cc:36:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapResourcesPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_resources_packet.h:31:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, EditorGameBase&, const WorldLegacyLookupTable&); data/widelands-21/src/map_io/map_road_packet.cc:36:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapRoadPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_roaddata_packet.cc:42:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapRoaddataPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_roaddata_packet.cc:143:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ->read(fr, game, mol, tribes_lookup_table); data/widelands-21/src/map_io/map_roaddata_packet.h:33:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, data/widelands-21/src/map_io/map_scripting_packet.cc:56:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapScriptingPacket::read(FileSystem& fs, EditorGameBase& egbase, bool, MapObjectLoader& mol) { data/widelands-21/src/map_io/map_terrain_packet.cc:36:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapTerrainPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_terrain_packet.h:32:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, EditorGameBase&, const WorldLegacyLookupTable& lookup_table); data/widelands-21/src/map_io/map_version_packet.cc:35:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapVersionPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_version_packet.cc:50:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prof.read("version", nullptr, fs); data/widelands-21/src/map_io/map_version_packet.h:35:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, EditorGameBase&, bool skip, bool is_post_one_world); data/widelands-21/src/map_io/map_waterway_packet.cc:36:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapWaterwayPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_waterwaydata_packet.cc:42:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapWaterwaydataPacket::read(FileSystem& fs, data/widelands-21/src/map_io/map_wincondition_packet.cc:30:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void MapWinconditionPacket::read(FileSystem& fs, Map& map, MapObjectLoader&) { data/widelands-21/src/map_io/map_wincondition_packet.h:29:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(FileSystem&, Map& map, MapObjectLoader&); data/widelands-21/src/map_io/widelands_map_loader.cc:139:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). elemental_data_packet.read(*fs_, egbase, is_game, *mol_); data/widelands-21/src/map_io/widelands_map_loader.cc:148:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_); data/widelands-21/src/map_io/widelands_map_loader.cc:157:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_); data/widelands-21/src/map_io/widelands_map_loader.cc:166:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_); data/widelands-21/src/map_io/widelands_map_loader.cc:177:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, *world_lookup_table); data/widelands-21/src/map_io/widelands_map_loader.cc:185:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). mapobjects.read(*fs_, egbase, *mol_, *world_lookup_table, *tribes_lookup_table); data/widelands-21/src/map_io/widelands_map_loader.cc:192:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_); data/widelands-21/src/map_io/widelands_map_loader.cc:203:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, *mol_, *world_lookup_table); data/widelands-21/src/map_io/widelands_map_loader.cc:212:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, *world_lookup_table); data/widelands-21/src/map_io/widelands_map_loader.cc:223:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, old_world_name_.empty()); data/widelands-21/src/map_io/widelands_map_loader.cc:231:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_); data/widelands-21/src/map_io/widelands_map_loader.cc:238:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_); data/widelands-21/src/map_io/widelands_map_loader.cc:246:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_); data/widelands-21/src/map_io/widelands_map_loader.cc:254:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_); data/widelands-21/src/map_io/widelands_map_loader.cc:266:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_); data/widelands-21/src/map_io/widelands_map_loader.cc:274:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_); data/widelands-21/src/map_io/widelands_map_loader.cc:281:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_); data/widelands-21/src/map_io/widelands_map_loader.cc:289:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_); data/widelands-21/src/map_io/widelands_map_loader.cc:298:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_, *tribes_lookup_table); data/widelands-21/src/map_io/widelands_map_loader.cc:306:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_, *tribes_lookup_table); data/widelands-21/src/map_io/widelands_map_loader.cc:313:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_); data/widelands-21/src/map_io/widelands_map_loader.cc:321:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_, *tribes_lookup_table); data/widelands-21/src/map_io/widelands_map_loader.cc:350:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_, *tribes_lookup_table, *world_lookup_table); data/widelands-21/src/map_io/widelands_map_loader.cc:361:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_); data/widelands-21/src/map_io/widelands_map_loader.cc:370:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, *egbase.mutable_map(), *mol_); data/widelands-21/src/map_io/widelands_map_loader.cc:389:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p.read(*fs_, egbase, is_game, *mol_); data/widelands-21/src/network/network.cc:221:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (size_t read = 0; read < bufsize; ++read) { data/widelands-21/src/network/network.cc:221:42: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (size_t read = 0; read < bufsize; ++read) { data/widelands-21/src/network/network.cc:222:38: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). static_cast<uint8_t*>(packet_data)[read] = buffer[index_++]; data/widelands-21/src/network/network_lan_promotion.cc:391: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(gameinfo.magic, "GAME", sizeof(gameinfo.magic)); data/widelands-21/src/network/network_lan_promotion.cc:396:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gameinfo.gameversion, build_id().c_str(), sizeof(gameinfo.gameversion)); data/widelands-21/src/network/network_lan_promotion.cc:399:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gameinfo.hostname, boost::asio::ip::host_name().c_str(), sizeof(gameinfo.hostname)); data/widelands-21/src/network/network_lan_promotion.cc:438:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gameinfo.map, map, sizeof(gameinfo.map)); data/widelands-21/src/network/network_lan_promotion.cc:456: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(magic, "QUERY", 8); data/widelands-21/src/scripting/logic.cc:150:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rv->read(lua_state_, fr); data/widelands-21/src/scripting/lua_bases.cc:530:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). profile.read(complete_filename.c_str()); data/widelands-21/src/scripting/lua_coroutine.cc:154:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void LuaCoroutine::read(lua_State* parent, FileRead& fr) { data/widelands-21/src/scripting/lua_coroutine.h:71:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(lua_State*, FileRead&); data/widelands-21/src/scripting/luna.h:100:6: [1] (buffer) strlen: Does not handle 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(sub_namespace) != 0) { data/widelands-21/src/scripting/test/test_luna.cc:233:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). BOOST_REQUIRE_EQUAL(0, luaL_loadbuffer(L, script1, strlen(script1), "testscript1")); data/widelands-21/src/scripting/test/test_luna.cc:247:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). BOOST_REQUIRE_EQUAL(0, luaL_loadbuffer(L, script1, strlen(script1), "testscript1")); data/widelands-21/src/scripting/test/test_luna.cc:266:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). BOOST_REQUIRE_EQUAL(0, luaL_loadbuffer(L, script2, strlen(script2), "testscript2")); data/widelands-21/src/scripting/test/test_luna.cc:283:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). BOOST_REQUIRE_EQUAL(0, luaL_loadbuffer(L, script3, strlen(script3), "testscript3")); data/widelands-21/src/scripting/test/test_luna.cc:300:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). BOOST_REQUIRE_EQUAL(0, luaL_loadbuffer(L, script4, strlen(script4), "testscript4")); data/widelands-21/src/scripting/test/test_luna.cc:318:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). BOOST_REQUIRE_EQUAL(0, luaL_loadbuffer(L, script5, strlen(script5), "testscript5")); data/widelands-21/src/scripting/test/test_luna.cc:335:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). BOOST_REQUIRE_EQUAL(0, luaL_loadbuffer(L, script6, strlen(script6), "testscript6")); data/widelands-21/src/scripting/test/test_luna.cc:353:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). BOOST_REQUIRE_EQUAL(0, luaL_loadbuffer(L, script6, strlen(script6), "testscript6")); data/widelands-21/src/third_party/eris/lauxlib.c:401:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *len = (def ? strlen(def) : 0); data/widelands-21/src/third_party/eris/lauxlib.c:538:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). luaL_addlstring(B, s, strlen(s)); data/widelands-21/src/third_party/eris/lauxlib.c:674:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(lf->f); data/widelands-21/src/third_party/eris/lauxlib.c:679:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return getc(lf->f); /* return next character */ data/widelands-21/src/third_party/eris/lauxlib.c:694:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(lf->f); data/widelands-21/src/third_party/eris/lauxlib.c:696:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *cp = getc(lf->f); /* skip end-of-line, if present */ data/widelands-21/src/third_party/eris/lauxlib.c:765:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return luaL_loadbuffer(L, s, strlen(s), s); data/widelands-21/src/third_party/eris/lauxlib.c:861:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (e == NULL) e = fname + strlen(fname); data/widelands-21/src/third_party/eris/lauxlib.c:994:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t l = strlen(p); data/widelands-21/src/third_party/eris/ldblib.c:409:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") || data/widelands-21/src/third_party/eris/liolib.c:43: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). (strspn(mode, L_MODEEXT) == strlen(mode))); /* check extensions */ data/widelands-21/src/third_party/eris/liolib.c:90:20: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define l_getc(f) getc(f) data/widelands-21/src/third_party/eris/liolib.c:470:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = getc(f); data/widelands-21/src/third_party/eris/loadlib.c:429:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (l == NULL) l = path + strlen(path); data/widelands-21/src/third_party/eris/lobject.c:284: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(s) > L_MAXLENNUM || pdot == NULL) data/widelands-21/src/third_party/eris/lobject.c:410: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). pushstr(L, s, strlen(s)); data/widelands-21/src/third_party/eris/lobject.c:461:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pushstr(L, fmt, strlen(fmt)); data/widelands-21/src/third_party/eris/lobject.c:487:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t l = strlen(source); data/widelands-21/src/third_party/eris/lstring.c:231: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). p[0] = luaS_newlstr(L, str, strlen(str)); data/widelands-21/src/third_party/eris/lstrlib.c:585: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). upto += strlen(p + upto) + 1; /* may have more after \0 */ data/widelands-21/src/third_party/eris/lstrlib.c:1007:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t l = strlen(form); data/widelands-21/src/third_party/eris/lstrlib.c:1008:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t lm = strlen(lenmod); data/widelands-21/src/third_party/eris/lstrlib.c:1070:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). luaL_argcheck(L, l == strlen(s), arg, "string contains zeros"); data/widelands-21/src/third_party/eris/lstrlib.c:1400:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). luaL_argcheck(L, strlen(s) == len, arg, "string contains zeros"); data/widelands-21/src/third_party/eris/lstrlib.c:1524:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = (int)strlen(data + pos); data/widelands-21/src/third_party/eris/lua.c:213:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lua_writestring(LUA_COPYRIGHT, strlen(LUA_COPYRIGHT)); data/widelands-21/src/third_party/eris/lua.c:251: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). return dochunk(L, luaL_loadbuffer(L, s, strlen(s), name)); data/widelands-21/src/third_party/eris/lua.c:316:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(b); data/widelands-21/src/third_party/eris/lua.c:335: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). int status = luaL_loadbuffer(L, retline, strlen(retline), "=stdin"); data/widelands-21/src/third_party/eris/lundump.c:221:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(s); data/widelands-21/src/third_party/eris/lvm.c:258:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(l); /* index of first '\0' in both strings */ data/widelands-21/src/third_party/gettext/gettext.h:186: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). size_t msgctxt_len = strlen(msgctxt) + 1; data/widelands-21/src/third_party/gettext/gettext.h:187: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 msgid_len = strlen(msgid) + 1; data/widelands-21/src/third_party/gettext/gettext.h:224: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). size_t msgctxt_len = strlen(msgctxt) + 1; data/widelands-21/src/third_party/gettext/gettext.h:225: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 msgid_len = strlen(msgid) + 1; data/widelands-21/src/third_party/minizip/unzip.cc:1552:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_comment = comment ? static_cast<uInt>(strlen(comment)) : 0; data/widelands-21/src/third_party/minizip/unzip.cc:1554: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). size_filename = static_cast<uInt>(strlen(filename)); data/widelands-21/src/third_party/minizip/unzip.cc:1860:59: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_global_comment = global_comment ? static_cast<uInt>(strlen(global_comment)) : 0; data/widelands-21/src/ui_fsmenu/launch_mpg.cc:324:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prof.read("map/elemental", nullptr, *l_fs); data/widelands-21/src/ui_fsmenu/launch_mpg.cc:498:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prof.read("map/player_names", nullptr, *l_fs); data/widelands-21/src/wlapplication_options.cc:124:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). g_options.read(kConfigFile.c_str(), "global", *config_dir); data/widelands-21/src/wui/economy_options_window.cc:756:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). profile.read(complete_filename.c_str()); ANALYSIS SUMMARY: Hits = 668 Lines analyzed = 237423 in approximately 11.99 seconds (19796 lines/second) Physical Source Lines of Code (SLOC) = 153344 Hits@level = [0] 70 [1] 362 [2] 215 [3] 34 [4] 56 [5] 1 Hits@level+ = [0+] 738 [1+] 668 [2+] 306 [3+] 91 [4+] 57 [5+] 1 Hits/KSLOC@level+ = [0+] 4.81271 [1+] 4.35622 [2+] 1.99551 [3+] 0.593437 [4+] 0.371713 [5+] 0.00652129 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.