]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
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 2fd6ecd4f92fb4f27fd36a886b2367ef01571b2f..48585432be4d13bba3872e7f9d0e9855445500fa 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));
        }