From: Michael Schroeder Date: Thu, 20 Mar 2025 14:11:19 +0000 (+0100) Subject: apk: tweak apk_add_hdrid a bit X-Git-Tag: 0.7.32~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f34f8890c99716f5ff8d3b0a33658dddc29e5fd;p=thirdparty%2Flibsolv.git apk: tweak apk_add_hdrid a bit Make sure that the checksum starts with 'Q'. --- 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;