diff options
author | Karel Zak | 2017-04-06 13:39:44 +0200 |
---|---|---|
committer | Karel Zak | 2017-04-06 13:39:44 +0200 |
commit | 52f35f1eccaf94f47b3cb138b53eccb0e6ed9f38 (patch) | |
tree | bb9f3938289ac33fc56a89debe287752b6386539 /libfdisk | |
parent | libfdisk: (gpt) update nparts_max (diff) | |
download | kernel-qcow2-util-linux-52f35f1eccaf94f47b3cb138b53eccb0e6ed9f38.tar.gz kernel-qcow2-util-linux-52f35f1eccaf94f47b3cb138b53eccb0e6ed9f38.tar.xz kernel-qcow2-util-linux-52f35f1eccaf94f47b3cb138b53eccb0e6ed9f38.zip |
libfdisk: (gpt) fix ents zeroize
The gpt->ents is "unsigned char" buffer now. We need to use bytes, no
number of entries...
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk')
-rw-r--r-- | libfdisk/src/gpt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c index 092954f11..cf00d676e 100644 --- a/libfdisk/src/gpt.c +++ b/libfdisk/src/gpt.c @@ -2654,7 +2654,7 @@ int fdisk_gpt_set_npartitions(struct fdisk_context *cxt, uint32_t entries) fdisk_warnx(cxt, _("Cannot allocate memory!")); return -ENOMEM; } - memset(ents + old, 0, new_size - old_size); + memset(ents + old_size, 0, new_size - old_size); gpt->ents = ents; } |