mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-28 10:32:22 -04:00
fixed potential integer problems in de-serialization of different TLV items (patch from Henry)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8574 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d3257e4455
commit
d870b13a49
3 changed files with 4 additions and 4 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue