idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
44,000
static void *threaded_find_deltas(void *arg) { struct thread_params *me = arg; while (me->remaining) { find_deltas(me->list, &me->remaining, me->window, me->depth, me->processed); progress_lock(); me->working = 0; pthread_cond_signal(&progress_cond); progress_unlock(); /* * We must not set ->...
Exec Code Overflow
0
static void *threaded_find_deltas(void *arg) { struct thread_params *me = arg; while (me->remaining) { find_deltas(me->list, &me->remaining, me->window, me->depth, me->processed); progress_lock(); me->working = 0; pthread_cond_signal(&progress_cond); progress_unlock(); /* * We must not set ->...
@@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data) index_commit_for_bitmap(commit); } -static void show_object(struct object *obj, - struct strbuf *path, const char *last, - void *data) +static void show_object(struct object *obj, const char *name, void *data) { - char *name =...
CWE-119
null
null
44,001
static int try_delta(struct unpacked *trg, struct unpacked *src, unsigned max_depth, unsigned long *mem_usage) { struct object_entry *trg_entry = trg->entry; struct object_entry *src_entry = src->entry; unsigned long trg_size, src_size, delta_size, sizediff, max_size, sz; unsigned ref_depth; enum object_typ...
Exec Code Overflow
0
static int try_delta(struct unpacked *trg, struct unpacked *src, unsigned max_depth, unsigned long *mem_usage) { struct object_entry *trg_entry = trg->entry; struct object_entry *src_entry = src->entry; unsigned long trg_size, src_size, delta_size, sizediff, max_size, sz; unsigned ref_depth; enum object_typ...
@@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data) index_commit_for_bitmap(commit); } -static void show_object(struct object *obj, - struct strbuf *path, const char *last, - void *data) +static void show_object(struct object *obj, const char *name, void *data) { - char *name =...
CWE-119
null
null
44,002
static int type_size_sort(const void *_a, const void *_b) { const struct object_entry *a = *(struct object_entry **)_a; const struct object_entry *b = *(struct object_entry **)_b; if (a->type > b->type) return -1; if (a->type < b->type) return 1; if (a->hash > b->hash) return -1; if (a->hash < b->hash) r...
Exec Code Overflow
0
static int type_size_sort(const void *_a, const void *_b) { const struct object_entry *a = *(struct object_entry **)_a; const struct object_entry *b = *(struct object_entry **)_b; if (a->type > b->type) return -1; if (a->type < b->type) return 1; if (a->hash > b->hash) return -1; if (a->hash < b->hash) r...
@@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data) index_commit_for_bitmap(commit); } -static void show_object(struct object *obj, - struct strbuf *path, const char *last, - void *data) +static void show_object(struct object *obj, const char *name, void *data) { - char *name =...
CWE-119
null
null
44,003
static int want_object_in_pack(const unsigned char *sha1, int exclude, struct packed_git **found_pack, off_t *found_offset) { struct packed_git *p; if (!exclude && local && has_loose_object_nonlocal(sha1)) return 0; *found_pack = NULL; *found_offset = 0; for (p = packed_git; p; p...
Exec Code Overflow
0
static int want_object_in_pack(const unsigned char *sha1, int exclude, struct packed_git **found_pack, off_t *found_offset) { struct packed_git *p; if (!exclude && local && has_loose_object_nonlocal(sha1)) return 0; *found_pack = NULL; *found_offset = 0; for (p = packed_git; p; p...
@@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data) index_commit_for_bitmap(commit); } -static void show_object(struct object *obj, - struct strbuf *path, const char *last, - void *data) +static void show_object(struct object *obj, const char *name, void *data) { - char *name =...
CWE-119
null
null
44,004
static unsigned long write_no_reuse_object(struct sha1file *f, struct object_entry *entry, unsigned long limit, int usable_delta) { unsigned long size, datalen; unsigned char header[10], dheader[10]; unsigned hdrlen; enum object_type type; void *buf; struct git_istream *st = NULL; if (!usable_delta) { ...
Exec Code Overflow
0
static unsigned long write_no_reuse_object(struct sha1file *f, struct object_entry *entry, unsigned long limit, int usable_delta) { unsigned long size, datalen; unsigned char header[10], dheader[10]; unsigned hdrlen; enum object_type type; void *buf; struct git_istream *st = NULL; if (!usable_delta) { ...
@@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data) index_commit_for_bitmap(commit); } -static void show_object(struct object *obj, - struct strbuf *path, const char *last, - void *data) +static void show_object(struct object *obj, const char *name, void *data) { - char *name =...
CWE-119
null
null
44,005
static unsigned long write_object(struct sha1file *f, struct object_entry *entry, off_t write_offset) { unsigned long limit, len; int usable_delta, to_reuse; if (!pack_to_stdout) crc32_begin(f); /* apply size limit if limited packsize and not first object */ if (!pack_size_limit || !nr_written) l...
Exec Code Overflow
0
static unsigned long write_object(struct sha1file *f, struct object_entry *entry, off_t write_offset) { unsigned long limit, len; int usable_delta, to_reuse; if (!pack_to_stdout) crc32_begin(f); /* apply size limit if limited packsize and not first object */ if (!pack_size_limit || !nr_written) l...
@@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data) index_commit_for_bitmap(commit); } -static void show_object(struct object *obj, - struct strbuf *path, const char *last, - void *data) +static void show_object(struct object *obj, const char *name, void *data) { - char *name =...
CWE-119
null
null
44,006
static enum write_one_status write_one(struct sha1file *f, struct object_entry *e, off_t *offset) { unsigned long size; int recursing; /* * we set offset to 1 (which is an impossible value) to mark * the fact that this object is involved in "write its base * first before writing a deltif...
Exec Code Overflow
0
static enum write_one_status write_one(struct sha1file *f, struct object_entry *e, off_t *offset) { unsigned long size; int recursing; /* * we set offset to 1 (which is an impossible value) to mark * the fact that this object is involved in "write its base * first before writing a deltif...
@@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data) index_commit_for_bitmap(commit); } -static void show_object(struct object *obj, - struct strbuf *path, const char *last, - void *data) +static void show_object(struct object *obj, const char *name, void *data) { - char *name =...
CWE-119
null
null
44,007
static void write_pack_file(void) { uint32_t i = 0, j; struct sha1file *f; off_t offset; uint32_t nr_remaining = nr_result; time_t last_mtime = 0; struct object_entry **write_order; if (progress > pack_to_stdout) progress_state = start_progress(_("Writing objects"), nr_result); written_list = xmalloc(to_pack...
Exec Code Overflow
0
static void write_pack_file(void) { uint32_t i = 0, j; struct sha1file *f; off_t offset; uint32_t nr_remaining = nr_result; time_t last_mtime = 0; struct object_entry **write_order; if (progress > pack_to_stdout) progress_state = start_progress(_("Writing objects"), nr_result); written_list = xmalloc(to_pack...
@@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data) index_commit_for_bitmap(commit); } -static void show_object(struct object *obj, - struct strbuf *path, const char *last, - void *data) +static void show_object(struct object *obj, const char *name, void *data) { - char *name =...
CWE-119
null
null
44,008
static off_t write_reused_pack(struct sha1file *f) { unsigned char buffer[8192]; off_t to_write, total; int fd; if (!is_pack_valid(reuse_packfile)) die("packfile is invalid: %s", reuse_packfile->pack_name); fd = git_open_noatime(reuse_packfile->pack_name); if (fd < 0) die_errno("unable to open packfile for ...
Exec Code Overflow
0
static off_t write_reused_pack(struct sha1file *f) { unsigned char buffer[8192]; off_t to_write, total; int fd; if (!is_pack_valid(reuse_packfile)) die("packfile is invalid: %s", reuse_packfile->pack_name); fd = git_open_noatime(reuse_packfile->pack_name); if (fd < 0) die_errno("unable to open packfile for ...
@@ -2284,21 +2284,11 @@ static void show_commit(struct commit *commit, void *data) index_commit_for_bitmap(commit); } -static void show_object(struct object *obj, - struct strbuf *path, const char *last, - void *data) +static void show_object(struct object *obj, const char *name, void *data) { - char *name =...
CWE-119
null
null
44,009
int cmd_rev_list(int argc, const char **argv, const char *prefix) { struct rev_info revs; struct rev_list_info info; int i; int bisect_list = 0; int bisect_show_vars = 0; int bisect_find_all = 0; int use_bitmap_index = 0; git_config(git_default_config, NULL); init_revisions(&revs, prefix); revs.abbrev = DEFA...
Exec Code Overflow
0
int cmd_rev_list(int argc, const char **argv, const char *prefix) { struct rev_info revs; struct rev_list_info info; int i; int bisect_list = 0; int bisect_show_vars = 0; int bisect_find_all = 0; int use_bitmap_index = 0; git_config(git_default_config, NULL); init_revisions(&revs, prefix); revs.abbrev = DEFA...
@@ -177,9 +177,7 @@ static void finish_commit(struct commit *commit, void *data) free_commit_buffer(commit); } -static void finish_object(struct object *obj, - struct strbuf *path, const char *name, - void *cb_data) +static void finish_object(struct object *obj, const char *name, void *cb_data) { struct...
CWE-119
null
null
44,010
static void finish_commit(struct commit *commit, void *data) { if (commit->parents) { free_commit_list(commit->parents); commit->parents = NULL; } free_commit_buffer(commit); }
Exec Code Overflow
0
static void finish_commit(struct commit *commit, void *data) { if (commit->parents) { free_commit_list(commit->parents); commit->parents = NULL; } free_commit_buffer(commit); }
@@ -177,9 +177,7 @@ static void finish_commit(struct commit *commit, void *data) free_commit_buffer(commit); } -static void finish_object(struct object *obj, - struct strbuf *path, const char *name, - void *cb_data) +static void finish_object(struct object *obj, const char *name, void *cb_data) { struct...
CWE-119
null
null
44,011
static void print_var_int(const char *var, int val) { printf("%s=%d\n", var, val); }
Exec Code Overflow
0
static void print_var_int(const char *var, int val) { printf("%s=%d\n", var, val); }
@@ -177,9 +177,7 @@ static void finish_commit(struct commit *commit, void *data) free_commit_buffer(commit); } -static void finish_object(struct object *obj, - struct strbuf *path, const char *name, - void *cb_data) +static void finish_object(struct object *obj, const char *name, void *cb_data) { struct...
CWE-119
null
null
44,012
static void print_var_str(const char *var, const char *val) { printf("%s='%s'\n", var, val); }
Exec Code Overflow
0
static void print_var_str(const char *var, const char *val) { printf("%s='%s'\n", var, val); }
@@ -177,9 +177,7 @@ static void finish_commit(struct commit *commit, void *data) free_commit_buffer(commit); } -static void finish_object(struct object *obj, - struct strbuf *path, const char *name, - void *cb_data) +static void finish_object(struct object *obj, const char *name, void *cb_data) { struct...
CWE-119
null
null
44,013
static int show_bisect_vars(struct rev_list_info *info, int reaches, int all) { int cnt, flags = info->flags; char hex[GIT_SHA1_HEXSZ + 1] = ""; struct commit_list *tried; struct rev_info *revs = info->revs; if (!revs->commits) return 1; revs->commits = filter_skipped(revs->commits, &tried, flags &...
Exec Code Overflow
0
static int show_bisect_vars(struct rev_list_info *info, int reaches, int all) { int cnt, flags = info->flags; char hex[GIT_SHA1_HEXSZ + 1] = ""; struct commit_list *tried; struct rev_info *revs = info->revs; if (!revs->commits) return 1; revs->commits = filter_skipped(revs->commits, &tried, flags &...
@@ -177,9 +177,7 @@ static void finish_commit(struct commit *commit, void *data) free_commit_buffer(commit); } -static void finish_object(struct object *obj, - struct strbuf *path, const char *name, - void *cb_data) +static void finish_object(struct object *obj, const char *name, void *cb_data) { struct...
CWE-119
null
null
44,014
static void show_commit(struct commit *commit, void *data) { struct rev_list_info *info = data; struct rev_info *revs = info->revs; if (info->flags & REV_LIST_QUIET) { finish_commit(commit, data); return; } graph_show_commit(revs->graph); if (revs->count) { if (commit->object.flags & PATCHSAME) revs->...
Exec Code Overflow
0
static void show_commit(struct commit *commit, void *data) { struct rev_list_info *info = data; struct rev_info *revs = info->revs; if (info->flags & REV_LIST_QUIET) { finish_commit(commit, data); return; } graph_show_commit(revs->graph); if (revs->count) { if (commit->object.flags & PATCHSAME) revs->...
@@ -177,9 +177,7 @@ static void finish_commit(struct commit *commit, void *data) free_commit_buffer(commit); } -static void finish_object(struct object *obj, - struct strbuf *path, const char *name, - void *cb_data) +static void finish_object(struct object *obj, const char *name, void *cb_data) { struct...
CWE-119
null
null
44,015
static void show_edge(struct commit *commit) { printf("-%s\n", oid_to_hex(&commit->object.oid)); }
Exec Code Overflow
0
static void show_edge(struct commit *commit) { printf("-%s\n", oid_to_hex(&commit->object.oid)); }
@@ -177,9 +177,7 @@ static void finish_commit(struct commit *commit, void *data) free_commit_buffer(commit); } -static void finish_object(struct object *obj, - struct strbuf *path, const char *name, - void *cb_data) +static void finish_object(struct object *obj, const char *name, void *cb_data) { struct...
CWE-119
null
null
44,016
static int show_object_fast( const unsigned char *sha1, enum object_type type, int exclude, uint32_t name_hash, struct packed_git *found_pack, off_t found_offset) { fprintf(stdout, "%s\n", sha1_to_hex(sha1)); return 1; }
Exec Code Overflow
0
static int show_object_fast( const unsigned char *sha1, enum object_type type, int exclude, uint32_t name_hash, struct packed_git *found_pack, off_t found_offset) { fprintf(stdout, "%s\n", sha1_to_hex(sha1)); return 1; }
@@ -177,9 +177,7 @@ static void finish_commit(struct commit *commit, void *data) free_commit_buffer(commit); } -static void finish_object(struct object *obj, - struct strbuf *path, const char *name, - void *cb_data) +static void finish_object(struct object *obj, const char *name, void *cb_data) { struct...
CWE-119
null
null
44,017
static void add_pending_tree(struct rev_info *revs, struct tree *tree) { add_pending_object(revs, &tree->object, ""); }
Exec Code Overflow
0
static void add_pending_tree(struct rev_info *revs, struct tree *tree) { add_pending_object(revs, &tree->object, ""); }
@@ -16,6 +16,7 @@ static void process_blob(struct rev_info *revs, void *cb_data) { struct object *obj = &blob->object; + size_t pathlen; if (!revs->blob_objects) return; @@ -24,7 +25,11 @@ static void process_blob(struct rev_info *revs, if (obj->flags & (UNINTERESTING | SEEN)) return; obj->flags |...
CWE-119
null
null
44,018
static void mark_edge_parents_uninteresting(struct commit *commit, struct rev_info *revs, show_edge_fn show_edge) { struct commit_list *parents; for (parents = commit->parents; parents; parents = parents->next) { struct commit *parent = parents->item; if (!(parent->object.flags & UNINTERESTING)...
Exec Code Overflow
0
static void mark_edge_parents_uninteresting(struct commit *commit, struct rev_info *revs, show_edge_fn show_edge) { struct commit_list *parents; for (parents = commit->parents; parents; parents = parents->next) { struct commit *parent = parents->item; if (!(parent->object.flags & UNINTERESTING)...
@@ -16,6 +16,7 @@ static void process_blob(struct rev_info *revs, void *cb_data) { struct object *obj = &blob->object; + size_t pathlen; if (!revs->blob_objects) return; @@ -24,7 +25,11 @@ static void process_blob(struct rev_info *revs, if (obj->flags & (UNINTERESTING | SEEN)) return; obj->flags |...
CWE-119
null
null
44,019
void mark_edges_uninteresting(struct rev_info *revs, show_edge_fn show_edge) { struct commit_list *list; int i; for (list = revs->commits; list; list = list->next) { struct commit *commit = list->item; if (commit->object.flags & UNINTERESTING) { mark_tree_uninteresting(commit->tree); if (revs->edge_hint_...
Exec Code Overflow
0
void mark_edges_uninteresting(struct rev_info *revs, show_edge_fn show_edge) { struct commit_list *list; int i; for (list = revs->commits; list; list = list->next) { struct commit *commit = list->item; if (commit->object.flags & UNINTERESTING) { mark_tree_uninteresting(commit->tree); if (revs->edge_hint_...
@@ -16,6 +16,7 @@ static void process_blob(struct rev_info *revs, void *cb_data) { struct object *obj = &blob->object; + size_t pathlen; if (!revs->blob_objects) return; @@ -24,7 +25,11 @@ static void process_blob(struct rev_info *revs, if (obj->flags & (UNINTERESTING | SEEN)) return; obj->flags |...
CWE-119
null
null
44,020
static void process_gitlink(struct rev_info *revs, const unsigned char *sha1, show_object_fn show, struct strbuf *path, const char *name, void *cb_data) { /* Nothing to do */ }
Exec Code Overflow
0
static void process_gitlink(struct rev_info *revs, const unsigned char *sha1, show_object_fn show, struct strbuf *path, const char *name, void *cb_data) { /* Nothing to do */ }
@@ -16,6 +16,7 @@ static void process_blob(struct rev_info *revs, void *cb_data) { struct object *obj = &blob->object; + size_t pathlen; if (!revs->blob_objects) return; @@ -24,7 +25,11 @@ static void process_blob(struct rev_info *revs, if (obj->flags & (UNINTERESTING | SEEN)) return; obj->flags |...
CWE-119
null
null
44,021
void bitmap_writer_build(struct packing_data *to_pack) { static const double REUSE_BITMAP_THRESHOLD = 0.2; int i, reuse_after, need_reset; struct bitmap *base = bitmap_new(); struct rev_info revs; writer.bitmaps = kh_init_sha1(); writer.to_pack = to_pack; if (writer.show_progress) writer.progress = start_pr...
Exec Code Overflow
0
void bitmap_writer_build(struct packing_data *to_pack) { static const double REUSE_BITMAP_THRESHOLD = 0.2; int i, reuse_after, need_reset; struct bitmap *base = bitmap_new(); struct rev_info revs; writer.bitmaps = kh_init_sha1(); writer.to_pack = to_pack; if (writer.show_progress) writer.progress = start_pr...
@@ -148,8 +148,7 @@ static uint32_t find_object_pos(const unsigned char *sha1) return entry->in_pack_pos; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base =...
CWE-119
null
null
44,022
void bitmap_writer_build_type_index(struct pack_idx_entry **index, uint32_t index_nr) { uint32_t i; writer.commits = ewah_new(); writer.trees = ewah_new(); writer.blobs = ewah_new(); writer.tags = ewah_new(); for (i = 0; i < index_nr; ++i) { struct object_entry *entry = (struct object_entry *)index[i]...
Exec Code Overflow
0
void bitmap_writer_build_type_index(struct pack_idx_entry **index, uint32_t index_nr) { uint32_t i; writer.commits = ewah_new(); writer.trees = ewah_new(); writer.blobs = ewah_new(); writer.tags = ewah_new(); for (i = 0; i < index_nr; ++i) { struct object_entry *entry = (struct object_entry *)index[i]...
@@ -148,8 +148,7 @@ static uint32_t find_object_pos(const unsigned char *sha1) return entry->in_pack_pos; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base =...
CWE-119
null
null
44,023
void bitmap_writer_finish(struct pack_idx_entry **index, uint32_t index_nr, const char *filename, uint16_t options) { static char tmp_file[PATH_MAX]; static uint16_t default_version = 1; static uint16_t flags = BITMAP_OPT_FULL_DAG; struct sha1file *f; struct bitmap_disk_header header; int fd = od...
Exec Code Overflow
0
void bitmap_writer_finish(struct pack_idx_entry **index, uint32_t index_nr, const char *filename, uint16_t options) { static char tmp_file[PATH_MAX]; static uint16_t default_version = 1; static uint16_t flags = BITMAP_OPT_FULL_DAG; struct sha1file *f; struct bitmap_disk_header header; int fd = od...
@@ -148,8 +148,7 @@ static uint32_t find_object_pos(const unsigned char *sha1) return entry->in_pack_pos; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base =...
CWE-119
null
null
44,024
void bitmap_writer_reuse_bitmaps(struct packing_data *to_pack) { if (prepare_bitmap_git() < 0) return; writer.reused = kh_init_sha1(); rebuild_existing_bitmaps(to_pack, writer.reused, writer.show_progress); }
Exec Code Overflow
0
void bitmap_writer_reuse_bitmaps(struct packing_data *to_pack) { if (prepare_bitmap_git() < 0) return; writer.reused = kh_init_sha1(); rebuild_existing_bitmaps(to_pack, writer.reused, writer.show_progress); }
@@ -148,8 +148,7 @@ static uint32_t find_object_pos(const unsigned char *sha1) return entry->in_pack_pos; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base =...
CWE-119
null
null
44,025
void bitmap_writer_select_commits(struct commit **indexed_commits, unsigned int indexed_commits_nr, int max_bitmaps) { unsigned int i = 0, j, next; qsort(indexed_commits, indexed_commits_nr, sizeof(indexed_commits[0]), date_compare); if (writer.show_progress) writer.progress = start_progress("...
Exec Code Overflow
0
void bitmap_writer_select_commits(struct commit **indexed_commits, unsigned int indexed_commits_nr, int max_bitmaps) { unsigned int i = 0, j, next; qsort(indexed_commits, indexed_commits_nr, sizeof(indexed_commits[0]), date_compare); if (writer.show_progress) writer.progress = start_progress("...
@@ -148,8 +148,7 @@ static uint32_t find_object_pos(const unsigned char *sha1) return entry->in_pack_pos; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base =...
CWE-119
null
null
44,026
void bitmap_writer_set_checksum(unsigned char *sha1) { hashcpy(writer.pack_checksum, sha1); }
Exec Code Overflow
0
void bitmap_writer_set_checksum(unsigned char *sha1) { hashcpy(writer.pack_checksum, sha1); }
@@ -148,8 +148,7 @@ static uint32_t find_object_pos(const unsigned char *sha1) return entry->in_pack_pos; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base =...
CWE-119
null
null
44,027
void bitmap_writer_show_progress(int show) { writer.show_progress = show; }
Exec Code Overflow
0
void bitmap_writer_show_progress(int show) { writer.show_progress = show; }
@@ -148,8 +148,7 @@ static uint32_t find_object_pos(const unsigned char *sha1) return entry->in_pack_pos; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base =...
CWE-119
null
null
44,028
static void compute_xor_offsets(void) { static const int MAX_XOR_OFFSET_SEARCH = 10; int i, next = 0; while (next < writer.selected_nr) { struct bitmapped_commit *stored = &writer.selected[next]; int best_offset = 0; struct ewah_bitmap *best_bitmap = stored->bitmap; struct ewah_bitmap *test_xor; for (i...
Exec Code Overflow
0
static void compute_xor_offsets(void) { static const int MAX_XOR_OFFSET_SEARCH = 10; int i, next = 0; while (next < writer.selected_nr) { struct bitmapped_commit *stored = &writer.selected[next]; int best_offset = 0; struct ewah_bitmap *best_bitmap = stored->bitmap; struct ewah_bitmap *test_xor; for (i...
@@ -148,8 +148,7 @@ static uint32_t find_object_pos(const unsigned char *sha1) return entry->in_pack_pos; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base =...
CWE-119
null
null
44,029
static int date_compare(const void *_a, const void *_b) { struct commit *a = *(struct commit **)_a; struct commit *b = *(struct commit **)_b; return (long)b->date - (long)a->date; }
Exec Code Overflow
0
static int date_compare(const void *_a, const void *_b) { struct commit *a = *(struct commit **)_a; struct commit *b = *(struct commit **)_b; return (long)b->date - (long)a->date; }
@@ -148,8 +148,7 @@ static uint32_t find_object_pos(const unsigned char *sha1) return entry->in_pack_pos; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base =...
CWE-119
null
null
44,030
static uint32_t find_object_pos(const unsigned char *sha1) { struct object_entry *entry = packlist_find(writer.to_pack, sha1, NULL); if (!entry) { die("Failed to write bitmap index. Packfile doesn't have full closure " "(object %s is missing)", sha1_to_hex(sha1)); } return entry->in_pack_pos; }
Exec Code Overflow
0
static uint32_t find_object_pos(const unsigned char *sha1) { struct object_entry *entry = packlist_find(writer.to_pack, sha1, NULL); if (!entry) { die("Failed to write bitmap index. Packfile doesn't have full closure " "(object %s is missing)", sha1_to_hex(sha1)); } return entry->in_pack_pos; }
@@ -148,8 +148,7 @@ static uint32_t find_object_pos(const unsigned char *sha1) return entry->in_pack_pos; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base =...
CWE-119
null
null
44,031
static struct ewah_bitmap *find_reused_bitmap(const unsigned char *sha1) { khiter_t hash_pos; if (!writer.reused) return NULL; hash_pos = kh_get_sha1(writer.reused, sha1); if (hash_pos >= kh_end(writer.reused)) return NULL; return kh_value(writer.reused, hash_pos); }
Exec Code Overflow
0
static struct ewah_bitmap *find_reused_bitmap(const unsigned char *sha1) { khiter_t hash_pos; if (!writer.reused) return NULL; hash_pos = kh_get_sha1(writer.reused, sha1); if (hash_pos >= kh_end(writer.reused)) return NULL; return kh_value(writer.reused, hash_pos); }
@@ -148,8 +148,7 @@ static uint32_t find_object_pos(const unsigned char *sha1) return entry->in_pack_pos; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base =...
CWE-119
null
null
44,032
static inline void push_bitmapped_commit(struct commit *commit, struct ewah_bitmap *reused) { if (writer.selected_nr >= writer.selected_alloc) { writer.selected_alloc = (writer.selected_alloc + 32) * 2; REALLOC_ARRAY(writer.selected, writer.selected_alloc); } writer.selected[writer.selected_nr].commit = commit;...
Exec Code Overflow
0
static inline void push_bitmapped_commit(struct commit *commit, struct ewah_bitmap *reused) { if (writer.selected_nr >= writer.selected_alloc) { writer.selected_alloc = (writer.selected_alloc + 32) * 2; REALLOC_ARRAY(writer.selected, writer.selected_alloc); } writer.selected[writer.selected_nr].commit = commit;...
@@ -148,8 +148,7 @@ static uint32_t find_object_pos(const unsigned char *sha1) return entry->in_pack_pos; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base =...
CWE-119
null
null
44,033
static inline void reset_all_seen(void) { unsigned int i; for (i = 0; i < seen_objects_nr; ++i) { seen_objects[i]->flags &= ~(SEEN | ADDED | SHOWN); } seen_objects_nr = 0; }
Exec Code Overflow
0
static inline void reset_all_seen(void) { unsigned int i; for (i = 0; i < seen_objects_nr; ++i) { seen_objects[i]->flags &= ~(SEEN | ADDED | SHOWN); } seen_objects_nr = 0; }
@@ -148,8 +148,7 @@ static uint32_t find_object_pos(const unsigned char *sha1) return entry->in_pack_pos; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base =...
CWE-119
null
null
44,034
static const unsigned char *sha1_access(size_t pos, void *table) { struct pack_idx_entry **index = table; return index[pos]->sha1; }
Exec Code Overflow
0
static const unsigned char *sha1_access(size_t pos, void *table) { struct pack_idx_entry **index = table; return index[pos]->sha1; }
@@ -148,8 +148,7 @@ static uint32_t find_object_pos(const unsigned char *sha1) return entry->in_pack_pos; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base =...
CWE-119
null
null
44,035
static void write_hash_cache(struct sha1file *f, struct pack_idx_entry **index, uint32_t index_nr) { uint32_t i; for (i = 0; i < index_nr; ++i) { struct object_entry *entry = (struct object_entry *)index[i]; uint32_t hash_value = htonl(entry->hash); sha1write(f, &hash_value, sizeof(hash_value))...
Exec Code Overflow
0
static void write_hash_cache(struct sha1file *f, struct pack_idx_entry **index, uint32_t index_nr) { uint32_t i; for (i = 0; i < index_nr; ++i) { struct object_entry *entry = (struct object_entry *)index[i]; uint32_t hash_value = htonl(entry->hash); sha1write(f, &hash_value, sizeof(hash_value))...
@@ -148,8 +148,7 @@ static uint32_t find_object_pos(const unsigned char *sha1) return entry->in_pack_pos; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base =...
CWE-119
null
null
44,036
static void write_selected_commits_v1(struct sha1file *f, struct pack_idx_entry **index, uint32_t index_nr) { int i; for (i = 0; i < writer.selected_nr; ++i) { struct bitmapped_commit *stored = &writer.selected[i]; int commit_pos = sha1_pos(stored->commit->object.oid.hash, index, index_nr...
Exec Code Overflow
0
static void write_selected_commits_v1(struct sha1file *f, struct pack_idx_entry **index, uint32_t index_nr) { int i; for (i = 0; i < writer.selected_nr; ++i) { struct bitmapped_commit *stored = &writer.selected[i]; int commit_pos = sha1_pos(stored->commit->object.oid.hash, index, index_nr...
@@ -148,8 +148,7 @@ static uint32_t find_object_pos(const unsigned char *sha1) return entry->in_pack_pos; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name, void *data) { struct bitmap *base =...
CWE-119
null
null
44,037
static int add_to_include_set(struct include_data *data, const unsigned char *sha1, int bitmap_pos) { khiter_t hash_pos; if (data->seen && bitmap_get(data->seen, bitmap_pos)) return 0; if (bitmap_get(data->base, bitmap_pos)) return 0; hash_pos = kh_get_sha1(bitmap_git.bitmaps, sha1); if (h...
Exec Code Overflow
0
static int add_to_include_set(struct include_data *data, const unsigned char *sha1, int bitmap_pos) { khiter_t hash_pos; if (data->seen && bitmap_get(data->seen, bitmap_pos)) return 0; if (bitmap_get(data->base, bitmap_pos)) return 0; hash_pos = kh_get_sha1(bitmap_git.bitmaps, sha1); if (h...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,038
static int bitmap_position(const unsigned char *sha1) { int pos = bitmap_position_packfile(sha1); return (pos >= 0) ? pos : bitmap_position_extended(sha1); }
Exec Code Overflow
0
static int bitmap_position(const unsigned char *sha1) { int pos = bitmap_position_packfile(sha1); return (pos >= 0) ? pos : bitmap_position_extended(sha1); }
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,039
static inline int bitmap_position_extended(const unsigned char *sha1) { khash_sha1_pos *positions = bitmap_git.ext_index.positions; khiter_t pos = kh_get_sha1_pos(positions, sha1); if (pos < kh_end(positions)) { int bitmap_pos = kh_value(positions, pos); return bitmap_pos + bitmap_git.pack->num_objects; } re...
Exec Code Overflow
0
static inline int bitmap_position_extended(const unsigned char *sha1) { khash_sha1_pos *positions = bitmap_git.ext_index.positions; khiter_t pos = kh_get_sha1_pos(positions, sha1); if (pos < kh_end(positions)) { int bitmap_pos = kh_value(positions, pos); return bitmap_pos + bitmap_git.pack->num_objects; } re...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,040
static inline int bitmap_position_packfile(const unsigned char *sha1) { off_t offset = find_pack_entry_one(sha1, bitmap_git.pack); if (!offset) return -1; return find_revindex_position(bitmap_git.pack, offset); }
Exec Code Overflow
0
static inline int bitmap_position_packfile(const unsigned char *sha1) { off_t offset = find_pack_entry_one(sha1, bitmap_git.pack); if (!offset) return -1; return find_revindex_position(bitmap_git.pack, offset); }
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,041
void count_bitmap_commit_list(uint32_t *commits, uint32_t *trees, uint32_t *blobs, uint32_t *tags) { assert(bitmap_git.result); if (commits) *commits = count_object_type(bitmap_git.result, OBJ_COMMIT); if (trees) *trees = count_object_type(bitmap_git.result, OBJ_TREE); if (blobs) *blobs = count_ob...
Exec Code Overflow
0
void count_bitmap_commit_list(uint32_t *commits, uint32_t *trees, uint32_t *blobs, uint32_t *tags) { assert(bitmap_git.result); if (commits) *commits = count_object_type(bitmap_git.result, OBJ_COMMIT); if (trees) *trees = count_object_type(bitmap_git.result, OBJ_TREE); if (blobs) *blobs = count_ob...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,042
static uint32_t count_object_type(struct bitmap *objects, enum object_type type) { struct eindex *eindex = &bitmap_git.ext_index; uint32_t i = 0, count = 0; struct ewah_iterator it; eword_t filter; switch (type) { case OBJ_COMMIT: ewah_iterator_init(&it, bitmap_git.commits); break; case OBJ_TREE: ...
Exec Code Overflow
0
static uint32_t count_object_type(struct bitmap *objects, enum object_type type) { struct eindex *eindex = &bitmap_git.ext_index; uint32_t i = 0, count = 0; struct ewah_iterator it; eword_t filter; switch (type) { case OBJ_COMMIT: ewah_iterator_init(&it, bitmap_git.commits); break; case OBJ_TREE: ...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,043
static int ext_index_add_object(struct object *object, const char *name) { struct eindex *eindex = &bitmap_git.ext_index; khiter_t hash_pos; int hash_ret; int bitmap_pos; hash_pos = kh_put_sha1_pos(eindex->positions, object->oid.hash, &hash_ret); if (hash_ret > 0) { if (eindex->count >= eindex->alloc) { ei...
Exec Code Overflow
0
static int ext_index_add_object(struct object *object, const char *name) { struct eindex *eindex = &bitmap_git.ext_index; khiter_t hash_pos; int hash_ret; int bitmap_pos; hash_pos = kh_put_sha1_pos(eindex->positions, object->oid.hash, &hash_ret); if (hash_ret > 0) { if (eindex->count >= eindex->alloc) { ei...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,044
static int in_bitmapped_pack(struct object_list *roots) { while (roots) { struct object *object = roots->item; roots = roots->next; if (find_pack_entry_one(object->oid.hash, bitmap_git.pack) > 0) return 1; } return 0; }
Exec Code Overflow
0
static int in_bitmapped_pack(struct object_list *roots) { while (roots) { struct object *object = roots->item; roots = roots->next; if (find_pack_entry_one(object->oid.hash, bitmap_git.pack) > 0) return 1; } return 0; }
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,045
static int load_bitmap_entries_v1(struct bitmap_index *index) { uint32_t i; struct stored_bitmap *recent_bitmaps[MAX_XOR_OFFSET] = { NULL }; for (i = 0; i < index->entry_count; ++i) { int xor_offset, flags; struct ewah_bitmap *bitmap = NULL; struct stored_bitmap *xor_bitmap = NULL; uint32_t commit_idx_pos; ...
Exec Code Overflow
0
static int load_bitmap_entries_v1(struct bitmap_index *index) { uint32_t i; struct stored_bitmap *recent_bitmaps[MAX_XOR_OFFSET] = { NULL }; for (i = 0; i < index->entry_count; ++i) { int xor_offset, flags; struct ewah_bitmap *bitmap = NULL; struct stored_bitmap *xor_bitmap = NULL; uint32_t commit_idx_pos; ...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,046
static int load_bitmap_header(struct bitmap_index *index) { struct bitmap_disk_header *header = (void *)index->map; if (index->map_size < sizeof(*header) + 20) return error("Corrupted bitmap index (missing header data)"); if (memcmp(header->magic, BITMAP_IDX_SIGNATURE, sizeof(BITMAP_IDX_SIGNATURE)) != 0) retur...
Exec Code Overflow
0
static int load_bitmap_header(struct bitmap_index *index) { struct bitmap_disk_header *header = (void *)index->map; if (index->map_size < sizeof(*header) + 20) return error("Corrupted bitmap index (missing header data)"); if (memcmp(header->magic, BITMAP_IDX_SIGNATURE, sizeof(BITMAP_IDX_SIGNATURE)) != 0) retur...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,047
static int load_pack_bitmap(void) { assert(bitmap_git.map && !bitmap_git.loaded); bitmap_git.bitmaps = kh_init_sha1(); bitmap_git.ext_index.positions = kh_init_sha1_pos(); load_pack_revindex(bitmap_git.pack); if (!(bitmap_git.commits = read_bitmap_1(&bitmap_git)) || !(bitmap_git.trees = read_bitmap_1(&bitmap_g...
Exec Code Overflow
0
static int load_pack_bitmap(void) { assert(bitmap_git.map && !bitmap_git.loaded); bitmap_git.bitmaps = kh_init_sha1(); bitmap_git.ext_index.positions = kh_init_sha1_pos(); load_pack_revindex(bitmap_git.pack); if (!(bitmap_git.commits = read_bitmap_1(&bitmap_git)) || !(bitmap_git.trees = read_bitmap_1(&bitmap_g...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,048
static struct ewah_bitmap *lookup_stored_bitmap(struct stored_bitmap *st) { struct ewah_bitmap *parent; struct ewah_bitmap *composed; if (st->xor == NULL) return st->root; composed = ewah_pool_new(); parent = lookup_stored_bitmap(st->xor); ewah_xor(st->root, parent, composed); ewah_pool_free(st->root); st-...
Exec Code Overflow
0
static struct ewah_bitmap *lookup_stored_bitmap(struct stored_bitmap *st) { struct ewah_bitmap *parent; struct ewah_bitmap *composed; if (st->xor == NULL) return st->root; composed = ewah_pool_new(); parent = lookup_stored_bitmap(st->xor); ewah_xor(st->root, parent, composed); ewah_pool_free(st->root); st-...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,049
static int open_pack_bitmap(void) { struct packed_git *p; int ret = -1; assert(!bitmap_git.map && !bitmap_git.loaded); prepare_packed_git(); for (p = packed_git; p; p = p->next) { if (open_pack_bitmap_1(p) == 0) ret = 0; } return ret; }
Exec Code Overflow
0
static int open_pack_bitmap(void) { struct packed_git *p; int ret = -1; assert(!bitmap_git.map && !bitmap_git.loaded); prepare_packed_git(); for (p = packed_git; p; p = p->next) { if (open_pack_bitmap_1(p) == 0) ret = 0; } return ret; }
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,050
static int open_pack_bitmap_1(struct packed_git *packfile) { int fd; struct stat st; char *idx_name; if (open_pack_index(packfile)) return -1; idx_name = pack_bitmap_filename(packfile); fd = git_open_noatime(idx_name); free(idx_name); if (fd < 0) return -1; if (fstat(fd, &st)) { close(fd); return -...
Exec Code Overflow
0
static int open_pack_bitmap_1(struct packed_git *packfile) { int fd; struct stat st; char *idx_name; if (open_pack_index(packfile)) return -1; idx_name = pack_bitmap_filename(packfile); fd = git_open_noatime(idx_name); free(idx_name); if (fd < 0) return -1; if (fstat(fd, &st)) { close(fd); return -...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,051
int prepare_bitmap_walk(struct rev_info *revs) { unsigned int i; unsigned int pending_nr = revs->pending.nr; struct object_array_entry *pending_e = revs->pending.objects; struct object_list *wants = NULL; struct object_list *haves = NULL; struct bitmap *wants_bitmap = NULL; struct bitmap *haves_bitmap = NULL; ...
Exec Code Overflow
0
int prepare_bitmap_walk(struct rev_info *revs) { unsigned int i; unsigned int pending_nr = revs->pending.nr; struct object_array_entry *pending_e = revs->pending.objects; struct object_list *wants = NULL; struct object_list *haves = NULL; struct bitmap *wants_bitmap = NULL; struct bitmap *haves_bitmap = NULL; ...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,052
static inline uint32_t read_be32(const unsigned char *buffer, size_t *pos) { uint32_t result = get_be32(buffer + *pos); (*pos) += sizeof(result); return result; }
Exec Code Overflow
0
static inline uint32_t read_be32(const unsigned char *buffer, size_t *pos) { uint32_t result = get_be32(buffer + *pos); (*pos) += sizeof(result); return result; }
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,053
static struct ewah_bitmap *read_bitmap_1(struct bitmap_index *index) { struct ewah_bitmap *b = ewah_pool_new(); int bitmap_size = ewah_read_mmap(b, index->map + index->map_pos, index->map_size - index->map_pos); if (bitmap_size < 0) { error("Failed to load bitmap index (corrupted?)"); ewah_pool_free(b); ...
Exec Code Overflow
0
static struct ewah_bitmap *read_bitmap_1(struct bitmap_index *index) { struct ewah_bitmap *b = ewah_pool_new(); int bitmap_size = ewah_read_mmap(b, index->map + index->map_pos, index->map_size - index->map_pos); if (bitmap_size < 0) { error("Failed to load bitmap index (corrupted?)"); ewah_pool_free(b); ...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,054
static inline uint8_t read_u8(const unsigned char *buffer, size_t *pos) { return buffer[(*pos)++]; }
Exec Code Overflow
0
static inline uint8_t read_u8(const unsigned char *buffer, size_t *pos) { return buffer[(*pos)++]; }
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,055
static int rebuild_bitmap(uint32_t *reposition, struct ewah_bitmap *source, struct bitmap *dest) { uint32_t pos = 0; struct ewah_iterator it; eword_t word; ewah_iterator_init(&it, source); while (ewah_iterator_next(&word, &it)) { uint32_t offset, bit_pos; for (offset = 0; offset < BITS_IN_EWORD; +...
Exec Code Overflow
0
static int rebuild_bitmap(uint32_t *reposition, struct ewah_bitmap *source, struct bitmap *dest) { uint32_t pos = 0; struct ewah_iterator it; eword_t word; ewah_iterator_init(&it, source); while (ewah_iterator_next(&word, &it)) { uint32_t offset, bit_pos; for (offset = 0; offset < BITS_IN_EWORD; +...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,056
int rebuild_existing_bitmaps(struct packing_data *mapping, khash_sha1 *reused_bitmaps, int show_progress) { uint32_t i, num_objects; uint32_t *reposition; struct bitmap *rebuild; struct stored_bitmap *stored; struct progress *progress = NULL; khiter_t hash_pos; int hash_ret; if (prepare_bitmap...
Exec Code Overflow
0
int rebuild_existing_bitmaps(struct packing_data *mapping, khash_sha1 *reused_bitmaps, int show_progress) { uint32_t i, num_objects; uint32_t *reposition; struct bitmap *rebuild; struct stored_bitmap *stored; struct progress *progress = NULL; khiter_t hash_pos; int hash_ret; if (prepare_bitmap...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,057
int reuse_partial_packfile_from_bitmap(struct packed_git **packfile, uint32_t *entries, off_t *up_to) { /* * Reuse the packfile content if we need more than * 90% of its objects */ static const double REUSE_PERCENT = 0.9; struct bitmap *result = bitmap_git.result; uint32_t reuse_thresho...
Exec Code Overflow
0
int reuse_partial_packfile_from_bitmap(struct packed_git **packfile, uint32_t *entries, off_t *up_to) { /* * Reuse the packfile content if we need more than * 90% of its objects */ static const double REUSE_PERCENT = 0.9; struct bitmap *result = bitmap_git.result; uint32_t reuse_thresho...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,058
static void show_commit(struct commit *commit, void *data) { }
Exec Code Overflow
0
static void show_commit(struct commit *commit, void *data) { }
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,059
static void show_extended_objects(struct bitmap *objects, show_reachable_fn show_reach) { struct eindex *eindex = &bitmap_git.ext_index; uint32_t i; for (i = 0; i < eindex->count; ++i) { struct object *obj; if (!bitmap_get(objects, bitmap_git.pack->num_objects + i)) continue; obj = eindex->objects[...
Exec Code Overflow
0
static void show_extended_objects(struct bitmap *objects, show_reachable_fn show_reach) { struct eindex *eindex = &bitmap_git.ext_index; uint32_t i; for (i = 0; i < eindex->count; ++i) { struct object *obj; if (!bitmap_get(objects, bitmap_git.pack->num_objects + i)) continue; obj = eindex->objects[...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,060
static void show_objects_for_type( struct bitmap *objects, struct ewah_bitmap *type_filter, enum object_type object_type, show_reachable_fn show_reach) { size_t pos = 0, i = 0; uint32_t offset; struct ewah_iterator it; eword_t filter; if (bitmap_git.reuse_objects == bitmap_git.pack->num_objects) return; ...
Exec Code Overflow
0
static void show_objects_for_type( struct bitmap *objects, struct ewah_bitmap *type_filter, enum object_type object_type, show_reachable_fn show_reach) { size_t pos = 0, i = 0; uint32_t offset; struct ewah_iterator it; eword_t filter; if (bitmap_git.reuse_objects == bitmap_git.pack->num_objects) return; ...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,061
static struct stored_bitmap *store_bitmap(struct bitmap_index *index, struct ewah_bitmap *root, const unsigned char *sha1, struct stored_bitmap *xor_with, int flags) { struct stored_bitmap *stored; khiter_t hash_pos; int ret; stored = xmalloc(sizeof(struct stored_bitmap)); stored->root...
Exec Code Overflow
0
static struct stored_bitmap *store_bitmap(struct bitmap_index *index, struct ewah_bitmap *root, const unsigned char *sha1, struct stored_bitmap *xor_with, int flags) { struct stored_bitmap *stored; khiter_t hash_pos; int ret; stored = xmalloc(sizeof(struct stored_bitmap)); stored->root...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,062
void test_bitmap_walk(struct rev_info *revs) { struct object *root; struct bitmap *result = NULL; khiter_t pos; size_t result_popcnt; struct bitmap_test_data tdata; if (prepare_bitmap_git()) die("failed to load bitmap indexes"); if (revs->pending.nr != 1) die("you must specify exactly one commit to test");...
Exec Code Overflow
0
void test_bitmap_walk(struct rev_info *revs) { struct object *root; struct bitmap *result = NULL; khiter_t pos; size_t result_popcnt; struct bitmap_test_data tdata; if (prepare_bitmap_git()) die("failed to load bitmap indexes"); if (revs->pending.nr != 1) die("you must specify exactly one commit to test");...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,063
void traverse_bitmap_commit_list(show_reachable_fn show_reachable) { assert(bitmap_git.result); show_objects_for_type(bitmap_git.result, bitmap_git.commits, OBJ_COMMIT, show_reachable); show_objects_for_type(bitmap_git.result, bitmap_git.trees, OBJ_TREE, show_reachable); show_objects_for_type(bitmap_git.result...
Exec Code Overflow
0
void traverse_bitmap_commit_list(show_reachable_fn show_reachable) { assert(bitmap_git.result); show_objects_for_type(bitmap_git.result, bitmap_git.commits, OBJ_COMMIT, show_reachable); show_objects_for_type(bitmap_git.result, bitmap_git.trees, OBJ_TREE, show_reachable); show_objects_for_type(bitmap_git.result...
@@ -414,19 +414,15 @@ static int ext_index_add_object(struct object *object, const char *name) return bitmap_pos + bitmap_git.pack->num_objects; } -static void show_object(struct object *object, struct strbuf *path, - const char *last, void *data) +static void show_object(struct object *object, const char *name,...
CWE-119
null
null
44,064
static int add_one_ref(const char *path, const struct object_id *oid, int flag, void *cb_data) { struct rev_info *revs = (struct rev_info *)cb_data; struct object *object; if ((flag & REF_ISSYMREF) && (flag & REF_ISBROKEN)) { warning("symbolic ref is dangling: %s", path); return 0; } object = parse_...
Exec Code Overflow
0
static int add_one_ref(const char *path, const struct object_id *oid, int flag, void *cb_data) { struct rev_info *revs = (struct rev_info *)cb_data; struct object *object; if ((flag & REF_ISSYMREF) && (flag & REF_ISBROKEN)) { warning("symbolic ref is dangling: %s", path); return 0; } object = parse_...
@@ -43,15 +43,14 @@ static int add_one_ref(const char *path, const struct object_id *oid, * The traversal will have already marked us as SEEN, so we * only need to handle any progress reporting here. */ -static void mark_object(struct object *obj, struct strbuf *path, - const char *name, void *data) +static voi...
CWE-119
null
null
44,065
static int add_recent_loose(const unsigned char *sha1, const char *path, void *data) { struct stat st; struct object *obj = lookup_object(sha1); if (obj && obj->flags & SEEN) return 0; if (stat(path, &st) < 0) { /* * It's OK if an object went away during our iteration; this * could be due to a si...
Exec Code Overflow
0
static int add_recent_loose(const unsigned char *sha1, const char *path, void *data) { struct stat st; struct object *obj = lookup_object(sha1); if (obj && obj->flags & SEEN) return 0; if (stat(path, &st) < 0) { /* * It's OK if an object went away during our iteration; this * could be due to a si...
@@ -43,15 +43,14 @@ static int add_one_ref(const char *path, const struct object_id *oid, * The traversal will have already marked us as SEEN, so we * only need to handle any progress reporting here. */ -static void mark_object(struct object *obj, struct strbuf *path, - const char *name, void *data) +static voi...
CWE-119
null
null
44,066
static void add_recent_object(const unsigned char *sha1, unsigned long mtime, struct recent_data *data) { struct object *obj; enum object_type type; if (mtime <= data->timestamp) return; /* * We do not want to call parse_object here, because * inflating blobs and trees could be very expens...
Exec Code Overflow
0
static void add_recent_object(const unsigned char *sha1, unsigned long mtime, struct recent_data *data) { struct object *obj; enum object_type type; if (mtime <= data->timestamp) return; /* * We do not want to call parse_object here, because * inflating blobs and trees could be very expens...
@@ -43,15 +43,14 @@ static int add_one_ref(const char *path, const struct object_id *oid, * The traversal will have already marked us as SEEN, so we * only need to handle any progress reporting here. */ -static void mark_object(struct object *obj, struct strbuf *path, - const char *name, void *data) +static voi...
CWE-119
null
null
44,067
static int add_recent_packed(const unsigned char *sha1, struct packed_git *p, uint32_t pos, void *data) { struct object *obj = lookup_object(sha1); if (obj && obj->flags & SEEN) return 0; add_recent_object(sha1, p->mtime, data); return 0; }
Exec Code Overflow
0
static int add_recent_packed(const unsigned char *sha1, struct packed_git *p, uint32_t pos, void *data) { struct object *obj = lookup_object(sha1); if (obj && obj->flags & SEEN) return 0; add_recent_object(sha1, p->mtime, data); return 0; }
@@ -43,15 +43,14 @@ static int add_one_ref(const char *path, const struct object_id *oid, * The traversal will have already marked us as SEEN, so we * only need to handle any progress reporting here. */ -static void mark_object(struct object *obj, struct strbuf *path, - const char *name, void *data) +static voi...
CWE-119
null
null
44,068
int add_unseen_recent_objects_to_traversal(struct rev_info *revs, unsigned long timestamp) { struct recent_data data; int r; data.revs = revs; data.timestamp = timestamp; r = for_each_loose_object(add_recent_loose, &data, FOR_EACH_OBJECT_LOCAL_ONLY); if (r) return r; return for_each_packed_obje...
Exec Code Overflow
0
int add_unseen_recent_objects_to_traversal(struct rev_info *revs, unsigned long timestamp) { struct recent_data data; int r; data.revs = revs; data.timestamp = timestamp; r = for_each_loose_object(add_recent_loose, &data, FOR_EACH_OBJECT_LOCAL_ONLY); if (r) return r; return for_each_packed_obje...
@@ -43,15 +43,14 @@ static int add_one_ref(const char *path, const struct object_id *oid, * The traversal will have already marked us as SEEN, so we * only need to handle any progress reporting here. */ -static void mark_object(struct object *obj, struct strbuf *path, - const char *name, void *data) +static voi...
CWE-119
null
null
44,069
void mark_reachable_objects(struct rev_info *revs, int mark_reflog, unsigned long mark_recent, struct progress *progress) { struct connectivity_progress cp; /* * Set up revision parsing, and mark us as being interested * in all object types, not just commits. */ revs->tag_objects = 1; revs->blo...
Exec Code Overflow
0
void mark_reachable_objects(struct rev_info *revs, int mark_reflog, unsigned long mark_recent, struct progress *progress) { struct connectivity_progress cp; /* * Set up revision parsing, and mark us as being interested * in all object types, not just commits. */ revs->tag_objects = 1; revs->blo...
@@ -43,15 +43,14 @@ static int add_one_ref(const char *path, const struct object_id *oid, * The traversal will have already marked us as SEEN, so we * only need to handle any progress reporting here. */ -static void mark_object(struct object *obj, struct strbuf *path, - const char *name, void *data) +static voi...
CWE-119
null
null
44,070
static void update_progress(struct connectivity_progress *cp) { cp->count++; if ((cp->count & 1023) == 0) display_progress(cp->progress, cp->count); }
Exec Code Overflow
0
static void update_progress(struct connectivity_progress *cp) { cp->count++; if ((cp->count & 1023) == 0) display_progress(cp->progress, cp->count); }
@@ -43,15 +43,14 @@ static int add_one_ref(const char *path, const struct object_id *oid, * The traversal will have already marked us as SEEN, so we * only need to handle any progress reporting here. */ -static void mark_object(struct object *obj, struct strbuf *path, - const char *name, void *data) +static voi...
CWE-119
null
null
44,071
static void add_child(struct rev_info *revs, struct commit *parent, struct commit *child) { struct commit_list *l = xcalloc(1, sizeof(*l)); l->item = child; l->next = add_decoration(&revs->children, &parent->object, l); }
Exec Code Overflow
0
static void add_child(struct rev_info *revs, struct commit *parent, struct commit *child) { struct commit_list *l = xcalloc(1, sizeof(*l)); l->item = child; l->next = add_decoration(&revs->children, &parent->object, l); }
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,072
void add_head_to_pending(struct rev_info *revs) { unsigned char sha1[20]; struct object *obj; if (get_sha1("HEAD", sha1)) return; obj = parse_object(sha1); if (!obj) return; add_pending_object(revs, obj, "HEAD"); }
Exec Code Overflow
0
void add_head_to_pending(struct rev_info *revs) { unsigned char sha1[20]; struct object *obj; if (get_sha1("HEAD", sha1)) return; obj = parse_object(sha1); if (!obj) return; add_pending_object(revs, obj, "HEAD"); }
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,073
void add_index_objects_to_pending(struct rev_info *revs, unsigned flags) { int i; read_cache(); for (i = 0; i < active_nr; i++) { struct cache_entry *ce = active_cache[i]; struct blob *blob; if (S_ISGITLINK(ce->ce_mode)) continue; blob = lookup_blob(ce->sha1); if (!blob) die("unable to add index b...
Exec Code Overflow
0
void add_index_objects_to_pending(struct rev_info *revs, unsigned flags) { int i; read_cache(); for (i = 0; i < active_nr; i++) { struct cache_entry *ce = active_cache[i]; struct blob *blob; if (S_ISGITLINK(ce->ce_mode)) continue; blob = lookup_blob(ce->sha1); if (!blob) die("unable to add index b...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,074
static void add_message_grep(struct rev_info *revs, const char *pattern) { add_grep(revs, pattern, GREP_PATTERN_BODY); }
Exec Code Overflow
0
static void add_message_grep(struct rev_info *revs, const char *pattern) { add_grep(revs, pattern, GREP_PATTERN_BODY); }
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,075
static int add_parents_only(struct rev_info *revs, const char *arg_, int flags) { unsigned char sha1[20]; struct object *it; struct commit *commit; struct commit_list *parents; const char *arg = arg_; if (*arg == '^') { flags ^= UNINTERESTING | BOTTOM; arg++; } if (get_sha1_committish(arg, sha1)) return ...
Exec Code Overflow
0
static int add_parents_only(struct rev_info *revs, const char *arg_, int flags) { unsigned char sha1[20]; struct object *it; struct commit *commit; struct commit_list *parents; const char *arg = arg_; if (*arg == '^') { flags ^= UNINTERESTING | BOTTOM; arg++; } if (get_sha1_committish(arg, sha1)) return ...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,076
static int add_parents_to_list(struct rev_info *revs, struct commit *commit, struct commit_list **list, struct commit_list **cache_ptr) { struct commit_list *parent = commit->parents; unsigned left_flag; struct commit_list *cached_base = cache_ptr ? *cache_ptr : NULL; if (commit->object.flags & ADDED) retu...
Exec Code Overflow
0
static int add_parents_to_list(struct rev_info *revs, struct commit *commit, struct commit_list **list, struct commit_list **cache_ptr) { struct commit_list *parent = commit->parents; unsigned left_flag; struct commit_list *cached_base = cache_ptr ? *cache_ptr : NULL; if (commit->object.flags & ADDED) retu...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,077
static void add_pending_commit_list(struct rev_info *revs, struct commit_list *commit_list, unsigned int flags) { while (commit_list) { struct object *object = &commit_list->item->object; object->flags |= flags; add_pending_object(revs, obje...
Exec Code Overflow
0
static void add_pending_commit_list(struct rev_info *revs, struct commit_list *commit_list, unsigned int flags) { while (commit_list) { struct object *object = &commit_list->item->object; object->flags |= flags; add_pending_object(revs, obje...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,078
static void add_pending_object_with_mode(struct rev_info *revs, struct object *obj, const char *name, unsigned mode) { add_pending_object_with_path(revs, obj, name, mode, NULL); }
Exec Code Overflow
0
static void add_pending_object_with_mode(struct rev_info *revs, struct object *obj, const char *name, unsigned mode) { add_pending_object_with_path(revs, obj, name, mode, NULL); }
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,079
void add_pending_sha1(struct rev_info *revs, const char *name, const unsigned char *sha1, unsigned int flags) { struct object *object = get_reference(revs, name, sha1, flags); add_pending_object(revs, object, name); }
Exec Code Overflow
0
void add_pending_sha1(struct rev_info *revs, const char *name, const unsigned char *sha1, unsigned int flags) { struct object *object = get_reference(revs, name, sha1, flags); add_pending_object(revs, object, name); }
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,080
void add_ref_exclusion(struct string_list **ref_excludes_p, const char *exclude) { if (!*ref_excludes_p) { *ref_excludes_p = xcalloc(1, sizeof(**ref_excludes_p)); (*ref_excludes_p)->strdup_strings = 1; } string_list_append(*ref_excludes_p, exclude); }
Exec Code Overflow
0
void add_ref_exclusion(struct string_list **ref_excludes_p, const char *exclude) { if (!*ref_excludes_p) { *ref_excludes_p = xcalloc(1, sizeof(**ref_excludes_p)); (*ref_excludes_p)->strdup_strings = 1; } string_list_append(*ref_excludes_p, exclude); }
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,081
static void add_rev_cmdline_list(struct rev_info *revs, struct commit_list *commit_list, int whence, unsigned flags) { while (commit_list) { struct object *object = &commit_list->item->object; add_rev_cmdline(revs, object, oid_to_hex(&object->oid), whence, flags); commit_list = commit_list->ne...
Exec Code Overflow
0
static void add_rev_cmdline_list(struct rev_info *revs, struct commit_list *commit_list, int whence, unsigned flags) { while (commit_list) { struct object *object = &commit_list->item->object; add_rev_cmdline(revs, object, oid_to_hex(&object->oid), whence, flags); commit_list = commit_list->ne...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,082
static void append_prune_data(struct cmdline_pathspec *prune, const char **av) { while (*av) { ALLOC_GROW(prune->path, prune->nr + 1, prune->alloc); prune->path[prune->nr++] = *(av++); } }
Exec Code Overflow
0
static void append_prune_data(struct cmdline_pathspec *prune, const char **av) { while (*av) { ALLOC_GROW(prune->path, prune->nr + 1, prune->alloc); prune->path[prune->nr++] = *(av++); } }
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,083
void clear_ref_exclusion(struct string_list **ref_excludes_p) { if (*ref_excludes_p) { string_list_clear(*ref_excludes_p, 0); free(*ref_excludes_p); } *ref_excludes_p = NULL; }
Exec Code Overflow
0
void clear_ref_exclusion(struct string_list **ref_excludes_p) { if (*ref_excludes_p) { string_list_clear(*ref_excludes_p, 0); free(*ref_excludes_p); } *ref_excludes_p = NULL; }
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,084
static struct commit_list *collect_bottom_commits(struct commit_list *list) { struct commit_list *elem, *bottom = NULL; for (elem = list; elem; elem = elem->next) if (elem->item->object.flags & BOTTOM) commit_list_insert(elem->item, &bottom); return bottom; }
Exec Code Overflow
0
static struct commit_list *collect_bottom_commits(struct commit_list *list) { struct commit_list *elem, *bottom = NULL; for (elem = list; elem; elem = elem->next) if (elem->item->object.flags & BOTTOM) commit_list_insert(elem->item, &bottom); return bottom; }
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,085
static void commit_list_insert_by_date_cached(struct commit *p, struct commit_list **head, struct commit_list *cached_base, struct commit_list **cache) { struct commit_list *new_entry; if (cached_base && p->date < cached_base->item->date) new_entry = commit_list_insert_by_date(p, &cached_base->next); else ...
Exec Code Overflow
0
static void commit_list_insert_by_date_cached(struct commit *p, struct commit_list **head, struct commit_list *cached_base, struct commit_list **cache) { struct commit_list *new_entry; if (cached_base && p->date < cached_base->item->date) new_entry = commit_list_insert_by_date(p, &cached_base->next); else ...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,086
static int commit_match(struct commit *commit, struct rev_info *opt) { int retval; const char *encoding; const char *message; struct strbuf buf = STRBUF_INIT; if (!opt->grep_filter.pattern_list && !opt->grep_filter.header_list) return 1; /* Prepend "fake" headers as needed */ if (opt->grep_filter.use_reflog_...
Exec Code Overflow
0
static int commit_match(struct commit *commit, struct rev_info *opt) { int retval; const char *encoding; const char *message; struct strbuf buf = STRBUF_INIT; if (!opt->grep_filter.pattern_list && !opt->grep_filter.header_list) return 1; /* Prepend "fake" headers as needed */ if (opt->grep_filter.use_reflog_...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,087
static int commit_rewrite_person(struct strbuf *buf, const char *what, struct string_list *mailmap) { char *person, *endp; size_t len, namelen, maillen; const char *name; const char *mail; struct ident_split ident; person = strstr(buf->buf, what); if (!person) return 0; person += strlen(what); endp = strch...
Exec Code Overflow
0
static int commit_rewrite_person(struct strbuf *buf, const char *what, struct string_list *mailmap) { char *person, *endp; size_t len, namelen, maillen; const char *name; const char *mail; struct ident_split ident; person = strstr(buf->buf, what); if (!person) return 0; person += strlen(what); endp = strch...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,088
static int compact_treesame(struct rev_info *revs, struct commit *commit, unsigned nth_parent) { struct treesame_state *st; int old_same; if (!commit->parents) { /* * Have just removed the only parent from a non-merge. * Different handling, as we lack decoration. */ if (nth_parent != 0) die("compact...
Exec Code Overflow
0
static int compact_treesame(struct rev_info *revs, struct commit *commit, unsigned nth_parent) { struct treesame_state *st; int old_same; if (!commit->parents) { /* * Have just removed the only parent from a non-merge. * Different handling, as we lack decoration. */ if (nth_parent != 0) die("compact...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,089
static void create_boundary_commit_list(struct rev_info *revs) { unsigned i; struct commit *c; struct object_array *array = &revs->boundary_commits; struct object_array_entry *objects = array->objects; /* * If revs->commits is non-NULL at this point, an error occurred in * get_revision_1(). Ignore the error ...
Exec Code Overflow
0
static void create_boundary_commit_list(struct rev_info *revs) { unsigned i; struct commit *c; struct object_array *array = &revs->boundary_commits; struct object_array_entry *objects = array->objects; /* * If revs->commits is non-NULL at this point, an error occurred in * get_revision_1(). Ignore the error ...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,090
static int everybody_uninteresting(struct commit_list *orig, struct commit **interesting_cache) { struct commit_list *list = orig; if (*interesting_cache) { struct commit *commit = *interesting_cache; if (!(commit->object.flags & UNINTERESTING)) return 0; } while (list) { struct commit *commit = l...
Exec Code Overflow
0
static int everybody_uninteresting(struct commit_list *orig, struct commit **interesting_cache) { struct commit_list *list = orig; if (*interesting_cache) { struct commit *commit = *interesting_cache; if (!(commit->object.flags & UNINTERESTING)) return 0; } while (list) { struct commit *commit = l...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,091
static void file_add_remove(struct diff_options *options, int addremove, unsigned mode, const unsigned char *sha1, int sha1_valid, const char *fullpath, unsigned dirty_submodule) { int diff = addremove == '+' ? REV_TREE_NEW : REV_TREE_OLD; tree_difference |= diff; if (tree_difference == REV_...
Exec Code Overflow
0
static void file_add_remove(struct diff_options *options, int addremove, unsigned mode, const unsigned char *sha1, int sha1_valid, const char *fullpath, unsigned dirty_submodule) { int diff = addremove == '+' ? REV_TREE_NEW : REV_TREE_OLD; tree_difference |= diff; if (tree_difference == REV_...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,092
static void file_change(struct diff_options *options, unsigned old_mode, unsigned new_mode, const unsigned char *old_sha1, const unsigned char *new_sha1, int old_sha1_valid, int new_sha1_valid, const char *fullpath, unsigned old_dirty_submodule, unsigned new_dirty_submodule) { tree_difference = REV_T...
Exec Code Overflow
0
static void file_change(struct diff_options *options, unsigned old_mode, unsigned new_mode, const unsigned char *old_sha1, const unsigned char *new_sha1, int old_sha1_valid, int new_sha1_valid, const char *fullpath, unsigned old_dirty_submodule, unsigned new_dirty_submodule) { tree_difference = REV_T...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,093
static int for_each_bad_bisect_ref(const char *submodule, each_ref_fn fn, void *cb_data) { return for_each_bisect_ref(submodule, fn, cb_data, term_bad); }
Exec Code Overflow
0
static int for_each_bad_bisect_ref(const char *submodule, each_ref_fn fn, void *cb_data) { return for_each_bisect_ref(submodule, fn, cb_data, term_bad); }
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,094
static int for_each_good_bisect_ref(const char *submodule, each_ref_fn fn, void *cb_data) { return for_each_bisect_ref(submodule, fn, cb_data, term_good); }
Exec Code Overflow
0
static int for_each_good_bisect_ref(const char *submodule, each_ref_fn fn, void *cb_data) { return for_each_bisect_ref(submodule, fn, cb_data, term_good); }
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,095
static void free_saved_parents(struct rev_info *revs) { if (revs->saved_parents_slab) clear_saved_parents(revs->saved_parents_slab); }
Exec Code Overflow
0
static void free_saved_parents(struct rev_info *revs) { if (revs->saved_parents_slab) clear_saved_parents(revs->saved_parents_slab); }
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,096
enum commit_action get_commit_action(struct rev_info *revs, struct commit *commit) { if (commit->object.flags & SHOWN) return commit_ignore; if (revs->unpacked && has_sha1_pack(commit->object.oid.hash)) return commit_ignore; if (revs->show_all) return commit_show; if (commit->object.flags & UNINTERESTING) r...
Exec Code Overflow
0
enum commit_action get_commit_action(struct rev_info *revs, struct commit *commit) { if (commit->object.flags & SHOWN) return commit_ignore; if (revs->unpacked && has_sha1_pack(commit->object.oid.hash)) return commit_ignore; if (revs->show_all) return commit_show; if (commit->object.flags & UNINTERESTING) r...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,097
static struct object *get_reference(struct rev_info *revs, const char *name, const unsigned char *sha1, unsigned int flags) { struct object *object; object = parse_object(sha1); if (!object) { if (revs->ignore_missing) return object; die("bad object %s", name); } object->flags |= flags; re...
Exec Code Overflow
0
static struct object *get_reference(struct rev_info *revs, const char *name, const unsigned char *sha1, unsigned int flags) { struct object *object; object = parse_object(sha1); if (!object) { if (revs->ignore_missing) return object; die("bad object %s", name); } object->flags |= flags; re...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,098
struct commit *get_revision(struct rev_info *revs) { struct commit *c; struct commit_list *reversed; if (revs->reverse) { reversed = NULL; while ((c = get_revision_internal(revs))) commit_list_insert(c, &reversed); revs->commits = reversed; revs->reverse = 0; revs->reverse_output_stage = 1; } if (re...
Exec Code Overflow
0
struct commit *get_revision(struct rev_info *revs) { struct commit *c; struct commit_list *reversed; if (revs->reverse) { reversed = NULL; while ((c = get_revision_internal(revs))) commit_list_insert(c, &reversed); revs->commits = reversed; revs->reverse = 0; revs->reverse_output_stage = 1; } if (re...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null
44,099
static struct commit *get_revision_internal(struct rev_info *revs) { struct commit *c = NULL; struct commit_list *l; if (revs->boundary == 2) { /* * All of the normal commits have already been returned, * and we are now returning boundary commits. * create_boundary_commit_list() has populated * revs->...
Exec Code Overflow
0
static struct commit *get_revision_internal(struct rev_info *revs) { struct commit *c = NULL; struct commit_list *l; if (revs->boundary == 2) { /* * All of the normal commits have already been returned, * and we are now returning boundary commits. * create_boundary_commit_list() has populated * revs->...
@@ -25,27 +25,14 @@ volatile show_early_output_fn_t show_early_output; static const char *term_bad; static const char *term_good; -char *path_name(struct strbuf *path, const char *name) +void show_object_with_name(FILE *out, struct object *obj, const char *name) { - struct strbuf ret = STRBUF_INIT; - if (path) - ...
CWE-119
null
null