From: Michael Schroeder Date: Fri, 21 Jun 2013 15:43:42 +0000 (+0200) Subject: make sure we don't see REPOKEY_TYPE_REL_IDARRAY outside of a stored solv file X-Git-Tag: BASE-SuSE-Code-13_1-Branch~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=228d41221788430a09b85c488d62363c006c0993;p=thirdparty%2Flibsolv.git make sure we don't see REPOKEY_TYPE_REL_IDARRAY outside of a stored solv file --- diff --git a/src/repo_solv.c b/src/repo_solv.c index 2835c30f..0eedc18a 100644 --- a/src/repo_solv.c +++ b/src/repo_solv.c @@ -1292,6 +1292,11 @@ printf("=> %s %s %p\n", pool_id2str(pool, keys[key].name), pool_id2str(pool, key } solv_free(idmap); + /* fixup the special idarray type */ + for (i = 1; i < numkeys; i++) + if (keys[i].type == REPOKEY_TYPE_REL_IDARRAY) + keys[i].type = REPOKEY_TYPE_IDARRAY; + for (i = 1; i < numkeys; i++) if (keys[i].storage == KEY_STORAGE_VERTICAL_OFFSET) break; diff --git a/src/repodata.c b/src/repodata.c index 6a5d84b5..a61b80be 100644 --- a/src/repodata.c +++ b/src/repodata.c @@ -757,7 +757,7 @@ repodata_lookup_idarray(Repodata *data, Id solvid, Id keyname, Queue *q) dp = find_key_data(data, solvid, keyname, &key); if (!dp) return 0; - if (key->type != REPOKEY_TYPE_IDARRAY && key->type != REPOKEY_TYPE_REL_IDARRAY) + if (key->type != REPOKEY_TYPE_IDARRAY) return 0; for (;;) {