Commit 42eb3c67 authored by Linus Nordberg's avatar Linus Nordberg Committed by Linus Nordberg

Fix null pointer dereference in decttl().

Patch by Stephen Röttger.
parent eb436860
......@@ -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--])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment