aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2011-04-19 12:20:50 +0200
committerTobias Brunner <tobias@strongswan.org>2011-04-19 13:48:50 +0200
commit75cf0cc0124a622d2344be249c4581a7dfce060b (patch)
treea2b88c36858b065580f1bff4068364551419988d
parent1c004bebd8375b0e6dd0280047748bc33ff83710 (diff)
downloadstrongswan-75cf0cc0124a622d2344be249c4581a7dfce060b.tar.bz2
strongswan-75cf0cc0124a622d2344be249c4581a7dfce060b.tar.xz
pluto: Clarified parsing of long durations.
-rw-r--r--src/pluto/spdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pluto/spdb.c b/src/pluto/spdb.c
index 2fd6ecd4f..48585432b 100644
--- a/src/pluto/spdb.c
+++ b/src/pluto/spdb.c
@@ -591,7 +591,7 @@ static u_int32_t decode_long_duration(pb_stream *pbs)
if (pbs_left(pbs) > sizeof(val))
{
/* "clamp" too large value to max representable value */
- val -= 1; /* portable way to get to maximum value */
+ val = UINT32_MAX;
DBG(DBG_PARSING, DBG_log(" too large duration clamped to: %lu"
, (unsigned long)val));
}