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/gerbera-1.1.0+dfsg/config/mysql.sql.tmpl.h Examining data/gerbera-1.1.0+dfsg/config/pgsql.sql.tmpl.h Examining data/gerbera-1.1.0+dfsg/config/sqlite3.sql.tmpl.h Examining data/gerbera-1.1.0+dfsg/config/zpipe.c Examining data/gerbera-1.1.0+dfsg/src/action_request.cc Examining data/gerbera-1.1.0+dfsg/src/action_request.h Examining data/gerbera-1.1.0+dfsg/src/atrailers_content_handler.cc Examining data/gerbera-1.1.0+dfsg/src/atrailers_content_handler.h Examining data/gerbera-1.1.0+dfsg/src/atrailers_service.cc Examining data/gerbera-1.1.0+dfsg/src/atrailers_service.h Examining data/gerbera-1.1.0+dfsg/src/autoscan.cc Examining data/gerbera-1.1.0+dfsg/src/autoscan.h Examining data/gerbera-1.1.0+dfsg/src/autoscan_inotify.cc Examining data/gerbera-1.1.0+dfsg/src/autoscan_inotify.h Examining data/gerbera-1.1.0+dfsg/src/buffered_io_handler.cc Examining data/gerbera-1.1.0+dfsg/src/buffered_io_handler.h Examining data/gerbera-1.1.0+dfsg/src/cached_url.cc Examining data/gerbera-1.1.0+dfsg/src/cached_url.h Examining data/gerbera-1.1.0+dfsg/src/cds_objects.h Examining data/gerbera-1.1.0+dfsg/src/cds_resource.cc Examining data/gerbera-1.1.0+dfsg/src/cds_resource.h Examining data/gerbera-1.1.0+dfsg/src/cds_resource_manager.cc Examining data/gerbera-1.1.0+dfsg/src/cds_resource_manager.h Examining data/gerbera-1.1.0+dfsg/src/common.h Examining data/gerbera-1.1.0+dfsg/src/config_manager.h Examining data/gerbera-1.1.0+dfsg/src/config_options.h Examining data/gerbera-1.1.0+dfsg/src/content_manager.h Examining data/gerbera-1.1.0+dfsg/src/contrib/md5.c Examining data/gerbera-1.1.0+dfsg/src/contrib/md5.h Examining data/gerbera-1.1.0+dfsg/src/curl_io_handler.cc Examining data/gerbera-1.1.0+dfsg/src/curl_io_handler.h Examining data/gerbera-1.1.0+dfsg/src/destroyer.cc Examining data/gerbera-1.1.0+dfsg/src/destroyer.h Examining data/gerbera-1.1.0+dfsg/src/dictionary.cc Examining data/gerbera-1.1.0+dfsg/src/dictionary.h Examining data/gerbera-1.1.0+dfsg/src/exceptions.cc Examining data/gerbera-1.1.0+dfsg/src/exceptions.h Examining data/gerbera-1.1.0+dfsg/src/executor.h Examining data/gerbera-1.1.0+dfsg/src/fd_io_handler.cc Examining data/gerbera-1.1.0+dfsg/src/fd_io_handler.h Examining data/gerbera-1.1.0+dfsg/src/file_io_handler.cc Examining data/gerbera-1.1.0+dfsg/src/file_io_handler.h Examining data/gerbera-1.1.0+dfsg/src/file_request_handler.cc Examining data/gerbera-1.1.0+dfsg/src/file_request_handler.h Examining data/gerbera-1.1.0+dfsg/src/filesystem.cc Examining data/gerbera-1.1.0+dfsg/src/filesystem.h Examining data/gerbera-1.1.0+dfsg/src/generic_task.cc Examining data/gerbera-1.1.0+dfsg/src/generic_task.h Examining data/gerbera-1.1.0+dfsg/src/io_handler.cc Examining data/gerbera-1.1.0+dfsg/src/io_handler.h Examining data/gerbera-1.1.0+dfsg/src/io_handler_buffer_helper.cc Examining data/gerbera-1.1.0+dfsg/src/io_handler_buffer_helper.h Examining data/gerbera-1.1.0+dfsg/src/io_handler_chainer.cc Examining data/gerbera-1.1.0+dfsg/src/io_handler_chainer.h Examining data/gerbera-1.1.0+dfsg/src/jpeg_resolution.cc Examining data/gerbera-1.1.0+dfsg/src/lastfm_scrobbler.cc Examining data/gerbera-1.1.0+dfsg/src/lastfm_scrobbler.h Examining data/gerbera-1.1.0+dfsg/src/layout/fallback_layout.cc Examining data/gerbera-1.1.0+dfsg/src/layout/fallback_layout.h Examining data/gerbera-1.1.0+dfsg/src/layout/js_layout.cc Examining data/gerbera-1.1.0+dfsg/src/layout/js_layout.h Examining data/gerbera-1.1.0+dfsg/src/layout/layout.h Examining data/gerbera-1.1.0+dfsg/src/logger.cc Examining data/gerbera-1.1.0+dfsg/src/logger.h Examining data/gerbera-1.1.0+dfsg/src/mem_io_handler.cc Examining data/gerbera-1.1.0+dfsg/src/mem_io_handler.h Examining data/gerbera-1.1.0+dfsg/src/memory.cc Examining data/gerbera-1.1.0+dfsg/src/memory.h Examining data/gerbera-1.1.0+dfsg/src/metadata/exiv2_handler.cc Examining data/gerbera-1.1.0+dfsg/src/metadata/exiv2_handler.h Examining data/gerbera-1.1.0+dfsg/src/metadata/fanart_handler.cc Examining data/gerbera-1.1.0+dfsg/src/metadata/fanart_handler.h Examining data/gerbera-1.1.0+dfsg/src/metadata/ffmpeg_handler.cc Examining data/gerbera-1.1.0+dfsg/src/metadata/ffmpeg_handler.h Examining data/gerbera-1.1.0+dfsg/src/metadata/libexif_handler.cc Examining data/gerbera-1.1.0+dfsg/src/metadata/libexif_handler.h Examining data/gerbera-1.1.0+dfsg/src/metadata/taglib_handler.cc Examining data/gerbera-1.1.0+dfsg/src/metadata/taglib_handler.h Examining data/gerbera-1.1.0+dfsg/src/metadata_handler.cc Examining data/gerbera-1.1.0+dfsg/src/metadata_handler.h Examining data/gerbera-1.1.0+dfsg/src/mt_inotify.cc Examining data/gerbera-1.1.0+dfsg/src/mt_inotify.h Examining data/gerbera-1.1.0+dfsg/src/mxml/attribute.cc Examining data/gerbera-1.1.0+dfsg/src/mxml/attribute.h Examining data/gerbera-1.1.0+dfsg/src/mxml/comment.cc Examining data/gerbera-1.1.0+dfsg/src/mxml/comment.h Examining data/gerbera-1.1.0+dfsg/src/mxml/context.cc Examining data/gerbera-1.1.0+dfsg/src/mxml/context.h Examining data/gerbera-1.1.0+dfsg/src/mxml/document.cc Examining data/gerbera-1.1.0+dfsg/src/mxml/document.h Examining data/gerbera-1.1.0+dfsg/src/mxml/element.cc Examining data/gerbera-1.1.0+dfsg/src/mxml/element.h Examining data/gerbera-1.1.0+dfsg/src/mxml/mxml.h Examining data/gerbera-1.1.0+dfsg/src/mxml/node.cc Examining data/gerbera-1.1.0+dfsg/src/mxml/node.h Examining data/gerbera-1.1.0+dfsg/src/mxml/parseexception.cc Examining data/gerbera-1.1.0+dfsg/src/mxml/parseexception.h Examining data/gerbera-1.1.0+dfsg/src/mxml/parser.h Examining data/gerbera-1.1.0+dfsg/src/mxml/parser_expat.cc Examining data/gerbera-1.1.0+dfsg/src/mxml/xml_text.cc Examining data/gerbera-1.1.0+dfsg/src/mxml/xml_text.h Examining data/gerbera-1.1.0+dfsg/src/mxml/xml_to_json.cc Examining data/gerbera-1.1.0+dfsg/src/mxml/xml_to_json.h Examining data/gerbera-1.1.0+dfsg/src/object_dictionary.h Examining data/gerbera-1.1.0+dfsg/src/online_service.cc Examining data/gerbera-1.1.0+dfsg/src/online_service.h Examining data/gerbera-1.1.0+dfsg/src/online_service_helper.cc Examining data/gerbera-1.1.0+dfsg/src/online_service_helper.h Examining data/gerbera-1.1.0+dfsg/src/play_hook.cc Examining data/gerbera-1.1.0+dfsg/src/play_hook.h Examining data/gerbera-1.1.0+dfsg/src/process.cc Examining data/gerbera-1.1.0+dfsg/src/process.h Examining data/gerbera-1.1.0+dfsg/src/process_executor.cc Examining data/gerbera-1.1.0+dfsg/src/process_executor.h Examining data/gerbera-1.1.0+dfsg/src/process_io_handler.cc Examining data/gerbera-1.1.0+dfsg/src/process_io_handler.h Examining data/gerbera-1.1.0+dfsg/src/reentrant_array.h Examining data/gerbera-1.1.0+dfsg/src/request_handler.cc Examining data/gerbera-1.1.0+dfsg/src/request_handler.h Examining data/gerbera-1.1.0+dfsg/src/rexp.cc Examining data/gerbera-1.1.0+dfsg/src/rexp.h Examining data/gerbera-1.1.0+dfsg/src/scripting/import_script.cc Examining data/gerbera-1.1.0+dfsg/src/scripting/import_script.h Examining data/gerbera-1.1.0+dfsg/src/scripting/js_functions.cc Examining data/gerbera-1.1.0+dfsg/src/scripting/js_functions.h Examining data/gerbera-1.1.0+dfsg/src/scripting/playlist_parser_script.cc Examining data/gerbera-1.1.0+dfsg/src/scripting/playlist_parser_script.h Examining data/gerbera-1.1.0+dfsg/src/scripting/runtime.cc Examining data/gerbera-1.1.0+dfsg/src/scripting/runtime.h Examining data/gerbera-1.1.0+dfsg/src/scripting/script.cc Examining data/gerbera-1.1.0+dfsg/src/scripting/script.h Examining data/gerbera-1.1.0+dfsg/src/serve_request_handler.cc Examining data/gerbera-1.1.0+dfsg/src/serve_request_handler.h Examining data/gerbera-1.1.0+dfsg/src/server.h Examining data/gerbera-1.1.0+dfsg/src/session_manager.cc Examining data/gerbera-1.1.0+dfsg/src/session_manager.h Examining data/gerbera-1.1.0+dfsg/src/singleton.cc Examining data/gerbera-1.1.0+dfsg/src/singleton.h Examining data/gerbera-1.1.0+dfsg/src/sopcast_content_handler.cc Examining data/gerbera-1.1.0+dfsg/src/sopcast_content_handler.h Examining data/gerbera-1.1.0+dfsg/src/sopcast_service.cc Examining data/gerbera-1.1.0+dfsg/src/sopcast_service.h Examining data/gerbera-1.1.0+dfsg/src/storage.cc Examining data/gerbera-1.1.0+dfsg/src/storage.h Examining data/gerbera-1.1.0+dfsg/src/storage/cache_object.cc Examining data/gerbera-1.1.0+dfsg/src/storage/cache_object.h Examining data/gerbera-1.1.0+dfsg/src/storage/mysql/mysql_create_sql.h Examining data/gerbera-1.1.0+dfsg/src/storage/mysql/mysql_storage.cc Examining data/gerbera-1.1.0+dfsg/src/storage/mysql/mysql_storage.h Examining data/gerbera-1.1.0+dfsg/src/storage/sql_storage.cc Examining data/gerbera-1.1.0+dfsg/src/storage/sql_storage.h Examining data/gerbera-1.1.0+dfsg/src/storage/sqlite3/sqlite3_create_sql.h Examining data/gerbera-1.1.0+dfsg/src/storage/sqlite3/sqlite3_storage.cc Examining data/gerbera-1.1.0+dfsg/src/storage/sqlite3/sqlite3_storage.h Examining data/gerbera-1.1.0+dfsg/src/storage/storage_cache.cc Examining data/gerbera-1.1.0+dfsg/src/storage/storage_cache.h Examining data/gerbera-1.1.0+dfsg/src/string_converter.cc Examining data/gerbera-1.1.0+dfsg/src/string_converter.h Examining data/gerbera-1.1.0+dfsg/src/subscription_request.cc Examining data/gerbera-1.1.0+dfsg/src/subscription_request.h Examining data/gerbera-1.1.0+dfsg/src/task_processor.cc Examining data/gerbera-1.1.0+dfsg/src/task_processor.h Examining data/gerbera-1.1.0+dfsg/src/thread_executor.cc Examining data/gerbera-1.1.0+dfsg/src/thread_executor.h Examining data/gerbera-1.1.0+dfsg/src/timer.cc Examining data/gerbera-1.1.0+dfsg/src/timer.h Examining data/gerbera-1.1.0+dfsg/src/tools.cc Examining data/gerbera-1.1.0+dfsg/src/tools.h Examining data/gerbera-1.1.0+dfsg/src/transcoding/transcode_dispatcher.cc Examining data/gerbera-1.1.0+dfsg/src/transcoding/transcode_dispatcher.h Examining data/gerbera-1.1.0+dfsg/src/transcoding/transcode_ext_handler.cc Examining data/gerbera-1.1.0+dfsg/src/transcoding/transcode_ext_handler.h Examining data/gerbera-1.1.0+dfsg/src/transcoding/transcode_handler.h Examining data/gerbera-1.1.0+dfsg/src/transcoding/transcoding.cc Examining data/gerbera-1.1.0+dfsg/src/transcoding/transcoding.h Examining data/gerbera-1.1.0+dfsg/src/transcoding/transcoding_process_executor.cc Examining data/gerbera-1.1.0+dfsg/src/transcoding/transcoding_process_executor.h Examining data/gerbera-1.1.0+dfsg/src/update_manager.cc Examining data/gerbera-1.1.0+dfsg/src/update_manager.h Examining data/gerbera-1.1.0+dfsg/src/upnp_cds.cc Examining data/gerbera-1.1.0+dfsg/src/upnp_cds.h Examining data/gerbera-1.1.0+dfsg/src/upnp_cm.cc Examining data/gerbera-1.1.0+dfsg/src/upnp_cm.h Examining data/gerbera-1.1.0+dfsg/src/upnp_mrreg.cc Examining data/gerbera-1.1.0+dfsg/src/upnp_mrreg.h Examining data/gerbera-1.1.0+dfsg/src/upnp_xml.cc Examining data/gerbera-1.1.0+dfsg/src/upnp_xml.h Examining data/gerbera-1.1.0+dfsg/src/url.cc Examining data/gerbera-1.1.0+dfsg/src/url.h Examining data/gerbera-1.1.0+dfsg/src/url_request_handler.cc Examining data/gerbera-1.1.0+dfsg/src/url_request_handler.h Examining data/gerbera-1.1.0+dfsg/src/web/action.cc Examining data/gerbera-1.1.0+dfsg/src/web/add.cc Examining data/gerbera-1.1.0+dfsg/src/web/add_object.cc Examining data/gerbera-1.1.0+dfsg/src/web/auth.cc Examining data/gerbera-1.1.0+dfsg/src/web/containers.cc Examining data/gerbera-1.1.0+dfsg/src/web/directories.cc Examining data/gerbera-1.1.0+dfsg/src/web/edit_load.cc Examining data/gerbera-1.1.0+dfsg/src/web/edit_save.cc Examining data/gerbera-1.1.0+dfsg/src/web/files.cc Examining data/gerbera-1.1.0+dfsg/src/web/items.cc Examining data/gerbera-1.1.0+dfsg/src/web/pages.cc Examining data/gerbera-1.1.0+dfsg/src/web/pages.h Examining data/gerbera-1.1.0+dfsg/src/web/remove.cc Examining data/gerbera-1.1.0+dfsg/src/web/tasks.cc Examining data/gerbera-1.1.0+dfsg/src/web/web_autoscan.cc Examining data/gerbera-1.1.0+dfsg/src/web/web_update.cc Examining data/gerbera-1.1.0+dfsg/src/web_callbacks.h Examining data/gerbera-1.1.0+dfsg/src/web_request_handler.cc Examining data/gerbera-1.1.0+dfsg/src/web_request_handler.h Examining data/gerbera-1.1.0+dfsg/src/xpath.cc Examining data/gerbera-1.1.0+dfsg/src/xpath.h Examining data/gerbera-1.1.0+dfsg/src/youtube_content_handler.cc Examining data/gerbera-1.1.0+dfsg/src/youtube_content_handler.h Examining data/gerbera-1.1.0+dfsg/src/youtube_service.cc Examining data/gerbera-1.1.0+dfsg/src/youtube_service.h Examining data/gerbera-1.1.0+dfsg/src/youtube_video_url.cc Examining data/gerbera-1.1.0+dfsg/src/youtube_video_url.h Examining data/gerbera-1.1.0+dfsg/src/zmm/array.cc Examining data/gerbera-1.1.0+dfsg/src/zmm/array.h Examining data/gerbera-1.1.0+dfsg/src/zmm/base_array.h Examining data/gerbera-1.1.0+dfsg/src/zmm/base_queue.h Examining data/gerbera-1.1.0+dfsg/src/zmm/base_stack.h Examining data/gerbera-1.1.0+dfsg/src/zmm/exception.cc Examining data/gerbera-1.1.0+dfsg/src/zmm/exception.h Examining data/gerbera-1.1.0+dfsg/src/zmm/object.cc Examining data/gerbera-1.1.0+dfsg/src/zmm/object.h Examining data/gerbera-1.1.0+dfsg/src/zmm/object_queue.h Examining data/gerbera-1.1.0+dfsg/src/zmm/object_stack.h Examining data/gerbera-1.1.0+dfsg/src/zmm/ref.h Examining data/gerbera-1.1.0+dfsg/src/zmm/stringbuffer.cc Examining data/gerbera-1.1.0+dfsg/src/zmm/stringbuffer.h Examining data/gerbera-1.1.0+dfsg/src/zmm/strings.cc Examining data/gerbera-1.1.0+dfsg/src/zmm/strings.h Examining data/gerbera-1.1.0+dfsg/src/zmm/stringtokenizer.cc Examining data/gerbera-1.1.0+dfsg/src/zmm/stringtokenizer.h Examining data/gerbera-1.1.0+dfsg/src/zmm/zmm.h Examining data/gerbera-1.1.0+dfsg/src/zmm/zmmf.h Examining data/gerbera-1.1.0+dfsg/src/content_manager.cc Examining data/gerbera-1.1.0+dfsg/src/main.cc Examining data/gerbera-1.1.0+dfsg/src/cds_objects.cc Examining data/gerbera-1.1.0+dfsg/src/config_manager.cc Examining data/gerbera-1.1.0+dfsg/src/server.cc Examining data/gerbera-1.1.0+dfsg/src/web_callbacks.cc FINAL RESULTS: data/gerbera-1.1.0+dfsg/src/metadata/ffmpeg_handler.cc:274:17: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(path, st.st_mode | xbits)) { data/gerbera-1.1.0+dfsg/src/transcoding/transcode_ext_handler.cc:178:17: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(location.c_str(), S_IWUSR | S_IRUSR); data/gerbera-1.1.0+dfsg/src/transcoding/transcode_ext_handler.cc:236:5: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(fifo_name.c_str(), S_IWUSR | S_IRUSR); data/gerbera-1.1.0+dfsg/src/file_request_handler.cc:141:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(path.c_str(), R_OK) == 0) { data/gerbera-1.1.0+dfsg/src/file_request_handler.cc:266:25: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(fpath.c_str(), R_OK) == 0) { data/gerbera-1.1.0+dfsg/src/logger.cc:94:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(LOG_FILE, format, ap); data/gerbera-1.1.0+dfsg/src/logger.cc:104:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(LOG_FILE, format, ap); data/gerbera-1.1.0+dfsg/src/logger.cc:114:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(LOG_FILE, format, ap); data/gerbera-1.1.0+dfsg/src/logger.cc:124:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(LOG_FILE, format, ap); data/gerbera-1.1.0+dfsg/src/logger.cc:139:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(LOG_FILE, format, ap); data/gerbera-1.1.0+dfsg/src/metadata/ffmpeg_handler.cc:150:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(duration, "%02" PRId64 ":%02" PRId64 ":%02" PRId64 ".%01" PRId64, hours, mins, secs, (10 * us) / AV_TIME_BASE); data/gerbera-1.1.0+dfsg/src/process.cc:97:18: [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 sysret = system(command.c_str()); data/gerbera-1.1.0+dfsg/src/process_executor.cc:68:13: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(command.c_str(), const_cast<char **const>(argv)); data/gerbera-1.1.0+dfsg/src/serve_request_handler.cc:115:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(path.c_str(), R_OK) == 0) data/gerbera-1.1.0+dfsg/src/session_manager.cc:56:5: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. access(); data/gerbera-1.1.0+dfsg/src/session_manager.h:77:17: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. inline void access() { getTimespecNow(&last_access); } data/gerbera-1.1.0+dfsg/src/storage/sqlite3/sqlite3_storage.cc:92:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(dbFilePath.c_str(), R_OK | W_OK) != 0 && errno != ENOENT) data/gerbera-1.1.0+dfsg/src/storage/sqlite3/sqlite3_storage.cc:125:17: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(dbFilePathbackup.c_str(), R_OK) == 0) { data/gerbera-1.1.0+dfsg/src/tools.cc:207:15: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. int ret = access(path.c_str(), R_OK | X_OK); data/gerbera-1.1.0+dfsg/src/web_request_handler.cc:82:14: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. session->access(); data/gerbera-1.1.0+dfsg/src/youtube_video_url.cc:148:9: [4] (shell) execl: 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. execl("/usr/bin/youtube-dl", "/usr/bin/youtube-dl","-g",watch.c_str(),NULL); data/gerbera-1.1.0+dfsg/src/zmm/stringbuffer.cc:68: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(data + len, other.base->data); data/gerbera-1.1.0+dfsg/src/zmm/stringbuffer.cc:89: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(data + len, str); data/gerbera-1.1.0+dfsg/src/zmm/stringbuffer.cc:141: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(data + len, other->c_str() + offset); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:50: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(data, str); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:156: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(res.base->data, base->data); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:157: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(res.base->data + len, other.base->data); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:169: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(res.base->data, base->data); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:170: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(res.base->data + len, other); data/gerbera-1.1.0+dfsg/src/main.cc:123: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. char* preload = getenv("LD_PRELOAD"); data/gerbera-1.1.0+dfsg/src/main.cc:136:13: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. o = getopt_long(argc, argv, OPTSTR, long_options, &opt_index); data/gerbera-1.1.0+dfsg/src/main.cc:263:19: [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. char *h = getenv("XDG_CONFIG_HOME"); data/gerbera-1.1.0+dfsg/src/main.cc:269:17: [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. h = getenv("HOME"); data/gerbera-1.1.0+dfsg/src/main.cc:280:18: [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. char* pref = getenv("MEDIATOMB_DATADIR"); data/gerbera-1.1.0+dfsg/src/main.cc:287:17: [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. char* mgc = getenv("MEDIATOMB_MAGIC_FILE"); data/gerbera-1.1.0+dfsg/src/tools.cc:219:19: [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. String PATH = getenv("PATH"); data/gerbera-1.1.0+dfsg/config/zpipe.c:41:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char in[CHUNK]; data/gerbera-1.1.0+dfsg/config/zpipe.c:42:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char out[CHUNK]; data/gerbera-1.1.0+dfsg/config/zpipe.c:97:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char in[CHUNK]; data/gerbera-1.1.0+dfsg/config/zpipe.c:98:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char out[CHUNK]; data/gerbera-1.1.0+dfsg/src/buffered_io_handler.cc:54:25: [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 BufferedIOHandler::open(IN enum UpnpOpenFileMode mode) data/gerbera-1.1.0+dfsg/src/buffered_io_handler.cc:57: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). underlyingHandler->open(mode); data/gerbera-1.1.0+dfsg/src/buffered_io_handler.cc:58:28: [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). IOHandlerBufferHelper::open(mode); data/gerbera-1.1.0+dfsg/src/buffered_io_handler.h:56: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). virtual void open(enum UpnpOpenFileMode mode); data/gerbera-1.1.0+dfsg/src/config_manager.cc:2113: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 uuid_str[37]; data/gerbera-1.1.0+dfsg/src/config_manager.cc:2154: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* file = fopen(filename.c_str(), "wb"); data/gerbera-1.1.0+dfsg/src/config_manager.cc:2286:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(path.c_str(), "w"); data/gerbera-1.1.0+dfsg/src/contrib/md5.c:52:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *const test[7] = { data/gerbera-1.1.0+dfsg/src/contrib/md5.c:203: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(xbuf, data, 64); data/gerbera-1.1.0+dfsg/src/contrib/md5.c:354: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(pms->buf + offset, p, copy); data/gerbera-1.1.0+dfsg/src/contrib/md5.c:368: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(pms->buf, p, left); data/gerbera-1.1.0+dfsg/src/curl_io_handler.cc:59: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). void CurlIOHandler::open(IN enum UpnpOpenFileMode mode) data/gerbera-1.1.0+dfsg/src/curl_io_handler.cc:70:28: [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). IOHandlerBufferHelper::open(mode); data/gerbera-1.1.0+dfsg/src/curl_io_handler.cc:251: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(ego->buffer + bLocal, ptr, write1); data/gerbera-1.1.0+dfsg/src/curl_io_handler.cc:253: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(ego->buffer, (char *)ptr + maxWrite, write2); data/gerbera-1.1.0+dfsg/src/curl_io_handler.h:49: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). virtual void open(enum UpnpOpenFileMode mode); data/gerbera-1.1.0+dfsg/src/fd_io_handler.cc:73: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). void FDIOHandler::open(IN enum UpnpOpenFileMode mode) data/gerbera-1.1.0+dfsg/src/fd_io_handler.cc:87: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). fd = ::open(filename.c_str(), O_RDONLY); data/gerbera-1.1.0+dfsg/src/fd_io_handler.cc:91: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). fd = ::open(filename.c_str(), O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR); data/gerbera-1.1.0+dfsg/src/fd_io_handler.h:62: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). virtual void open(IN enum UpnpOpenFileMode mode); data/gerbera-1.1.0+dfsg/src/file_io_handler.cc:55: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). void FileIOHandler::open(IN enum UpnpOpenFileMode mode) data/gerbera-1.1.0+dfsg/src/file_io_handler.cc:59: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). f = fopen(filename.c_str(), "rb"); data/gerbera-1.1.0+dfsg/src/file_io_handler.cc:63: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). f = fopen(filename.c_str(), "wb"); data/gerbera-1.1.0+dfsg/src/file_io_handler.h:52: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). virtual void open(IN enum UpnpOpenFileMode mode); data/gerbera-1.1.0+dfsg/src/file_request_handler.cc:314: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). Ref<IOHandler> FileRequestHandler::open(IN const char* filename, data/gerbera-1.1.0+dfsg/src/file_request_handler.cc:545: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). io_handler->open(mode); data/gerbera-1.1.0+dfsg/src/file_request_handler.cc:555: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). return tr_d->open(tp, path, RefCast(item, CdsObject), range); data/gerbera-1.1.0+dfsg/src/file_request_handler.cc:589:25: [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). io_handler->open(mode); data/gerbera-1.1.0+dfsg/src/file_request_handler.h:45: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). virtual zmm::Ref<IOHandler> open( data/gerbera-1.1.0+dfsg/src/io_handler.cc:54: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). void IOHandler::open(IN enum UpnpOpenFileMode mode) data/gerbera-1.1.0+dfsg/src/io_handler.h:47: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). virtual void open(enum UpnpOpenFileMode mode); data/gerbera-1.1.0+dfsg/src/io_handler_buffer_helper.cc:62: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). void IOHandlerBufferHelper::open(IN enum UpnpOpenFileMode mode) data/gerbera-1.1.0+dfsg/src/io_handler_buffer_helper.cc:119: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(buf, buffer + a, read1); data/gerbera-1.1.0+dfsg/src/io_handler_buffer_helper.cc:121: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(buf + read1, buffer, read2); data/gerbera-1.1.0+dfsg/src/io_handler_buffer_helper.h:60: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). virtual void open(enum UpnpOpenFileMode mode); data/gerbera-1.1.0+dfsg/src/io_handler_chainer.cc:47: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). readFrom->open(UPNP_READ); data/gerbera-1.1.0+dfsg/src/io_handler_chainer.cc:61: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). writeTo->open(UPNP_WRITE); data/gerbera-1.1.0+dfsg/src/lastfm_scrobbler.cc:114:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). info->track_nr = atoi(trackNr.c_str()); data/gerbera-1.1.0+dfsg/src/logger.cc:54:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). LOG_FILE = fopen(filename, "a"); data/gerbera-1.1.0+dfsg/src/mem_io_handler.cc:55: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(this->buffer, buffer, length); data/gerbera-1.1.0+dfsg/src/mem_io_handler.cc:61: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(this->buffer, str.c_str(), length); data/gerbera-1.1.0+dfsg/src/mem_io_handler.cc:69:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void MemIOHandler::open(IN enum UpnpOpenFileMode mode) data/gerbera-1.1.0+dfsg/src/mem_io_handler.cc:88: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(buf, buffer + pos, length); data/gerbera-1.1.0+dfsg/src/mem_io_handler.h:57: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). virtual void open(IN enum UpnpOpenFileMode mode); data/gerbera-1.1.0+dfsg/src/metadata/exiv2_handler.cc:53:56: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(std::string(item->getLocation().c_str())); data/gerbera-1.1.0+dfsg/src/metadata/ffmpeg_handler.cc:134: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 duration[15]; data/gerbera-1.1.0+dfsg/src/metadata/ffmpeg_handler.cc:170:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fourcc[5]; data/gerbera-1.1.0+dfsg/src/metadata/ffmpeg_handler.cc:346:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fp = fopen(path.c_str(), "rb"); data/gerbera-1.1.0+dfsg/src/metadata/ffmpeg_handler.cc:356: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(*ptr_img + *size_img, buffer, bytesRead); data/gerbera-1.1.0+dfsg/src/metadata/ffmpeg_handler.cc:366:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fp = fopen(path.c_str(), "wb"); data/gerbera-1.1.0+dfsg/src/metadata/libexif_handler.cc:261: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 exif_entry_buffer[BUFLEN]; data/gerbera-1.1.0+dfsg/src/metadata/libexif_handler.cc:398: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). io_h->open(UPNP_READ); data/gerbera-1.1.0+dfsg/src/mt_inotify.cc:137:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&event[0], ret, bytes); data/gerbera-1.1.0+dfsg/src/process.cc:62: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). fd = open(input_file.c_str(), O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); data/gerbera-1.1.0+dfsg/src/process.cc:83: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). fd = open(output_file.c_str(), O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); data/gerbera-1.1.0+dfsg/src/process.cc:105: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). file = fopen(output_file.c_str(), "r"); data/gerbera-1.1.0+dfsg/src/process.cc:116:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUF_SIZE]; data/gerbera-1.1.0+dfsg/src/process_executor.cc:42:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *argv[MAX_ARGS]; data/gerbera-1.1.0+dfsg/src/process_io_handler.cc:163: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). void ProcessIOHandler::open(IN enum UpnpOpenFileMode mode) data/gerbera-1.1.0+dfsg/src/process_io_handler.cc:172: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). fd = ::open(filename.c_str(), O_RDONLY | O_NONBLOCK); data/gerbera-1.1.0+dfsg/src/process_io_handler.cc:174: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). fd = ::open(filename.c_str(), O_WRONLY | O_NONBLOCK); data/gerbera-1.1.0+dfsg/src/process_io_handler.h:67: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). virtual void open(IN enum UpnpOpenFileMode mode); data/gerbera-1.1.0+dfsg/src/request_handler.h:44: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). virtual zmm::Ref<IOHandler> open(IN const char *filename, data/gerbera-1.1.0+dfsg/src/scripting/playlist_parser_script.cc:166:21: [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). currentHandle = fopen(obj->getLocation().c_str(), "r"); data/gerbera-1.1.0+dfsg/src/serve_request_handler.cc:132:37: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). Ref<IOHandler> ServeRequestHandler::open(IN const char *filename, data/gerbera-1.1.0+dfsg/src/serve_request_handler.cc:224: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). io_handler->open(mode); data/gerbera-1.1.0+dfsg/src/serve_request_handler.h:44: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). virtual zmm::Ref<IOHandler> open(IN const char *filename, data/gerbera-1.1.0+dfsg/src/storage/mysql/mysql_storage.cc:191:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[MS_CREATE_SQL_INFLATED_SIZE + 1]; // + 1 for '\0' at the end of the string data/gerbera-1.1.0+dfsg/src/storage/sqlite3/sqlite3_storage.cc:431:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[SL3_CREATE_SQL_INFLATED_SIZE + 1]; // +1 for '\0' at the end of the string data/gerbera-1.1.0+dfsg/src/tools.cc:332: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 md5buf[16]; data/gerbera-1.1.0+dfsg/src/tools.cc:351: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 uuid_str[37]; data/gerbera-1.1.0+dfsg/src/tools.cc:486:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(path.c_str(), "r"); data/gerbera-1.1.0+dfsg/src/tools.cc:506:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(path.c_str(), "w"); data/gerbera-1.1.0+dfsg/src/tools.cc:529:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(from.c_str(), "r"); data/gerbera-1.1.0+dfsg/src/tools.cc:535:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *t = fopen(to.c_str(), "w"); data/gerbera-1.1.0+dfsg/src/tools.cc:690:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "%02d:%02d:%02d", h, m, s); data/gerbera-1.1.0+dfsg/src/tools.cc:763: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). fio_h->open(UPNP_READ); data/gerbera-1.1.0+dfsg/src/tools.cc:1171:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&local_address, &if_request.ifr_addr, sizeof(if_request.ifr_addr)); data/gerbera-1.1.0+dfsg/src/tools.cc:1194: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 host[NI_MAXHOST]; data/gerbera-1.1.0+dfsg/src/tools.cc:1349: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[7]; data/gerbera-1.1.0+dfsg/src/tools.cc:1350:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(ogg_filename.c_str(), "rb"); data/gerbera-1.1.0+dfsg/src/tools.cc:1477:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(avi_filename.c_str(), "rb"); data/gerbera-1.1.0+dfsg/src/tools.cc:1640: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(&server_addr.sin_addr.s_addr, server->h_addr, server->h_length); data/gerbera-1.1.0+dfsg/src/transcoding/transcode_dispatcher.cc:47:37: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). Ref<IOHandler> TranscodeDispatcher::open(Ref<TranscodingProfile> profile, data/gerbera-1.1.0+dfsg/src/transcoding/transcode_dispatcher.cc:61: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). return tr_ext->open(profile, location, obj, range); data/gerbera-1.1.0+dfsg/src/transcoding/transcode_dispatcher.h:42: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). virtual zmm::Ref<IOHandler> open(zmm::Ref<TranscodingProfile> profile, data/gerbera-1.1.0+dfsg/src/transcoding/transcode_ext_handler.cc:71:42: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). Ref<IOHandler> TranscodeExternalHandler::open(Ref<TranscodingProfile> profile, data/gerbera-1.1.0+dfsg/src/transcoding/transcode_ext_handler.cc:166:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(fifo_template, "mt_transcode_XXXXXX"); data/gerbera-1.1.0+dfsg/src/transcoding/transcode_ext_handler.cc:250: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). io_handler->open(UPNP_READ); data/gerbera-1.1.0+dfsg/src/transcoding/transcode_ext_handler.h:45: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). virtual zmm::Ref<IOHandler> open(zmm::Ref<TranscodingProfile> profile, data/gerbera-1.1.0+dfsg/src/transcoding/transcode_handler.h:47: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). virtual zmm::Ref<IOHandler> open(zmm::Ref<TranscodingProfile> profile, data/gerbera-1.1.0+dfsg/src/url.cc:53: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 error_buffer[CURL_ERROR_SIZE] = {'\0'}; data/gerbera-1.1.0+dfsg/src/url.cc:140: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 error_buffer[CURL_ERROR_SIZE] = {'\0'}; data/gerbera-1.1.0+dfsg/src/url_request_handler.cc:171:35: [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). Ref<IOHandler> URLRequestHandler::open(IN const char *filename, data/gerbera-1.1.0+dfsg/src/url_request_handler.cc:251:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return tr_d->open(tp, url, RefCast(item, CdsObject), range); data/gerbera-1.1.0+dfsg/src/url_request_handler.cc:282: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). io_handler->open(mode); data/gerbera-1.1.0+dfsg/src/url_request_handler.h:44: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). virtual zmm::Ref<IOHandler> open(IN const char *filename, data/gerbera-1.1.0+dfsg/src/web_callbacks.cc:148:48: [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). Ref<IOHandler> ioHandler = reqHandler->open(link.c_str(), mode, nullptr); data/gerbera-1.1.0+dfsg/src/web_request_handler.cc:122:35: [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). Ref<IOHandler> WebRequestHandler::open(IN enum UpnpOpenFileMode mode) data/gerbera-1.1.0+dfsg/src/web_request_handler.cc:217: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). io_handler->open(mode); data/gerbera-1.1.0+dfsg/src/web_request_handler.cc:221:35: [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). Ref<IOHandler> WebRequestHandler::open(IN const char* filename, data/gerbera-1.1.0+dfsg/src/web_request_handler.cc:233:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return open(mode); data/gerbera-1.1.0+dfsg/src/web_request_handler.h:107:25: [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). zmm::Ref<IOHandler> open(IN enum UpnpOpenFileMode mode); data/gerbera-1.1.0+dfsg/src/web_request_handler.h:148: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). virtual zmm::Ref<IOHandler> open(IN const char *filename, data/gerbera-1.1.0+dfsg/src/youtube_content_handler.cc:172:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char datebuf[DATE_BUF_LEN]; data/gerbera-1.1.0+dfsg/src/youtube_video_url.cc:154:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffery[8192]; data/gerbera-1.1.0+dfsg/src/zmm/stringbuffer.cc:118:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(dest, "%d", x); data/gerbera-1.1.0+dfsg/src/zmm/stringbuffer.cc:127:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(dest, "%u", x); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:57: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(data, str, len); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:175: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 str[2]; data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:197:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. b->len = sprintf(b->data, "%d", x); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:203:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. b->len = sprintf(b->data, "%u", x); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:209:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. b->len = sprintf(b->data, "%ld", x); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:215:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. b->len = sprintf(b->data, "%ld", x); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:221:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. b->len = sprintf(b->data, "%lf", x); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:227:14: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. b->len = sprintf(b->data, "%lld", x); data/gerbera-1.1.0+dfsg/src/buffered_io_handler.cc:169:44: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). readBytes = underlyingHandler->read(buffer + b, chunkSize); data/gerbera-1.1.0+dfsg/src/config_manager.cc:2160: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). strlen(XML_HEADER), file); data/gerbera-1.1.0+dfsg/src/contrib/md5.c:70:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). md5_append(&state, (const md5_byte_t *)test[i], strlen(test[i])); data/gerbera-1.1.0+dfsg/src/fd_io_handler.cc:105:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int FDIOHandler::read(OUT char *buf, IN size_t length) data/gerbera-1.1.0+dfsg/src/fd_io_handler.cc:109:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = ::read(fd, buf, length); data/gerbera-1.1.0+dfsg/src/fd_io_handler.h:67:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual int read(OUT char *buf, IN size_t length); data/gerbera-1.1.0+dfsg/src/file_io_handler.cc:77:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int FileIOHandler::read(OUT char *buf, IN size_t length) data/gerbera-1.1.0+dfsg/src/file_io_handler.h:57:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual int read(OUT char *buf, IN size_t length); data/gerbera-1.1.0+dfsg/src/file_request_handler.cc:69:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). String parameters = (filename + strlen(LINK_FILE_REQUEST_HANDLER)); data/gerbera-1.1.0+dfsg/src/file_request_handler.cc:336: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). parameters = (filename + strlen(LINK_FILE_REQUEST_HANDLER)); data/gerbera-1.1.0+dfsg/src/io_handler.cc:71:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int IOHandler::read(OUT char *buf, IN size_t length) data/gerbera-1.1.0+dfsg/src/io_handler.h:52:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual int read(char *buf, size_t length); data/gerbera-1.1.0+dfsg/src/io_handler_buffer_helper.cc:80:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int IOHandlerBufferHelper::read(OUT char *buf, IN size_t length) data/gerbera-1.1.0+dfsg/src/io_handler_buffer_helper.h:61:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual int read(char *buf, size_t length); data/gerbera-1.1.0+dfsg/src/io_handler_chainer.cc:75:37: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int numRead = readFrom->read(buf, chunkSize); data/gerbera-1.1.0+dfsg/src/jpeg_resolution.cc:82:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int ret = ioh->read((char *)c, sizeof(char)); data/gerbera-1.1.0+dfsg/src/jpeg_resolution.cc:138:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). got = ioh->read((char *)(Data + 2), itemlen - 2); data/gerbera-1.1.0+dfsg/src/main.cc:232: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). if(strlen(GIT_BRANCH) > 0 || strlen(GIT_COMMIT_HASH) > 0) { data/gerbera-1.1.0+dfsg/src/main.cc:232:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(GIT_BRANCH) > 0 || strlen(GIT_COMMIT_HASH) > 0) { data/gerbera-1.1.0+dfsg/src/mem_io_handler.cc:74:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int MemIOHandler::read(OUT char *buf, IN size_t length) data/gerbera-1.1.0+dfsg/src/mem_io_handler.h:58:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual int read(OUT char *buf, IN size_t length); data/gerbera-1.1.0+dfsg/src/metadata/ffmpeg_handler.cc:309: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). slash += strlen(slash); data/gerbera-1.1.0+dfsg/src/mt_inotify.cc:175:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(stop_fd_read, &buf, 1) == -1) { data/gerbera-1.1.0+dfsg/src/mt_inotify.cc:192:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). this_bytes = read(inotify_fd, &event[0] + bytes, data/gerbera-1.1.0+dfsg/src/mxml/element.cc:253: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). static const char *ind = ind_str + strlen(ind_str); data/gerbera-1.1.0+dfsg/src/process_io_handler.cc:193:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int ProcessIOHandler::read(OUT char *buf, IN size_t length) data/gerbera-1.1.0+dfsg/src/process_io_handler.cc:262:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes_read = ::read(fd, p_buffer, length); data/gerbera-1.1.0+dfsg/src/process_io_handler.h:72:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual int read(OUT char *buf, IN size_t length); data/gerbera-1.1.0+dfsg/src/storage/mysql/mysql_storage.cc:363:61: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (mysql_real_query(&db, query, (length > 0 ? length : strlen(query)))) { data/gerbera-1.1.0+dfsg/src/storage/sqlite3/sqlite3_storage.cc:216:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). exec(query, strlen(query), false); data/gerbera-1.1.0+dfsg/src/tools.cc:849:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str, string.charPtrAt(last), cpLen); data/gerbera-1.1.0+dfsg/src/tools.cc:863: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). stringBase->len = strlen(stringBase->data); data/gerbera-1.1.0+dfsg/src/tools.cc:883:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str, string.charPtrAt(last), cpLen); data/gerbera-1.1.0+dfsg/src/tools.cc:891: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). stringBase->len = strlen(stringBase->data); data/gerbera-1.1.0+dfsg/src/tools.cc:981:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str, string.charPtrAt(last), cpLen); data/gerbera-1.1.0+dfsg/src/tools.cc:988: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). assert(stringBase->len == (int)strlen(stringBase->data)); data/gerbera-1.1.0+dfsg/src/tools.cc:1113:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str, path.charPtrAt(next), cpLen); data/gerbera-1.1.0+dfsg/src/tools.cc:1124: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). result->len = strlen(result->data); data/gerbera-1.1.0+dfsg/src/tools.cc:1161:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(if_request.ifr_name, iflist->if_name, IF_NAMESIZE); data/gerbera-1.1.0+dfsg/src/url_request_handler.cc:74: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). parameters = (filename + strlen(LINK_URL_REQUEST_HANDLER)); data/gerbera-1.1.0+dfsg/src/url_request_handler.cc:190: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). parameters = (filename + strlen(LINK_URL_REQUEST_HANDLER)); data/gerbera-1.1.0+dfsg/src/web_callbacks.cc:180:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return handler->read(buf, length); data/gerbera-1.1.0+dfsg/src/youtube_content_handler.cc:233: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). if (strlen(datebuf) > 0) data/gerbera-1.1.0+dfsg/src/youtube_video_url.cc:160:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(pipefd[0], buffery, sizeof(buffery)) != 0) data/gerbera-1.1.0+dfsg/src/zmm/stringbuffer.cc:85: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). auto otherLen = (int)strlen(str); data/gerbera-1.1.0+dfsg/src/zmm/stringbuffer.cc:119:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += (int)strlen(dest); data/gerbera-1.1.0+dfsg/src/zmm/stringbuffer.cc:128:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += (int)strlen(dest); data/gerbera-1.1.0+dfsg/src/zmm/stringbuffer.cc:151:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(data + len, str, length); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:48:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = (int)strlen(str); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:167: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). auto otherLen = (int)strlen(other); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:246:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). base->len = strlen(data); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:262:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). base->len = strlen(data); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:434:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(res.base->data, base->data + from, count); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:497:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pos2, pos3, (pos-pos3)+1); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:518:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pos2, pos3, (base->data)+(base->len)-pos3); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:551:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(res.base->data, base->data, pos); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:552:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(res.base->data + pos, replacement.base->data, replacement.base->len); data/gerbera-1.1.0+dfsg/src/zmm/strings.cc:553:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(res.base->data + pos + replacement.base->len, base->data + pos + needle.base->len, base->len - pos - needle.base->len); data/gerbera-1.1.0+dfsg/src/zmm/strings.h:194: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). base->len = strlen(base->data); ANALYSIS SUMMARY: Hits = 215 Lines analyzed = 47616 in approximately 1.19 seconds (39854 lines/second) Physical Source Lines of Code (SLOC) = 30052 Hits@level = [0] 47 [1] 59 [2] 120 [3] 7 [4] 26 [5] 3 Hits@level+ = [0+] 262 [1+] 215 [2+] 156 [3+] 36 [4+] 29 [5+] 3 Hits/KSLOC@level+ = [0+] 8.71822 [1+] 7.15427 [2+] 5.191 [3+] 1.19792 [4+] 0.964994 [5+] 0.099827 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.