mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-17 13:24:15 -05:00
fixed potential integer problem in image de-serialization (reported by HM)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8568 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
20403a33a0
commit
8e0b6b95c5
@ -122,7 +122,7 @@ bool RsTlvImage::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…
x
Reference in New Issue
Block a user