summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--radsecproxy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 505afd0..7d4103e 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -1160,6 +1160,9 @@ void addttlattr(struct radmsg *msg, uint32_t *attrtype, uint8_t addttl) {
int decttl(uint8_t l, uint8_t *v) {
int i;
+ if (l == 0)
+ return 0;
+
i = l - 1;
if (v[i]) {
if (--v[i--])