Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/lib/libmalloc CID 1225079: check getrlimit return
details: https://anonhg.NetBSD.org/src/rev/14fb84ce0a4b
branches: trunk
changeset: 808189:14fb84ce0a4b
user: christos <christos%NetBSD.org@localhost>
date: Sat May 09 13:32:30 2015 +0000
description:
CID 1225079: check getrlimit return
diffstat:
gnu/lib/libmalloc/mem-limits.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r f9650a336a14 -r 14fb84ce0a4b gnu/lib/libmalloc/mem-limits.h
--- a/gnu/lib/libmalloc/mem-limits.h Sat May 09 13:28:55 2015 +0000
+++ b/gnu/lib/libmalloc/mem-limits.h Sat May 09 13:32:30 2015 +0000
@@ -121,7 +121,8 @@
{
struct rlimit XXrlimit;
- getrlimit (RLIMIT_DATA, &XXrlimit);
+ if (getrlimit (RLIMIT_DATA, &XXrlimit) == -1)
+ XXrlimit.rlim_cur = -1;
#ifdef RLIM_INFINITY
lim_data = XXrlimit.rlim_cur & RLIM_INFINITY; /* soft limit */
#else
Home |
Main Index |
Thread Index |
Old Index