From: Michal Simek Date: Wed, 29 Apr 2026 06:29:53 +0000 (+0200) Subject: bloblist: fix pointer comparison in bloblist_apply_blobs() X-Git-Tag: v2026.07-rc2~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0fd32094c04ff736977d88dea02c299a75965c4f;p=thirdparty%2Fu-boot.git bloblist: fix pointer comparison in bloblist_apply_blobs() The rec_from_blob() function returns a pointer, but the code was comparing it using "rec <= 0" which is incorrect for pointer types. Pointers should be compared using "== NULL" or "!= NULL". Addresses-Coverity-ID: CID 645841: Incorrect expression (BAD_COMPARE) Signed-off-by: Michal Simek Reviewed-by: Ilias Apalodimas Reviewed-by: Raymond Mao --- diff --git a/common/bloblist.c b/common/bloblist.c index afed968ce01..d084be89958 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -300,7 +300,7 @@ int bloblist_apply_blobs(uint tag, int (*func)(void **data, int size)) } rec = rec_from_blob(blob - dat_off); - if (rec <= 0) { + if (!rec) { log_err("Blob corrupted\n"); return -ENOENT; }