pluto: Clarified parsing of long durations.
authorTobias Brunner <tobias@strongswan.org>
Tue, 19 Apr 2011 10:20:50 +0000 (12:20 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 19 Apr 2011 11:48:50 +0000 (13:48 +0200)
src/pluto/spdb.c

index 2fd6ecd..4858543 100644 (file)
@@ -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));
        }