]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix buffer overflow in fr_pton_port
authorNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
Tue, 28 Feb 2017 17:39:45 +0000 (18:39 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 28 Feb 2017 18:10:24 +0000 (13:10 -0500)
src/lib/misc.c

index ba3fc362fef18eb993fd1593c1eb62393cda0aa4..cbc38eac1213c5bd7999d31199d7a7d32cf26fc8 100644 (file)
@@ -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;