]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: (gpt) cast number of entries [lgtm scan]
authorKarel Zak <kzak@redhat.com>
Fri, 20 Sep 2019 13:40:14 +0000 (15:40 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 20 Sep 2019 13:40:14 +0000 (15:40 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/gpt.c

index 279f229789fc6dc15b15f0cd3552e8998df9075a..f7057916907186ce146227386b5903c07baec8ce 100644 (file)
@@ -508,7 +508,7 @@ static inline int gpt_calculate_sizeof_ents(struct gpt_header *hdr, uint32_t nen
                return -ERANGE;
        }
 
-       *sz = nents * esz;
+       *sz = (size_t) nents * esz;
        return 0;
 }