From 4f34f8890c99716f5ff8d3b0a33658dddc29e5fd Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Thu, 20 Mar 2025 15:11:19 +0100 Subject: [PATCH] apk: tweak apk_add_hdrid a bit Make sure that the checksum starts with 'Q'. --- ext/repo_apk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/repo_apk.c b/ext/repo_apk.c index dc1ef1b4..ec151591 100644 --- a/ext/repo_apk.c +++ b/ext/repo_apk.c @@ -557,7 +557,9 @@ apk_add_hdrid(Repodata *data, Id p, char *idstr) size_t l = strlen(idstr); unsigned char chksum[33], *cp = chksum; - if (((l == 30 || l == 46) && idstr[0] == 'Q' && idstr[1] == '1') || (idstr[1] == '2' && l == 46)) + if (idstr[0] != 'Q') + return; + if ((idstr[1] == '1' && (l == 30 || l == 46)) || (idstr[1] == '2' && l == 46)) { int xpos = idstr[1] == '2' ? 43 : 27; int i, v; -- 2.47.3