diff options
author | Denys Vlasenko | 2019-10-04 16:45:04 +0200 |
---|---|---|
committer | Denys Vlasenko | 2019-10-04 16:45:04 +0200 |
commit | d8e4ce05039a89c2e0b41f008d74a83db45f2287 (patch) | |
tree | 147536311a6c19a12b331b02dd6b2819b48fae23 /util-linux/fdisk_osf.c | |
parent | 65741d004ee91c5a710559ae4f1664f25009255e (diff) | |
download | busybox-d8e4ce05039a89c2e0b41f008d74a83db45f2287.zip busybox-d8e4ce05039a89c2e0b41f008d74a83db45f2287.tar.gz |
fdisk: avoid overflow in "mega/gigabytes" calculation, code shrink
function old new delta
list_disk_geometry 175 145 -30
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/fdisk_osf.c')
-rw-r--r-- | util-linux/fdisk_osf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util-linux/fdisk_osf.c b/util-linux/fdisk_osf.c index 1328c1f..92180b2 100644 --- a/util-linux/fdisk_osf.c +++ b/util-linux/fdisk_osf.c @@ -470,7 +470,7 @@ xbsd_new_part(void) end = xbsd_dlabel.d_secperunit - 1; #endif - snprintf(mesg, sizeof(mesg), "First %s", str_units(SINGULAR)); + snprintf(mesg, sizeof(mesg), "First %s", str_units()); begin = read_int(bsd_cround(begin), bsd_cround(begin), bsd_cround(end), 0, mesg); @@ -478,7 +478,7 @@ xbsd_new_part(void) begin = (begin - 1) * xbsd_dlabel.d_secpercyl; snprintf(mesg, sizeof(mesg), "Last %s or +size or +sizeM or +sizeK", - str_units(SINGULAR)); + str_units()); end = read_int(bsd_cround(begin), bsd_cround(end), bsd_cround(end), bsd_cround(begin), mesg); |