Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Apr 2014 21:30:54 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r264021 - head/lib/libnv
Message-ID:  <201404012130.s31LUsYu092603@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Tue Apr  1 21:30:54 2014
New Revision: 264021
URL: http://svnweb.freebsd.org/changeset/base/264021

Log:
  libnv: Don't lose big-endian flag when receiving a message.
  
  A bug caused the "big endian" flag to be lost when receiving a message. As a
  result, the bits are interpreted as little endian and an extremely large
  allocation is attempted.
  
  This change fixes ping(8)'s communication to casperd(8) on big-endian
  architectures.
  
  Reported by:	Anton Shterenlikht
  Tested by:	danfe

Modified:
  head/lib/libnv/nvlist.c

Modified: head/lib/libnv/nvlist.c
==============================================================================
--- head/lib/libnv/nvlist.c	Tue Apr  1 21:13:05 2014	(r264020)
+++ head/lib/libnv/nvlist.c	Tue Apr  1 21:30:54 2014	(r264021)
@@ -582,7 +582,7 @@ nvlist_check_header(struct nvlist_header
 		errno = EINVAL;
 		return (false);
 	}
-	if ((nvlhdrp->nvlh_flags &= ~NV_FLAG_ALL_MASK) != 0) {
+	if ((nvlhdrp->nvlh_flags & ~NV_FLAG_ALL_MASK) != 0) {
 		errno = EINVAL;
 		return (false);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404012130.s31LUsYu092603>