From ed979270941e3fe97d3025bbed516b138da7552a Mon Sep 17 00:00:00 2001 From: Nikolai Kondrashov Date: Tue, 28 Feb 2017 18:39:45 +0100 Subject: [PATCH] Fix buffer overflow in fr_pton_port --- src/lib/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/misc.c b/src/lib/misc.c index ba3fc36..cbc38ea 100644 --- a/src/lib/misc.c +++ b/src/lib/misc.c @@ -626,7 +626,7 @@ do_port: * input length indicates there are more than 5 chars * after the ':' then there's an issue. */ - if (inlen > ((q + sizeof(buffer)) - value)) { + if (len > ((q + sizeof(buffer)) - value)) { error: fr_strerror_printf("IP string contains trailing garbage after port delimiter"); return -1; -- 2.1.4