diff --git a/libretroshare/src/serialiser/rstlvfileitem.cc b/libretroshare/src/serialiser/rstlvfileitem.cc index e3d0d34a2..dfc90672c 100644 --- a/libretroshare/src/serialiser/rstlvfileitem.cc +++ b/libretroshare/src/serialiser/rstlvfileitem.cc @@ -473,7 +473,7 @@ bool RsTlvFileSet::GetTlv(void *data, uint32_t size, uint32_t *offset) return false; uint16_t tlvtype = GetTlvType( &(((uint8_t *) data)[*offset]) ); - uint16_t tlvsize = GetTlvSize( &(((uint8_t *) data)[*offset]) ); + uint32_t tlvsize = GetTlvSize( &(((uint8_t *) data)[*offset]) ); uint32_t tlvend = *offset + tlvsize; if (size < tlvend) /* check size */ @@ -645,7 +645,7 @@ bool RsTlvFileData::GetTlv(void *data, uint32_t size, uint32_t *offset) } uint16_t tlvtype = GetTlvType( &(((uint8_t *) data)[*offset]) ); - uint16_t tlvsize = GetTlvSize( &(((uint8_t *) data)[*offset]) ); + uint32_t tlvsize = GetTlvSize( &(((uint8_t *) data)[*offset]) ); uint32_t tlvend = *offset + tlvsize; if (size < tlvend) /* check size */ diff --git a/libretroshare/src/serialiser/rstlvitem.cc b/libretroshare/src/serialiser/rstlvitem.cc index 73f2c5a70..02a1f8c63 100644 --- a/libretroshare/src/serialiser/rstlvitem.cc +++ b/libretroshare/src/serialiser/rstlvitem.cc @@ -135,7 +135,7 @@ bool RsTlvUnit::GetTlv(void *data, uint32_t size, uint32_t *offset) } uint16_t tlvtype = GetTlvType( &(((uint8_t *) data)[*offset]) ); - uint16_t tlvsize = GetTlvSize( &(((uint8_t *) data)[*offset]) ); + uint32_t tlvsize = GetTlvSize( &(((uint8_t *) data)[*offset]) ); uint32_t tlvend = *offset + tlvsize; if (size < tlvend) /* check size */ diff --git a/libretroshare/src/serialiser/rstlvkeys.cc b/libretroshare/src/serialiser/rstlvkeys.cc index 0afa1b767..eb90fff52 100644 --- a/libretroshare/src/serialiser/rstlvkeys.cc +++ b/libretroshare/src/serialiser/rstlvkeys.cc @@ -471,7 +471,7 @@ bool RsTlvKeySignature::GetTlv(void *data, uint32_t size, uint32_t *offset) return false; uint16_t tlvtype = GetTlvType( &(((uint8_t *) data)[*offset]) ); - uint16_t tlvsize = GetTlvSize( &(((uint8_t *) data)[*offset]) ); + uint32_t tlvsize = GetTlvSize( &(((uint8_t *) data)[*offset]) ); uint32_t tlvend = *offset + tlvsize; if (size < tlvend) /* check size */