-/* 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.
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>
{
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. */