summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index c83cef4..815e927 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -1173,6 +1173,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--])