Commit 9dd14b990bedd4bcdfc1b21cdb8034be103f574b

Christian Weisgerber 2021-09-28T19:21:34

got_sha1_digest_to_str() writes to char * ok stsp

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/reference.c b/lib/reference.c
index fde331d..debec17 100644
--- a/lib/reference.c
+++ b/lib/reference.c
@@ -1334,7 +1334,7 @@ delete_packed_ref(struct got_reference *delref, struct got_repository *repo)
 		}
 
 		TAILQ_FOREACH(re, &refs, entry) {
-			uint8_t hex[SHA1_DIGEST_STRING_LENGTH];
+			char hex[SHA1_DIGEST_STRING_LENGTH];
 
 			if (got_sha1_digest_to_str(re->ref->ref.ref.sha1, hex,
 			    sizeof(hex)) == NULL) {