diff --git a/Assets/VRM/UniJSON/Scripts/MsgPack/MsgPackFormatter.cs b/Assets/VRM/UniJSON/Scripts/MsgPack/MsgPackFormatter.cs index 1a713cb5f..eea676d69 100644 --- a/Assets/VRM/UniJSON/Scripts/MsgPack/MsgPackFormatter.cs +++ b/Assets/VRM/UniJSON/Scripts/MsgPack/MsgPackFormatter.cs @@ -418,6 +418,11 @@ namespace UniJSON public void TimeStamp32(DateTimeOffset time) { + // https://github.com/ousttrue/UniJSON/blob/1.2/Scripts/Extensions/DateTimeOffsetExtensions.cs#L13-L16 + if (time < DateTimeOffsetExtensions.EpochTime) + { + throw new ArgumentOutOfRangeException(); + } m_store.Write((Byte)MsgPackType.FIX_EXT_4); m_store.Write((SByte)(-1)); m_store.WriteBigEndian((uint)time.ToUnixTimeSeconds());