summaryrefslogtreecommitdiff
path: root/src/common/leb128.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-08-15 20:03:47 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-08-15 20:03:47 (GMT)
commit13d12a85fa661c2f331a4ad61ef921d942ce9176 (patch)
treeec1ca1d40b44294daa88da8b6626f920fc4d9f87 /src/common/leb128.c
parent852650d335f3366ad2c2416c5cebf56a569be691 (diff)
Checked for out-of-bound data access without triggering integer overflow.
Diffstat (limited to 'src/common/leb128.c')
-rw-r--r--src/common/leb128.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/common/leb128.c b/src/common/leb128.c
index 2450850..67d8a6b 100644
--- a/src/common/leb128.c
+++ b/src/common/leb128.c
@@ -45,8 +45,6 @@ bool read_uleb128(uleb128_t *target, const bin_t *data, phys_t *pos, phys_t len)
int shift; /* Décallage à appliquer */
phys_t i; /* Boucle de parcours */
- if (*pos < 0) return false;
-
shift = 0;
*target = 0;
@@ -89,8 +87,6 @@ bool read_leb128(leb128_t *target, const bin_t *data, phys_t *pos, phys_t len)
int shift; /* Décallage à appliquer */
phys_t i; /* Boucle de parcours */
- if (*pos < 0) return false;
-
shift = 0;
*target = 0;