diff --git a/src/decode-teredo.c b/src/decode-teredo.c index bbeda3efa398..9fd46f0118cc 100644 --- a/src/decode-teredo.c +++ b/src/decode-teredo.c @@ -182,7 +182,7 @@ int DecodeTeredo(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, if (len == IPV6_HEADER_LEN + IPV6_GET_RAW_PLEN(thdr) + (start - pkt)) { - int blen = len - (start - pkt); + uint32_t blen = len - (uint32_t)(start - pkt); /* spawn off tunnel packet */ Packet *tp = PacketTunnelPktSetup(tv, dtv, p, start, blen, DECODE_TUNNEL_IPV6_TEREDO); diff --git a/src/decode.c b/src/decode.c index 452344205290..927791b08b98 100644 --- a/src/decode.c +++ b/src/decode.c @@ -350,7 +350,7 @@ inline int PacketCopyDataOffset(Packet *p, uint32_t offset, const uint8_t *data, */ inline int PacketCopyData(Packet *p, const uint8_t *pktdata, uint32_t pktlen) { - SET_PKT_LEN(p, (size_t)pktlen); + SET_PKT_LEN(p, pktlen); return PacketCopyDataOffset(p, 0, pktdata, pktlen); } @@ -810,7 +810,7 @@ void DecodeThreadVarsFree(ThreadVars *tv, DecodeThreadVars *dtv) */ inline int PacketSetData(Packet *p, const uint8_t *pktdata, uint32_t pktlen) { - SET_PKT_LEN(p, (size_t)pktlen); + SET_PKT_LEN(p, pktlen); if (unlikely(!pktdata)) { return -1; }