From 75cf0cc0124a622d2344be249c4581a7dfce060b Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 19 Apr 2011 12:20:50 +0200 Subject: [PATCH] pluto: Clarified parsing of long durations. --- src/pluto/spdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); }