]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Ignore invalid write_p
authorAlan T. DeKok <aland@freeradius.org>
Sun, 11 Oct 2015 21:14:21 +0000 (17:14 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 11 Oct 2015 21:14:21 +0000 (17:14 -0400)
src/main/cb.c

index f6880a2faa6b3e2ca31b93cf1ed4ebeabf35e95a..4ae14e575bef9fa34bb6170b20624320f12abe13 100644 (file)
@@ -93,6 +93,11 @@ void cbtls_msg(int write_p, int msg_version, int content_type,
                return;
        }
 
+       if ((write_p != 0) && (write_p != 1)) {
+               DEBUG4("Ignoring cbtls_msg call with invalid write_p %d", write_p);
+               return;
+       }
+
        /*
         *      Work around bug #298, where we may be called with a NULL
         *      argument.  We should really log a serious error