aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2021-08-25 09:46:29 +0200
committerLuca Deri <deri@ntop.org>2021-08-25 09:46:29 +0200
commit90c6fd99a78e3b87d5f1bc61943cf9affc4bb924 (patch)
tree0bda6f733b3a740d6d702f0901d0357bf5f96428 /src/lib
parent88040f04492d9ae4966b7387aafc20fb779fcb09 (diff)
ARM fixes
Diffstat (limited to 'src/lib')
-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;