]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - inet/inet6_opt.c
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / inet / inet6_opt.c
index 83063d22594083fed14393f30dafbb13299ef965..7498960b1cb1eca7e462bfcd33240fdbfca6f4d3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2006.
 
@@ -13,9 +13,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
 
 #include <string.h>
 #include <netinet/in.h>
@@ -34,7 +33,7 @@ inet6_opt_init (void *extbuf, socklen_t extlen)
 {
   if (extbuf != NULL)
     {
-      if (extlen <= 0 || (extlen % 8) != 0)
+      if (extlen <= 0 || (extlen % 8) != 0 || extlen > 256 * 8)
        return -1;
 
       /* Fill in the length in units of 8 octets.  */