mirror of
https://github.com/BertoldVdb/ZoneDetect.git
synced 2026-04-27 14:57:40 +00:00
Do not read past the end of the buffer
This commit is contained in:
parent
541d59b445
commit
a1460b4578
1 changed files with 4 additions and 0 deletions
|
|
@ -141,6 +141,10 @@ static unsigned int ZDDecodeVariableLengthUnsigned(const ZoneDetect *library, ui
|
||||||
static unsigned int ZDDecodeVariableLengthUnsignedReverse(const ZoneDetect *library, uint32_t *index, uint64_t *result){
|
static unsigned int ZDDecodeVariableLengthUnsignedReverse(const ZoneDetect *library, uint32_t *index, uint64_t *result){
|
||||||
uint32_t i = *index;
|
uint32_t i = *index;
|
||||||
|
|
||||||
|
if(*index >= (uint32_t)library->length) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
__try {
|
__try {
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue