summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/llabs.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-02-12 21:07:42 +0000
committerpfg <pfg@FreeBSD.org>2015-02-12 21:07:42 +0000
commit54c59fd68969bf0a48e1a95ee272a74ea14fecab (patch)
tree93abbba0a37143b3012ea63826ed970a17eb36ca /lib/libc/stdlib/llabs.c
parent0b5bdf57784feeaa96b7eebb84262c16894769c9 (diff)
downloadFreeBSD-src-54c59fd68969bf0a48e1a95ee272a74ea14fecab.zip
FreeBSD-src-54c59fd68969bf0a48e1a95ee272a74ea14fecab.tar.gz
ulimit(3): Fix broken check.
The existing implementation had a broken comparison that could overflow. Replace this with a check that avoids the overflow before it happens. Consistently return a maximum value also on the case of negative arguments since negative is considered an overflow and means infinity for our current setrlimit(). Discussed with: bde (rather extensively) CID: 1199295 MFC after: 1 week
Diffstat (limited to 'lib/libc/stdlib/llabs.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud