ntohl Portability fixes

This commit is contained in:
Luca Deri
2019-06-29 17:34:08 +02:00
parent 81d3fc8a24
commit e9e647f043
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -100,8 +100,8 @@ void ndpi_search_quic(struct ndpi_detection_module_struct *ndpi_struct,
&& (packet->payload[i+1] == 'N')
&& (packet->payload[i+2] == 'I')
&& (packet->payload[i+3] == 0)) {
u_int32_t offset = le32toh(*((u_int32_t*)&packet->payload[i+4]));
u_int32_t prev_offset = le32toh(*((u_int32_t*)&packet->payload[i-4]));
u_int32_t offset = ntohl(*((u_int32_t*)&packet->payload[i+4]));
u_int32_t prev_offset = ntohl(*((u_int32_t*)&packet->payload[i-4]));
int len = offset-prev_offset;
int sni_offset = i+prev_offset+1;