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/quarry-0.2.0.dfsg.1/src/quarry.c Examining data/quarry-0.2.0.dfsg.1/src/gettext.h Examining data/quarry-0.2.0.dfsg.1/src/quarry.h Examining data/quarry-0.2.0.dfsg.1/src/quarry-main.h Examining data/quarry-0.2.0.dfsg.1/src/utils/parse-list.c Examining data/quarry-0.2.0.dfsg.1/src/utils/parse-list.h Examining data/quarry-0.2.0.dfsg.1/src/utils/buffered-writer.c Examining data/quarry-0.2.0.dfsg.1/src/utils/getopt.c Examining data/quarry-0.2.0.dfsg.1/src/utils/getopt1.c Examining data/quarry-0.2.0.dfsg.1/src/utils/memory-pool.c Examining data/quarry-0.2.0.dfsg.1/src/utils/object-cache.c Examining data/quarry-0.2.0.dfsg.1/src/utils/string-buffer.c Examining data/quarry-0.2.0.dfsg.1/src/utils/string-list.c Examining data/quarry-0.2.0.dfsg.1/src/utils/utils.c Examining data/quarry-0.2.0.dfsg.1/src/utils/getopt.h Examining data/quarry-0.2.0.dfsg.1/src/utils/utils.h Examining data/quarry-0.2.0.dfsg.1/src/board/amazons.c Examining data/quarry-0.2.0.dfsg.1/src/board/board.c Examining data/quarry-0.2.0.dfsg.1/src/board/go.c Examining data/quarry-0.2.0.dfsg.1/src/board/reversi.c Examining data/quarry-0.2.0.dfsg.1/src/board/amazons.h Examining data/quarry-0.2.0.dfsg.1/src/board/board.h Examining data/quarry-0.2.0.dfsg.1/src/board/board-topology.h Examining data/quarry-0.2.0.dfsg.1/src/board/board-internals.h Examining data/quarry-0.2.0.dfsg.1/src/board/game-info.h Examining data/quarry-0.2.0.dfsg.1/src/board/go.h Examining data/quarry-0.2.0.dfsg.1/src/board/reversi.h Examining data/quarry-0.2.0.dfsg.1/src/board/parse-game-list.c Examining data/quarry-0.2.0.dfsg.1/src/sgf/sgf-diff-utils.c Examining data/quarry-0.2.0.dfsg.1/src/sgf/sgf-parser.c Examining data/quarry-0.2.0.dfsg.1/src/sgf/sgf-tree.c Examining data/quarry-0.2.0.dfsg.1/src/sgf/sgf-tree-map.c Examining data/quarry-0.2.0.dfsg.1/src/sgf/sgf-undo.c Examining data/quarry-0.2.0.dfsg.1/src/sgf/sgf-utils.c Examining data/quarry-0.2.0.dfsg.1/src/sgf/sgf-writer.c Examining data/quarry-0.2.0.dfsg.1/src/sgf/sgf.h Examining data/quarry-0.2.0.dfsg.1/src/sgf/sgf-parser.h Examining data/quarry-0.2.0.dfsg.1/src/sgf/sgf-privates.h Examining data/quarry-0.2.0.dfsg.1/src/sgf/sgf-undo.h Examining data/quarry-0.2.0.dfsg.1/src/sgf/sgf-writer.h Examining data/quarry-0.2.0.dfsg.1/src/sgf/parse-sgf-list.c Examining data/quarry-0.2.0.dfsg.1/src/sgf/sgf-diff.c Examining data/quarry-0.2.0.dfsg.1/src/sgf/sgf-test.c Examining data/quarry-0.2.0.dfsg.1/src/gtp/gtp-client.c Examining data/quarry-0.2.0.dfsg.1/src/gtp/gtp-client.h Examining data/quarry-0.2.0.dfsg.1/src/gtp/gtp-test.c Examining data/quarry-0.2.0.dfsg.1/src/gui-utils/configuration.c Examining data/quarry-0.2.0.dfsg.1/src/gui-utils/gui-utils.c Examining data/quarry-0.2.0.dfsg.1/src/gui-utils/tile-renderer.c Examining data/quarry-0.2.0.dfsg.1/src/gui-utils/time-control.c Examining data/quarry-0.2.0.dfsg.1/src/gui-utils/configuration.h Examining data/quarry-0.2.0.dfsg.1/src/gui-utils/gui-utils.h Examining data/quarry-0.2.0.dfsg.1/src/gui-utils/tile-renderer.h Examining data/quarry-0.2.0.dfsg.1/src/gui-utils/time-control.h Examining data/quarry-0.2.0.dfsg.1/src/gui-utils/parse-configuration.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-add-or-edit-label-dialog.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-clock.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-color-button.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-control-center.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-file-dialog.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-file-selector.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-freezable-spin-button.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-game-info-dialog.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-games.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban-base.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban-window.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-go-to-named-node-dialog.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-gtp-client-interface.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-help.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-named-vbox.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-new-game-dialog.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-new-game-record-dialog.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-parser-interface.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-preferences.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-progress-dialog.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-qbox.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-qhbox.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-qvbox.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-resume-game-dialog.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-sgf-tree-signal-proxy.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-sgf-tree-view.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-tile-set.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-utils.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gui-back-end.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-assistant.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-find-dialog.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-history-text-buffer.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-message-dialog.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-move-number-dialog.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-save-confirmation-dialog.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-stock.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-text-buffer.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-text-view.c Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-add-or-edit-label-dialog.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-clock.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-color-button.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-control-center.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-file-dialog.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-file-selector.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-freezable-spin-button.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-game-info-dialog.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-games.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban-base.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban-window.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-go-to-named-node-dialog.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-gtp-client-interface.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-help.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-named-vbox.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-new-game-dialog.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-new-game-record-dialog.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-parser-interface.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-preferences.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-progress-dialog.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-qbox.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-qhbox.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-qvbox.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-resume-game-dialog.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-sgf-tree-signal-proxy.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-sgf-tree-view.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-thread-interface.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-tile-set.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-utils.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/gui-back-end.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-assistant.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-find-dialog.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-history-text-buffer.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-message-dialog.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-move-number-dialog.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-save-confirmation-dialog.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-stock.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-text-buffer.h Examining data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-text-view.h FINAL RESULTS: data/quarry-0.2.0.dfsg.1/src/board/go.c:961:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, board->height > 9 ? "%3d\n" : "%2d\n", board->height - y); data/quarry-0.2.0.dfsg.1/src/quarry.c:131:4: [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 (usage_string, full_program_name); data/quarry-0.2.0.dfsg.1/src/utils/buffered-writer.c:351:26: [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. characters_written = vsnprintf (writer->buffer_pointer, data/quarry-0.2.0.dfsg.1/src/utils/memory-pool.c:112:3: [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, ("Memory pool number %d initialized:\n" data/quarry-0.2.0.dfsg.1/src/utils/memory-pool.c:389:3: [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, ("Memory pool %d flushed; detailed information:\n" data/quarry-0.2.0.dfsg.1/src/utils/parse-list.c:165:7: [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 (help_string); data/quarry-0.2.0.dfsg.1/src/utils/parse-list.c:176:6: [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, data/quarry-0.2.0.dfsg.1/src/utils/parse-list.c:255:6: [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 (h_file, preamble, short_program_name, list_file_name); data/quarry-0.2.0.dfsg.1/src/utils/parse-list.c:256:6: [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 (c_file, preamble, short_program_name, list_file_name); data/quarry-0.2.0.dfsg.1/src/utils/parse-list.c:821:3: [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 (stderr, format_string, arguments); data/quarry-0.2.0.dfsg.1/src/utils/string-buffer.c:248: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. length = vsnprintf (string_buffer->string + string_buffer->length, data/quarry-0.2.0.dfsg.1/src/utils/utils.c:94:3: [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: fatal error: out of memory " data/quarry-0.2.0.dfsg.1/src/utils/utils.c:140:3: [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: fatal error: out of memory " data/quarry-0.2.0.dfsg.1/src/utils/utils.c:168:3: [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, ("Numbers of calls:\n utils_malloc(): %10u\n" data/quarry-0.2.0.dfsg.1/src/utils/utils.c:177:3: [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, ("Total %u bytes allocated\n" data/quarry-0.2.0.dfsg.1/src/utils/utils.c:482:12: [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. length = vsnprintf (buffer, sizeof buffer, format_string, arguments_copy); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:497:23: [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. required_length = vsnprintf (string + head_length, length, format_string, data/quarry-0.2.0.dfsg.1/src/gtp/gtp-test.c:171:11: [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. = 1 + random () % (((bytes_read - processed_length) * 3) data/quarry-0.2.0.dfsg.1/src/gui-gtk/gui-back-end.c:262:10: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. g_get_home_dir (), ".quarry", NULL); data/quarry-0.2.0.dfsg.1/src/quarry.c:118:24: [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. while ((option = getopt_long (argc, argv, "", quarry_options, NULL)) data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:224: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. #ifndef getenv data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:225: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. extern char *getenv (); data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:410: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. posixly_correct = getenv ("POSIXLY_CORRECT"); data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:1200:1: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt (argc, argv, optstring) data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:1230:11: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt (argc, argv, "abc:d:0123456789"); data/quarry-0.2.0.dfsg.1/src/utils/getopt.h:150:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (int ___argc, char *const *___argv, const char *__shortopts); data/quarry-0.2.0.dfsg.1/src/utils/getopt.h:152:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (); data/quarry-0.2.0.dfsg.1/src/utils/getopt.h:156:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long (int ___argc, char *const *___argv, data/quarry-0.2.0.dfsg.1/src/utils/getopt.h:170:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (); data/quarry-0.2.0.dfsg.1/src/utils/getopt.h:172:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long (); data/quarry-0.2.0.dfsg.1/src/utils/getopt1.c:77:1: [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. getopt_long (argc, argv, options, long_options, opt_index) data/quarry-0.2.0.dfsg.1/src/utils/getopt1.c:104:18: [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. libc_hidden_def (getopt_long) data/quarry-0.2.0.dfsg.1/src/utils/getopt1.c:137:11: [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. c = getopt_long (argc, argv, "abc:d:0123456789", data/quarry-0.2.0.dfsg.1/src/utils/parse-list.c:160:20: [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. while ((option = getopt_long (argc, argv, "D:", parse_list_options, NULL)) data/quarry-0.2.0.dfsg.1/src/board/amazons.c:31:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 grid[BOARD_FULL_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/board/amazons.c:188:34: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. amazon_has_any_legal_move (const char grid[BOARD_FULL_GRID_SIZE], int pos) data/quarry-0.2.0.dfsg.1/src/board/amazons.c:286:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char contents[5] = {'.', '@', 'O', '=', '?'}; data/quarry-0.2.0.dfsg.1/src/board/board-internals.h:79: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 grid_copy[BOARD_GRID_SIZE]; data/quarry-0.2.0.dfsg.1/src/board/board.c:135: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 (&board_copy->data.go, &board->data.go, sizeof (GoBoardData)); data/quarry-0.2.0.dfsg.1/src/board/board.c:315: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 (((BoardStackEntry *) board->move_stack_pointer).grid_copy, data/quarry-0.2.0.dfsg.1/src/board/board.c:347: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 (((BoardStackEntry *) board->move_stack_pointer).grid_copy, data/quarry-0.2.0.dfsg.1/src/board/board.c:400: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 (((BoardStackEntry *) board->move_stack_pointer).grid_copy, data/quarry-0.2.0.dfsg.1/src/board/board.c:585: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 (list->positions, positions, num_positions * sizeof (int)); data/quarry-0.2.0.dfsg.1/src/board/board.c:655: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 (dest->positions + k, list1->positions + i, data/quarry-0.2.0.dfsg.1/src/board/board.c:660: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 (dest->positions + k, list2->positions + j, data/quarry-0.2.0.dfsg.1/src/board/board.c:788: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 grid[BOARD_GRID_SIZE], char value) data/quarry-0.2.0.dfsg.1/src/board/board.c:991: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 present_positions[BOARD_GRID_SIZE]; data/quarry-0.2.0.dfsg.1/src/board/board.c:1099:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. grid_fill (char grid[BOARD_GRID_SIZE], int width, int height, char value) data/quarry-0.2.0.dfsg.1/src/board/board.c:1131: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 ((destination) + pos, (source) + pos, \ data/quarry-0.2.0.dfsg.1/src/board/board.c:1138:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. grid_copy (char destination[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/board/board.c:1139: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 source[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/board/board.c:1165: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. grid_diff (const char grid1[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/board/board.c:1166: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 grid2[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/board/board.h: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 grid[BOARD_FULL_GRID_SIZE]; data/quarry-0.2.0.dfsg.1/src/board/board.h:268: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 grid[BOARD_GRID_SIZE], char value); data/quarry-0.2.0.dfsg.1/src/board/board.h:307: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. void grid_fill (char grid[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/board/board.h:314: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. void grid_copy (char destination[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/board/board.h:315:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char source[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/board/board.h:347:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (const char grid1[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/board/board.h:348:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char grid2[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/board/go.c:945:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char contents[NUM_VALID_BOARD_VALUES] data/quarry-0.2.0.dfsg.1/src/board/go.c:1275: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 territory[BOARD_GRID_SIZE]; data/quarry-0.2.0.dfsg.1/src/board/go.c:1412: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 territory[BOARD_GRID_SIZE]; data/quarry-0.2.0.dfsg.1/src/board/go.c:1413: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 false_eyes[BOARD_GRID_SIZE]; data/quarry-0.2.0.dfsg.1/src/board/go.h:50: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 status[4]; data/quarry-0.2.0.dfsg.1/src/board/reversi.c:34:41: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 inline int is_legal_move (const char grid[BOARD_FULL_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/board/reversi.c:119:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. is_legal_move (const char grid[BOARD_FULL_GRID_SIZE], BoardRuleSet rule_set, data/quarry-0.2.0.dfsg.1/src/board/reversi.h:50: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 flips[8]; data/quarry-0.2.0.dfsg.1/src/gtp/gtp-test.c:165: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. char buffer[0x1000]; data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-games.c:266:9: [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 (gtk_button_get_label (size_button))); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban-window.c:2592: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 goban_markup[BOARD_GRID_SIZE]; data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban-window.c:2883: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 (&goban_window->game_position_board_state_holder, data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban-window.c:3865: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 goban_markup[BOARD_GRID_SIZE]; data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban-window.c:4603: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 (new_text_pointer, text, paragraph_delimiter_index); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban-window.h:129: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 sgf_markup[BOARD_GRID_SIZE]; data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban.c:665: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[4]; data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban.c:667: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, "%d", data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban.c:1394: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 grid[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban.c:1395: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 goban_markup[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban.c:1396: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 sgf_markup[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban.h:238: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 grid[BOARD_GRID_SIZE]; data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban.h:239: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 goban_markup[BOARD_GRID_SIZE]; data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban.h:240: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 sgf_markup[BOARD_GRID_SIZE]; data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban.h:244: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 *overlay_contents[NUM_OVERLAYS]; data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban.h:316:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char grid[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban.h:317:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char goban_markup[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban.h:318:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char sgf_markup[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-gtp-client-interface.c:154: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). data->log_file = fopen (log_file_name, "wb"); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-help.c:63: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 (locale_directory, current_locale, data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-new-game-dialog.c:172: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 *radio_labels[NUM_COLORS][2] data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-new-game-dialog.c:811: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. const char *human_names[NUM_COLORS]; data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-new-game-dialog.c:812: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. const char *engine_screen_names[NUM_COLORS]; data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-resume-game-dialog.c:239:3: [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, "%d", sgf_tree->board_width); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-resume-game-dialog.c:306: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 *radio_labels[NUM_COLORS][2] data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-tile-set.c:355: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, "rb"); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-tile-set.c:461: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 color_string[8]; data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-tile-set.c:465:3: [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 (color_string, "#%02x%02x%02x", color.red, color.green, color.blue); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-utils.c:716: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[32]; data/quarry-0.2.0.dfsg.1/src/gui-utils/configuration.c:98: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 *file = fopen (filename, "r"); data/quarry-0.2.0.dfsg.1/src/gui-utils/configuration.c:491:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *result = atoi (integer_string); data/quarry-0.2.0.dfsg.1/src/gui-utils/gui-utils.c:123:36: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. gui_utils_mark_variations_on_grid (char grid[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/gui-utils/gui-utils.h:36:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (char grid[BOARD_GRID_SIZE], const Board *board, data/quarry-0.2.0.dfsg.1/src/gui-utils/parse-configuration.c:622:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[64]; data/quarry-0.2.0.dfsg.1/src/gui-utils/tile-renderer.c:511: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 (scan, second_pixel_data, 4 * left_sub_line_size); data/quarry-0.2.0.dfsg.1/src/gui-utils/tile-renderer.c:512: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 (scan + left_sub_line_size, first_pixel_data + left_sub_line_size, data/quarry-0.2.0.dfsg.1/src/quarry.h:65: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 (&(dest), &(src), sizeof (va_list)) data/quarry-0.2.0.dfsg.1/src/sgf/parse-sgf-list.c:89: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 *identifiers[1 + ('Z' - 'A')]; data/quarry-0.2.0.dfsg.1/src/sgf/sgf-diff-utils.c:862: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 buffer[64]; data/quarry-0.2.0.dfsg.1/src/sgf/sgf-parser.c:169:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char match_grid[BOARD_GRID_SIZE]); data/quarry-0.2.0.dfsg.1/src/sgf/sgf-parser.c:242: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, "rb"); data/quarry-0.2.0.dfsg.1/src/sgf/sgf-parser.c:861: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 (data->buffer + 1, data->buffer_pointer, unused_bytes); data/quarry-0.2.0.dfsg.1/src/sgf/sgf-parser.c:1608: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 local_buffer[0x1000]; data/quarry-0.2.0.dfsg.1/src/sgf/sgf-parser.c:1996:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char match_grid[BOARD_GRID_SIZE]) data/quarry-0.2.0.dfsg.1/src/sgf/sgf-parser.c:2205: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 *labels[BOARD_GRID_SIZE]; data/quarry-0.2.0.dfsg.1/src/sgf/sgf-parser.c:2692:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 *non_score_results[6] data/quarry-0.2.0.dfsg.1/src/sgf/sgf-parser.c:2708: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 *no_winner_results[4] = { "0", "?", "Draw", "Void" }; data/quarry-0.2.0.dfsg.1/src/sgf/sgf-parser.h:64: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. const char *stored_buffer_pointers[3]; data/quarry-0.2.0.dfsg.1/src/sgf/sgf-parser.h:83: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 times_error_reported[SGF_NUM_ERRORS]; data/quarry-0.2.0.dfsg.1/src/sgf/sgf-parser.h:121: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 has_setup_add_properties[NUM_ON_GRID_VALUES]; data/quarry-0.2.0.dfsg.1/src/sgf/sgf-parser.h:127: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 has_markup_properties[NUM_SGF_MARKUPS]; data/quarry-0.2.0.dfsg.1/src/sgf/sgf-parser.h:133: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 has_territory_properties[NUM_COLORS]; data/quarry-0.2.0.dfsg.1/src/sgf/sgf-privates.h:61: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 name[4]; data/quarry-0.2.0.dfsg.1/src/sgf/sgf-tree-map.c:252: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 (copy_pointer, original_pointer, data/quarry-0.2.0.dfsg.1/src/sgf/sgf-tree-map.c:563: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 (y_level, tree->last_valid_data_point->y_level, data/quarry-0.2.0.dfsg.1/src/sgf/sgf-tree-map.c:1004: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 (y_level, intermediate_data->y_level, data/quarry-0.2.0.dfsg.1/src/sgf/sgf-tree-map.c:1242: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 (y_level, intermediate_data->y_level, data/quarry-0.2.0.dfsg.1/src/sgf/sgf-tree.c:845: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 handicap = atoi (text); data/quarry-0.2.0.dfsg.1/src/sgf/sgf-tree.c:848: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 buffer[32]; data/quarry-0.2.0.dfsg.1/src/sgf/sgf-tree.c:1511: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 (list_copy->vectors, list->vectors, data/quarry-0.2.0.dfsg.1/src/sgf/sgf-utils.c:411: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. const char grid[BOARD_GRID_SIZE], int side_effect) data/quarry-0.2.0.dfsg.1/src/sgf/sgf-utils.c:502: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 markup_grid[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/sgf/sgf-utils.c:1052:48: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. sgf_utils_get_markup (const SgfGameTree *tree, char markup[BOARD_GRID_SIZE]) data/quarry-0.2.0.dfsg.1/src/sgf/sgf-utils.c:1102: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 grid[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/sgf/sgf.h:851: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. const char grid[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/sgf/sgf.h:854:29: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (SgfGameTree *tree, const char markup_grid[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/sgf/sgf.h:931: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 markup[BOARD_GRID_SIZE]); data/quarry-0.2.0.dfsg.1/src/sgf/sgf.h:933: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 grid[BOARD_GRID_SIZE], data/quarry-0.2.0.dfsg.1/src/utils/buffered-writer.c:65:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). writer->file = fopen (filename, "wb"); data/quarry-0.2.0.dfsg.1/src/utils/buffered-writer.c:161:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result_scan, (char *) (chunk + 1), chunk->chunk_size); data/quarry-0.2.0.dfsg.1/src/utils/buffered-writer.c:279: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 (writer->buffer_pointer, buffer, chunk_size); data/quarry-0.2.0.dfsg.1/src/utils/parse-list.c:329: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 *file = fopen (filename, for_writing ? "w" : "r"); data/quarry-0.2.0.dfsg.1/src/utils/parse-list.c:924:26: [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 *new_list_file = fopen (beginning, "r"); data/quarry-0.2.0.dfsg.1/src/utils/string-buffer.c: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 (string_buffer->string + string_buffer->length, string, length + 1); data/quarry-0.2.0.dfsg.1/src/utils/string-buffer.c:164: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 (string_buffer->string + string_buffer->length, to_cat, length); data/quarry-0.2.0.dfsg.1/src/utils/string-buffer.c:183: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 (string_buffer->string + string_buffer->length, buffer, length); data/quarry-0.2.0.dfsg.1/src/utils/string-buffer.c:214: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 (string_buffer->string + string_buffer->length, buffer, length); data/quarry-0.2.0.dfsg.1/src/utils/string-list.c:668: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 (scan, item->text, item_text_length); data/quarry-0.2.0.dfsg.1/src/utils/string-list.c:672: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 (scan, separator, separator_length); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:210: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 (new_string, string, length + 1); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:224: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 (buffer_copy, buffer, length); data/quarry-0.2.0.dfsg.1/src/utils/utils.c: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 (string, buffer, length); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:257: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 (new_string + current_length, to_cat, to_cat_length + 1); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:309: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 (new_string + current_length, to_cat, length); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:333: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 (new_string + current_length, buffer, length); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:372: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 (new_string + current_length, buffer, length); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:476: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[0x1000]; data/quarry-0.2.0.dfsg.1/src/utils/utils.c:902: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 (buffer, string, length); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:906: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 (buffer, string, buffer_end - buffer); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:1007: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[0x1000]; data/quarry-0.2.0.dfsg.1/src/board/parse-game-list.c:162: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). if (strlen (horizontal_coordinates) > BOARD_MAX_WIDTH) { data/quarry-0.2.0.dfsg.1/src/board/parse-game-list.c:164:4: [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 (horizontal_coordinates)); data/quarry-0.2.0.dfsg.1/src/gtp/gtp-client.c:290:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *end_of_stored_line = stored_line + strlen (stored_line); data/quarry-0.2.0.dfsg.1/src/gtp/gtp-test.c:41:40: [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). write (* (int *) user_data, command, strlen (command)); data/quarry-0.2.0.dfsg.1/src/gtp/gtp-test.c:162:6: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep (1); data/quarry-0.2.0.dfsg.1/src/gtp/gtp-test.c:166:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int bytes_read = read (engine_out, buffer, sizeof buffer); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-file-dialog.c:258:18: [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 (filename[strlen (filename) - 1] != G_DIR_SEPARATOR) { data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-file-selector.c:143:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (pattern = patterns; *pattern; pattern += strlen (pattern) + 1) { data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-file-selector.c:197: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). guint filename_length = strlen (filename); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban-window.c:1993:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int diagram_string_length = strlen (diagram_string); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-goban-window.c:3420: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). for (k = 0; k < strlen (labels); k++) { data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-help.c:47:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const char *current_locale_end = current_locale + strlen (current_locale); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-help.c:78:6: [1] (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 character. strcpy (locale_directory, "C"); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-help.c:81:4: [1] (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 character. strcpy (locale_directory, "C"); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-help.c:88:7: [1] (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 character. strcpy (locale_directory, "C"); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-tile-set.c:542: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). strlen (scale_string), NULL); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-tile-set.c:557: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). strlen (opacity_string), NULL); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-tile-set.c:603: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). strlen (scale_full_string), NULL); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-tile-set.c:613: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). strlen (opacity_full_string), NULL); data/quarry-0.2.0.dfsg.1/src/gui-gtk/gtk-utils.c:1114: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). gint length = strlen (text); data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-find-dialog.c:735: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). remaining_text_length = strlen (last_line); data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-find-dialog.c:750: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). + strlen (text_to_find_normalized)) data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-find-dialog.c:753: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). last_line_offset + strlen (text_to_find)); data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-find-dialog.c:776: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). gint needle_length = strlen (needle); data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-find-dialog.c:805: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). gint needle_length = strlen (needle); data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-find-dialog.c:946: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). gint length = strlen (normalized_text); data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-text-buffer.c:347:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen (text); data/quarry-0.2.0.dfsg.1/src/gui-gtk/quarry-text-buffer.c:728:10: [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 (previous_operation->text)); data/quarry-0.2.0.dfsg.1/src/gui-utils/configuration.c:213:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). + (strlen (actual_contents) - 1)); data/quarry-0.2.0.dfsg.1/src/gui-utils/configuration.c:227:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int value_string_length = strlen (value_string); data/quarry-0.2.0.dfsg.1/src/gui-utils/configuration.c:632: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). value_string += strlen (value_string) + 1; data/quarry-0.2.0.dfsg.1/src/gui-utils/parse-configuration.c:479: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). value_string + 1, strlen (value_string) - 2, data/quarry-0.2.0.dfsg.1/src/gui-utils/parse-configuration.c:560:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int structure_type_length = strlen (current_defaults_data->structure_type); data/quarry-0.2.0.dfsg.1/src/gui-utils/parse-configuration.c:626: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). full_field_subscription_length = 13 + strlen (full_field_name); data/quarry-0.2.0.dfsg.1/src/gui-utils/parse-configuration.c:1011:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int structure_type_length = strlen (current_defaults_data->structure_type); data/quarry-0.2.0.dfsg.1/src/gui-utils/parse-configuration.c:1062:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int list_type_length = strlen (current_defaults_data->structure_type); data/quarry-0.2.0.dfsg.1/src/gui-utils/parse-configuration.c:1064: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 (current_defaults_data->list_text_field_name); data/quarry-0.2.0.dfsg.1/src/gui-utils/parse-configuration.c:1066: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 (current_defaults_data->list_function_prefix); data/quarry-0.2.0.dfsg.1/src/gui-utils/parse-configuration.c:1068: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 (current_defaults_data->static_list_macro); data/quarry-0.2.0.dfsg.1/src/gui-utils/parse-configuration.c:1308: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). TABBING (5, 16 + strlen (structure_type)), data/quarry-0.2.0.dfsg.1/src/gui-utils/parse-configuration.c:1423: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). TABBING (4, 2 + strlen (field_type_string)), data/quarry-0.2.0.dfsg.1/src/gui-utils/parse-configuration.c:1550:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int function_name_length = (strlen (function_name) data/quarry-0.2.0.dfsg.1/src/gui-utils/parse-configuration.c:1551: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). + strlen (function_name_suffix)); data/quarry-0.2.0.dfsg.1/src/sgf/parse-sgf-list.c:242: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 (property_id) > 2) { data/quarry-0.2.0.dfsg.1/src/sgf/parse-sgf-list.c:244: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). if (strlen (property_id) > 3) data/quarry-0.2.0.dfsg.1/src/sgf/sgf-diff-utils.c:749: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). lines[num_lines++].length = strlen (text); data/quarry-0.2.0.dfsg.1/src/utils/buffered-writer.c:246: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). buffered_writer_cat_as_string (writer, string, strlen (string)); data/quarry-0.2.0.dfsg.1/src/utils/buffered-writer.c:259:52: [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). buffered_writer_cat_as_string (writer, string, strlen (string)); data/quarry-0.2.0.dfsg.1/src/utils/buffered-writer.c:346: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). >= strlen (format_string))) { data/quarry-0.2.0.dfsg.1/src/utils/buffered-writer.c:395: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). >= strlen (format_string))) { data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:247:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # if (!defined __STDC__ || !__STDC__) && !defined strlen data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:250:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). extern int strlen (const char *); data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:441: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 len = nonoption_flags_max_len = strlen (orig_str); data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:669: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). == (unsigned int) strlen (p->name)) data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:714: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). nextchar += strlen (nextchar); data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:780: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). nextchar += strlen (nextchar); data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:814: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). nextchar += strlen (nextchar); data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:819: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). nextchar += strlen (nextchar); data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:1006:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((unsigned int) (nameend - nextchar) == strlen (p->name)) data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:1046:18: [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). nextchar += strlen (nextchar); data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:1084: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). nextchar += strlen (nextchar); data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:1116: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). nextchar += strlen (nextchar); data/quarry-0.2.0.dfsg.1/src/utils/getopt.c:1120:18: [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). nextchar += strlen (nextchar); data/quarry-0.2.0.dfsg.1/src/utils/parse-list.c:253:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int h_file_name_length = strlen (h_file_name); data/quarry-0.2.0.dfsg.1/src/utils/parse-list.c:486: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). h_file_line_length = 2 + strlen (identifier); data/quarry-0.2.0.dfsg.1/src/utils/parse-list.c:491: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). h_file_line_length += 3 + strlen (last_identifier); data/quarry-0.2.0.dfsg.1/src/utils/parse-list.c:644: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). TABBING (4, 8 + strlen (condition->identifier)), data/quarry-0.2.0.dfsg.1/src/utils/parse-list.c:898: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). substitution_length = strlen (substitution); data/quarry-0.2.0.dfsg.1/src/utils/parse-list.c:1233: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). int length = strlen (what); data/quarry-0.2.0.dfsg.1/src/utils/string-buffer.c:117:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen (string); data/quarry-0.2.0.dfsg.1/src/utils/string-buffer.c:143:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen (to_cat); data/quarry-0.2.0.dfsg.1/src/utils/string-buffer.c:163: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). ? to_cat_lengths[k++] : (int) strlen (to_cat)); data/quarry-0.2.0.dfsg.1/src/utils/string-list.c:177:18: [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 length = strlen (buffer); data/quarry-0.2.0.dfsg.1/src/utils/string-list.c:656:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int separator_length = strlen (separator); data/quarry-0.2.0.dfsg.1/src/utils/string-list.c:661: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). result_length += strlen (item->text) + separator_length; data/quarry-0.2.0.dfsg.1/src/utils/string-list.c:666: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). int item_text_length = strlen (item->text); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:207:18: [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 length = strlen (string); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:252: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). int current_length = (string ? strlen (string) : 0); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:253: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). int to_cat_length = strlen (to_cat); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:274: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). int current_length = (string ? strlen (string) : 0); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:288:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen (to_cat); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:308: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). ? to_cat_lengths[k++] : (int) strlen (to_cat)); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:330: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). int current_length = (string ? strlen (string) : 0); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:350: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). int current_length = (string ? strlen (string) : 0); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:396:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen (argv0); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:488: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). head_length = (string ? strlen (string) : 0); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:884: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). int length = strlen (string); data/quarry-0.2.0.dfsg.1/src/utils/utils.c:1014: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). int chunk_length = strlen (buffer); ANALYSIS SUMMARY: Hits = 247 Lines analyzed = 64891 in approximately 1.19 seconds (54375 lines/second) Physical Source Lines of Code (SLOC) = 44098 Hits@level = [0] 102 [1] 88 [2] 125 [3] 17 [4] 17 [5] 0 Hits@level+ = [0+] 349 [1+] 247 [2+] 159 [3+] 34 [4+] 17 [5+] 0 Hits/KSLOC@level+ = [0+] 7.91419 [1+] 5.60116 [2+] 3.60561 [3+] 0.77101 [4+] 0.385505 [5+] 0 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.