pluto: Clarified parsing of long durations.
This commit is contained in:
+1
-1
@@ -591,7 +591,7 @@ static u_int32_t decode_long_duration(pb_stream *pbs)
|
|||||||
if (pbs_left(pbs) > sizeof(val))
|
if (pbs_left(pbs) > sizeof(val))
|
||||||
{
|
{
|
||||||
/* "clamp" too large value to max representable value */
|
/* "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"
|
DBG(DBG_PARSING, DBG_log(" too large duration clamped to: %lu"
|
||||||
, (unsigned long)val));
|
, (unsigned long)val));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user