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:
csoler 2015-06-29 12:00:40 +00:00
parent 20403a33a0
commit 8e0b6b95c5

View File

@ -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 */