summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/decoding.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/decoding.c b/lib/decoding.c
index 57e7b2b..9cd5a34 100644
--- a/lib/decoding.c
+++ b/lib/decoding.c
@@ -111,8 +111,8 @@ int ret, tot;
return ret;
tot = ret + *len;
-
- if (tot < 0 || tot > der_len)
+
+ if (tot < ret || tot > der_len)
return -3;
return ret;