commit: 12f14a40b3311f557d746856ff472a5a06337bc1
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 24 18:52:42 2020 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Jan 24 18:52:42 2020 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=12f14a40
qmanifest: fix Coverity 206530 Explicit null dereferenced
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
qmanifest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qmanifest.c b/qmanifest.c
index 2a6d9b5..84fd25d 100644
--- a/qmanifest.c
+++ b/qmanifest.c
@@ -1495,7 +1495,7 @@ verify_manifest(
* - Manifest at top-level, needs to be igored as it only points to
* the larger Manifest.files.gz
*/
- if (compare_elems > 1)
+ if (elemslen > 1)
qsort(elems, elemslen, sizeof(elems[0]), compare_elems);
snprintf(buf, sizeof(buf), "%s/%s", dir, manifest);
ret = verify_dir(dir, elems, elemslen, 0, buf + 2, msgs);