aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/protocols/quic.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/protocols/quic.c b/src/lib/protocols/quic.c
index 6790e6bb8..9461765c6 100644
--- a/src/lib/protocols/quic.c
+++ b/src/lib/protocols/quic.c
@@ -196,7 +196,14 @@ int quic_len(const uint8_t *buf, uint64_t *value)
*value = ntohl(*(uint32_t *)buf) & 0x3FFFFFFF;
return 4;
case 3:
- *value = ndpi_ntohll(*(uint64_t *)buf) & 0x3FFFFFFFFFFFFFFF;
+ {
+ u_int64_t n;
+
+ /* Necessary as simple cast crashes on ARM */
+ memcpy(&n, buf, sizeof(u_int64_t));
+
+ *value = ndpi_ntohll(n & 0x3FFFFFFFFFFFFFFF);
+ }
return 8;
default: /* No Possible */
return 0;