]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
ZFS: Don't iterate over null objsets
authorVladimir Serbinenko <phcoder@gmail.com>
Thu, 6 Jul 2023 15:13:50 +0000 (17:13 +0200)
committerVladimir Serbinenko <phcoder@gmail.com>
Mon, 18 Sep 2023 00:44:02 +0000 (02:44 +0200)
Reading them is harmless but useless as they are empty by definition

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/zfs/zfs.c

index bd49ddb9ea543cb608c1db08dbed46617e610a23..221c914cb9ed103bf30fd75e3d9891a567111a9d 100644 (file)
@@ -4157,6 +4157,9 @@ iterate_zap_fs (const char *name, grub_uint64_t val,
   grub_err_t err;
   struct grub_dirhook_info info;
 
+  if (name[0] == 0 && val == 0)
+    return 0;
+
   dnode_end_t mdn;
   err = dnode_get (&(ctx->data->mos), val, 0, &mdn, ctx->data);
   if (err)