commit 7a90b6809c18acd607a3ff752bb9a2462317c1f5 from: Christian Weisgerber date: Sat Jan 02 20:57:19 2021 UTC oops, initialize linesize before calling getline(3); from millert commit - 9bdd68dd5c8e79a94fa4a5a69064ba33acd0b27a commit + 7a90b6809c18acd607a3ff752bb9a2462317c1f5 blob - 61d4adb174d110fe882057a3c36a2e479560f756 blob + 29ca0f7c0d9a9deade9e459946d5f1eaca46a77b --- lib/reference.c +++ lib/reference.c @@ -966,7 +966,7 @@ got_ref_list(struct got_reflist_head *refs, struct got f = fopen(packed_refs_path, "r"); free(packed_refs_path); if (f) { - size_t linesize; + size_t linesize = 0; ssize_t linelen; for (;;) { linelen = getline(&line, &linesize, f); @@ -1179,6 +1179,7 @@ delete_packed_ref(struct got_reference *delref, struct struct got_lockfile *lf = NULL; FILE *f = NULL, *tmpf = NULL; char *line = NULL, *packed_refs_path, *tmppath = NULL; + size_t linesize = 0; struct got_reflist_head refs; int found_delref = 0; @@ -1208,7 +1209,6 @@ delete_packed_ref(struct got_reference *delref, struct goto done; } for (;;) { - size_t linesize; ssize_t linelen; struct got_reference *ref; struct got_reflist_entry *new;