diff options
author | patrick <patrick@openbsd.org> | 2017-03-23 18:16:06 +0000 |
---|---|---|
committer | patrick <patrick@openbsd.org> | 2017-03-23 18:16:06 +0000 |
commit | 89016b2b892cc84ac07476868afbdd0f8fbbf917 (patch) | |
tree | c4185ff71d63daf2d232774f34eb9f6fd5210d09 /usr.sbin/makefs | |
parent | Add tests for SA grouped in bundles. (diff) | |
download | wireguard-openbsd-89016b2b892cc84ac07476868afbdd0f8fbbf917.tar.xz wireguard-openbsd-89016b2b892cc84ac07476868afbdd0f8fbbf917.zip |
Set the maximum value of the msdos options to the value of LLONG_MAX
instead of ULLONG_MAX since the type of the comparison is using long
long, which has a positive maximum of LLONG_MAX. The affected opts
are of type off_t, which should have a maximum of LLONG_MAX anyway.
Fixes makefs(8) on msdos with options "create_size" or "offset".
ok natano@
Diffstat (limited to 'usr.sbin/makefs')
-rw-r--r-- | usr.sbin/makefs/msdos.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/makefs/msdos.c b/usr.sbin/makefs/msdos.c index a60af9adaa5..929b4b86c11 100644 --- a/usr.sbin/makefs/msdos.c +++ b/usr.sbin/makefs/msdos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdos.c,v 1.10 2016/12/17 16:12:15 krw Exp $ */ +/* $OpenBSD: msdos.c,v 1.11 2017/03/23 18:16:06 patrick Exp $ */ /* $NetBSD: msdos.c,v 1.16 2016/01/30 09:59:27 mlelstv Exp $ */ /*- @@ -63,7 +63,7 @@ msdos_prep_opts(fsinfo_t *fsopts) .minimum = _min, \ .maximum = sizeof(_type) == 1 ? 0xff : \ (sizeof(_type) == 2 ? 0xffff : \ - (sizeof(_type) == 4 ? 0xffffffff : 0xffffffffffffffffLL)), \ + (sizeof(_type) == 4 ? 0xffffffff : 0x7fffffffffffffffLL)), \ }, ALLOPTS #undef AOPT |