From owner-svn-src-head@FreeBSD.ORG Wed Feb 5 02:00:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAECD640; Wed, 5 Feb 2014 02:00:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C780B185F; Wed, 5 Feb 2014 02:00:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1520VOf074917; Wed, 5 Feb 2014 02:00:31 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1520VvQ074916; Wed, 5 Feb 2014 02:00:31 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201402050200.s1520VvQ074916@svn.freebsd.org> From: Eitan Adler Date: Wed, 5 Feb 2014 02:00:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261502 - head/lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Feb 2014 02:00:31 -0000 Author: eadler Date: Wed Feb 5 02:00:31 2014 New Revision: 261502 URL: http://svnweb.freebsd.org/changeset/base/261502 Log: libc/net: fix a portability issue * POSIX does not require socklen_t to be unsigned Submitted by: bde MFC After: 1 week (with r261454) Modified: head/lib/libc/net/ip6opt.c Modified: head/lib/libc/net/ip6opt.c ============================================================================== --- head/lib/libc/net/ip6opt.c Wed Feb 5 00:26:11 2014 (r261501) +++ head/lib/libc/net/ip6opt.c Wed Feb 5 02:00:31 2014 (r261502) @@ -382,7 +382,7 @@ inet6_opt_init(void *extbuf, socklen_t e struct ip6_ext *ext = (struct ip6_ext *)extbuf; if (ext) { - if (extlen == 0 || (extlen % 8)) + if (extlen <= 0 || (extlen % 8)) return(-1); ext->ip6e_len = (extlen >> 3) - 1; }