We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6e3f2a commit 76ad9c1Copy full SHA for 76ad9c1
worker/src/RTC/SCTP/Packet.cpp
@@ -3,6 +3,7 @@
3
4
#include "RTC/SCTP/Packet.hpp"
5
#include "Logger.hpp"
6
+#include "Utils.hpp"
7
8
namespace RTC
9
{
@@ -19,7 +20,9 @@ namespace RTC
19
20
return (
21
(len >= Packet::CommonHeaderSize) &&
22
// Source and destination ports cannot be 0.
- (header->sourcePort != 0 && header->destinationPort != 0)
23
+ (header->sourcePort != 0 && header->destinationPort != 0) &&
24
+ // Size must be multiple of 4 bytes.
25
+ Utils::Byte::IsPaddedTo4Bytes(len)
26
);
27
}
28
0 commit comments