mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-08 22:52:54 -04: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
1 changed files with 1 additions and 1 deletions
|
@ -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 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;
|
uint32_t tlvend = *offset + tlvsize;
|
||||||
|
|
||||||
if (size < tlvend) /* check size */
|
if (size < tlvend) /* check size */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue